[darcs-users] fromJust error in darcs-2.0.0

Greg Holtz gh2377 at hotmail.com
Thu Apr 24 01:11:46 UTC 2008


I put a bunch of putStrLn's everywhere, and I find that genslurp_helper is
called only once before error. The call uses /darcs/_darcs/pristine.
The if statement's predicate fails, and so do all the else's except for
the last one that says "return Nothing"

The only thing I can think of being an issue would be getSymbolicLinkStatus
not returning the right thing.

What about this?

http://hackage.haskell.org/trac/ghc/ticket/2093


> Date: Wed, 23 Apr 2008 14:51:24 -0700
> From: daveroundy at gmail.com
> To: gh2377 at hotmail.com
> Subject: Re: [darcs-users] fromJust error in darcs-2.0.0
> CC: darcs-users at darcs.net
> 
> This has me pretty well stumped.  All I can think to do is to look at
> the source code for genslurp_helper (the old error message gave you a
> good hint where to start looking) and instrument it with extra output.
>  I'd first remove the unsafeInterleaveIOs.  I don't think they're
> buggy, but they complicate the instrumentation by making the order of
> evaluation less clear.  Then I'd add notes like
> 
> putStrLn "I'm here"
> 
> into the code.  If you know Haskell, this is easy.  If you don't, you
> should just need to know that the code here is divided into blocks by
> indentation, with each block being defined by a "do", and you should
> be able to guess the rest.  In particular, you'll want to replace the
> "return Nothing" with something like
> 
>    do putStrLn "It looks like I've failed miserably"
>         return Nothing
> 
> You might also benefit from looking up what the functions lxstat etc
> do.  I would only expect darcs to call lstat64, but maybe Solaris has
> some other functions that are used instead?
> 
> David
> 
> On Wed, Apr 23, 2008 at 9:39 AM, Greg Holtz <gh2377 at hotmail.com> wrote:
> >
> >  Sorry about the copies of my original post that just came in.
> > I sent those days ago before finding out you had to subscribe to
> > be able to post. I guess the internet kept them in a holding pattern.
> >
> > Thanks for the partial fix. I can run "darcs changes" now and it
> > doesn't give up. "whatsnew" says
> >
> > darcs failed:  Unable to read directory /darcs/_darcs/pristine (it appears
> > to be neither file nor directory)
> >
> > but
> >
> > -rw-r--r-- 1 gh other 10 Apr 23 09:30 format
> > drwxr-xr-x 2 gh other  2 Apr 23 09:30 inventories
> > -rw-r--r-- 1 gh other  0 Apr 23 09:30 inventory
> > drwxr-xr-x 2 gh other  2 Apr 23 09:30 patches
> > drwxr-xr-x 2 gh other  5 Apr 23 09:30 prefs
> > drwxr-xr-x 2 gh other  2 Apr 23 09:30 pristine
> >
> > and the truss output around that command is
> > chdir("/darcs")            = 0
> >
> > rmdir("darcs_testing_for_nfs")            Err#2 ENOENT
> > stat64("/darcs/_darcs/pristine", 0xD0879A68) = 0
> > getcwd("/darcs", 4096)        = 0
> > chdir("/darcs/_darcs/pristine")    = 0
> > getcwd("/darcs/_darcs/pristine", 4096) = 0
> > chdir("/darcs")            = 0
> > lxstat(2, "/darcs/_darcs/pristine", 0xD0879B80) = 0
> > chdir("/darcs")            = 0
> > chdir("/darcs")            = 0
> > pollsys(0x08044C80, 1, 0x08044D08, 0x00000000)    = 1
> >
> > then the commands for printing the error.
> >
> >
> >
> >
> >
> > >
> > > I'm pushing a (partial) fix that will give a proper error message in
> > > this case, that could give us a hint as to what's going wrong. Darcs
> > > is failing to read a directory, it seems, but we can't really tell
> > > which directory. If you can get a copy (using another machine
> > > perhaps?) of the latest darcs and see how this works, that'd be great.
> > >
> > > David
> >
> > ________________________________
> > Express yourself wherever you are. Mobilize!
> > _______________________________________________
> >  darcs-users mailing list
> >  darcs-users at darcs.net
> >  http://lists.osuosl.org/mailman/listinfo/darcs-users
> >
> >

_________________________________________________________________
In a rush? Get real-time answers with Windows Live Messenger.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osuosl.org/pipermail/darcs-users/attachments/20080423/b9100ed1/attachment.htm 


More information about the darcs-users mailing list