<br><br><div class="gmail_quote">On Tue, Jan 12, 2010 at 6:26 PM, Max Battcher <span dir="ltr"><<a href="mailto:me@worldmaker.net">me@worldmaker.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 1/12/2010 18:01, Max Battcher wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 1/12/2010 17:50, Max Battcher wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In the not-so-silly Windows bug problems: darcs-benchmark doesn't always<br>
cleanly close file handles and processes on interruption (Ctrl+C).<br>
</blockquote>
<br>
Urgh... Let me upgrade this problem... On Windows darcs itself is having<br>
all kinds of permission errors attempting to run through the benchmark.<br>
For whatever reason the benchmark isn't giving darcs enough time to<br>
release files between processes that subsequent tests such as unpull<br>
after record are failing with permission errors.<br>
<br>
Trying a "sudo" run now, to see if that helps, but it seems unfortunate<br>
if darcs-benchmark needs Admin privileges on Windows.<br>
</blockquote>
<br></div>
Who am I kidding? The permissions issues appear to be the same with or without Admin privileges (which I should have expected). For some reason "darcs-benchmark run bin1 bin2 > test.log" doesn't get standard out redirected to the log file properly in Windows (I'm used to it working on Windows, so that's pretty surpising), so I'll try to cut and paste an example or two from the log...<br>
<br>
Here's one of the most common permission errors it seems:<br>
<br>
C:\Users\Max\Stuff\Benchmarking\darcs-2.3.1 check --no-test +RTS -sdarcs-stats -<br>
RTS<div class="im"><br>
error: user error (darcs failed with error code 1<br></div>
saying: Can't open stats file darcs-stats<br></blockquote><div><br></div><div>Hmm...that's interesting. darcs-stats is created by GHC's run-time system. Eg., it's a file created and opened for write by a different process and darcs should be ignoring it. It definitely shouldn't be part of the repository that you're benchmarking.</div>
<div><br></div><div>What about this command instead:</div><div>C:\Users\Max\Stuff\Benchmarking\darcs-2.3.1 check --no-test +RTS -sC:\Users\Max\Stuff\darcs-stats -RTS</div><div><br></div><div>In other words, what if we don't create the darcs-stats file in the same directory as the repository? We should probably also update darcs check so that it warns instead of fails when it cannot open a file. Lastly, why does it even care about that file?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
Obviously the darcs-stats file is in pretty high demand and darcs-benchmark doesn't seem to be waiting long enough between runs to close the file correctly (or otherwise doesn't have the proper sharing permissions setup for the file).<br>
</blockquote><div><br></div><div>The haskell run-time created it for the duration that darcs is executing and I bet darcs tried to access while it was running. I think there are essentially two solutions:</div><div><br></div>
<div>1) Create the file elsewhere</div><div>2) make it a non-fatal error</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
Here's an example of a failure in darcs itself:<br>
<br>
C:\Users\Max\Bin\darcs.exe unpull --last 1000 --all +RTS -sdarcs-stats -RTS<br>
error: user error (darcs failed with error code 2<br>
saying: Reading pristine 31/478<div class="im"><br>
<br>
darcs failed: Can't unpull patch without reverting some unrecorded change.<br>
)<br></div></blockquote><div><br></div><div>I think there is some bad interaction between the repositories that Petr is supplying and the expectations of darcs-benchmark (it doesn't expect darcs to run into any problems or questions).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
<br></div>
Well, that's also interesting because it couldn't find darcs-2.3.1 in its place in Haskell's bin directory (despite accessibility in PATH), but it found this other Bin directory in my PATH.<br></blockquote><div>
<br></div><div>Is it possible that the order of your paths is interfering?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Anyway, it doesn't look like darcs-benchmark wants to run correctly on Windows Vista just yet.</blockquote><div><br></div><div>I'm still troubleshooting the OS X case too. Thanks for trying to figure this out!</div>
<div><br></div><div>Jason</div></div>