<br><br><div class="gmail_quote">On Tue, Jan 12, 2010 at 6:26 PM, Max Battcher <span dir="ltr">&lt;<a href="mailto:me@worldmaker.net">me@worldmaker.net</a>&gt;</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&#39;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&#39;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 &quot;sudo&quot; 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 &quot;darcs-benchmark run bin1 bin2 &gt; test.log&quot; doesn&#39;t get standard out redirected to the log file properly in Windows (I&#39;m used to it working on Windows, so that&#39;s pretty surpising), so I&#39;ll try to cut and paste an example or two from the log...<br>

<br>
Here&#39;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&#39;t open stats file darcs-stats<br></blockquote><div><br></div><div>Hmm...that&#39;s interesting.  darcs-stats is created by GHC&#39;s run-time system.  Eg., it&#39;s a file created and opened for write by a different process and darcs should be ignoring it.  It definitely shouldn&#39;t be part of the repository that you&#39;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&#39;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&#39;t seem to be waiting long enough between runs to close the file correctly (or otherwise doesn&#39;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&#39;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&#39;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&#39;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&#39;s also interesting because it couldn&#39;t find darcs-2.3.1 in its place in Haskell&#39;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&#39;t look like darcs-benchmark wants to run correctly on Windows Vista just yet.</blockquote><div><br></div><div>I&#39;m still troubleshooting the OS X case too.  Thanks for trying to figure this out!</div>
<div><br></div><div>Jason</div></div>