[darcs-devel] [darcs #248] Need help tracking down sigINT (ctrl-C) related bug!

David Roundy droundy at abridgegame.org
Wed Mar 9 05:27:14 PST 2005


On Tue, Mar 08, 2005 at 10:27:40AM -0500, zooko at zooko.com via RT wrote:
> darcs repair recovered the changes.

That's good news!

> If I were you, I would still consider this to be a bug, as it requires 
> user intervention, and could perhaps go wrong and really permanently 
> lose changes.

I agree, since it left your repository in a "corrupt" state, it was
definitely a bug.  The fact that repair worked just means it wasn't a
deadly, deadly frightening bug--but still bad, since a careless user might
not notice that something was wrong, and then would record new patches and
introduce corruption into the repository.

This looks like an issue with the efficacy of the withSignalsBlocked
function, which is what was responsible for the "couldn't stop because
darcs was in a sensitive job" messages.  You should have kept getting those
messages until darcs was finished with the record, but somehow one of your
ctrl-Cs sneaked by.  I'm not sure how this could have happened, unless
there is a race in SignalHandler, or one of the standard library functions
doesn't do what I think it does.

I'm ccing this to darcs-devel in case there's anyone there with experience
in asynchronous exceptions and/or posix signals who'd be willing to take a
look a the code.  Or who has an idea how to debug something involving
multiple sigINTs coming during a sensitive part of the code.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list