git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t1400: avoid SIGPIPE race condition on fifo

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2021, 20:08 UTC
Message-ID
<xmqqee9pwqig.fsf@gitster.g>
In-Reply-To
<YUIsZCTqm56KfilP@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 22 quoted lines
> On Wed, Sep 15, 2021 at 01:13:25PM -0400, Jeff King wrote:
>
>> I think this test may be racy. I saw a strange failure from it in CI:
>> 
>>   https://github.com/peff/git/runs/3605506649?check_suite_focus=true#step:5:6734
>> 
>> I can't reproduce the problem locally with "--stress", but the failure
>> there is on macOS (and likewise, a nearby run failed with a timeout just
>> for macOS, which could be caused by a racy deadlock).
>
> Ah, I just wasn't trying hard enough. Using --run=1,190 lets it run a
> lot more tightly, and I got a failure pretty quickly. Here's the fix (on
> top of ps/update-ref-batch-flush).
>
> -- >8 --
> Subject: [PATCH] t1400: avoid SIGPIPE race condition on fifo
>
> t1400.190 sometimes fails or even hangs because of the way it uses
> fifos. Our goal is to interactively read and write lines from
> update-ref, so we have two fifos, in and out. We open a descriptor
> connected to "in" and redirect output to that, so that update-ref does
> not see EOF as it would if we opened and closed it for each "echo" call.

Thanks. I think I see the same breakage in last night's pushout of 'seen'.

Will queue.
Previous: Jeff KingNext: Patrick Steinhardt
Message 5 of 6 in “update-ref: fix streaming of status updates”
  1. update-ref: fix streaming of status updatesPatrick Steinhardt, Sep 3, 2021
  2. Junio C HamanoSep 3, 2021
  3. Jeff KingSep 15, 2021
  4. t1400: avoid SIGPIPE race condition on fifoJeff King, Sep 15, 2021
  5. Junio C HamanoSep 15, 2021
  6. Patrick SteinhardtSep 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.