Re: [PATCH v3] quickfetch(): Prevent overflow of the rev-list command line
- From
Johan Herland <johan@herland.net>
- Date
- Jul 9, 2009, 15:32 UTC
- Message-ID
- <200907091732.49708.johan@herland.net>
- In-Reply-To
- <4A560509.8060909@viscovery.net>
On Thursday 09 July 2009, Johannes Sixt wrote:
Show 15 quoted lines
> Johan Herland schrieb: > > On Thursday 09 July 2009, Johannes Sixt wrote: > >> But actually I meant you to make a test that triggers the SIGPIPE that > >> would kill git-fetch if it were not ignored. This one doesn't trigger > >> it, either. > > > > AFAIU from earlier in this thread (and a mail from Peter linking to > > http://markmail.org/message/dbgdj4csafen65ye), SIGPIPE _never_ triggers > > on Windows, thus ignoring SIGPIPE is not needed for the fix per se. > > However, as a side-effect of the fix, we may now get SIGPIPE on Linux > > (and other POSIX platforms), so although it never triggers on Windows, > > it's still needed. > > I know that, of course. But try this: Remove the signal(SIGPIPE, SIG_IGN) > and run the test suite. There is not a single failure.
That's not what I'm seeing. When I don't ignore the signal, the testsuite fails intermittently for me (on Linux). I see the following tests fail:
- t3409-rebase-preserve-merges.sh (subtest #2) - t5503-tagfollow.sh (subtests #4, #6, #7) - t5505-remote.sh (subtests #10, #12, #14 - #20, #27) - t5510-fetch.sh (subtest #6 or #25) - probably more (I seldom get this far...)
I assume the intermittent failures are caused by git rev-list sometimes terminate before git fetch is finished writing objects to its standard input (because of scheduling differences).
When i enable the signal handling, all selftests pass every time.
...Johan
-- Johan Herland, <johan@herland.net> www.herland.net