[darcs-users] "darcs get" crashes (usually)

David Roundy droundy at abridgegame.org
Fri Jul 23 10:19:10 UTC 2004

On Thu, Jul 22, 2004 at 10:18:25AM +0200, Martin Schaffner wrote:
> I wrote:
> > > I have a darcs repo which I can't "get", neither on Windows nor on Mac  
> > > OS X. On the mac, darcs usually does a "Bus error", sometimes a Seg
> > > fault, and rarely it succeeds. It is in 
> > > relation to garbage collection
> > I will also try on Mac OS X without mmap support.
> I compiled darcs without mmap support, and got exactly the same result as 
> with mmap support.

Hmmmm.  This is very strange.  Without the mmap support, this means there
is a bug in the compiler.  In theory, the bug could be in the
FastPackedString module, but that module is quite simple an very well

> How do I debug haskell code? Can I put breakpoints into some of the 
> destructors in order to find out what causes the crash?

If the bug is really in darcs, it would have to be in one of the
ForeignPtrs (which I think are only created in FastPackedString).  There's
a routine to add an extra finalizer to a ForeignPtr which you could use to
add a putStr whenever one is deleted.

Is there any chance I either get a login on your Mac system (if I were you,
I probably wouldn't give it to me...)? I've only got one device on my mac,
which could explain why I haven't seen this.

Does the problem only show up for one particular repository? I got that
impression... Perhaps there's something odd about that repo, although it
shouldn't be possible for any odd corrupt repo to cause a segfault.
David Roundy

More information about the darcs-users mailing list