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

Re: [PATCH] t5512.40 sometimes dies by SIGPIPE

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 13, 2024, 19:44 UTC
Message-ID
<CAPig+cTj-6HQa4XToOTXZ2gsXKpgqxbUvRLoBLrTZ0VC3tJ6Mg@mail.gmail.com>
In-Reply-To
<xmqqmskbwe1a.fsf@gitster.g>
On Fri, Sep 13, 2024 at 3:26 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> The last test in t5512 we recently added seems to be flaky.
> Running
>
>     $ make && cd t && sh ./t5512-ls-remote.sh --stress
>
> shows that "git ls-remote foo::bar" exited with status 141, which
> means we got a SIGPIPE.  This test piece was introduced by 9e89dcb6
> (builtin/ls-remote: fall back to SHA1 outside of a repo, 2024-08-02)
> and is pretty much independent from all other tests in the script
> (it can even run standalone with everything before it removed).
>
> The transport-helper.c:get_helper() function tries to write to the
> helper.  As we can see the helper script is very short and can exit
> even before it reads anything, when get_helper() tries to give the
> first command, "capabilities", the helper may already be gone.
>
> A trivial fix, presented here, os to make sure that the helper reads
s/os/is/
Show 8 quoted lines
> the first command it is given, as what it writes later is a response
> to that command.
>
> I however would wonder if the interactions with the helper initiated
> by get_helper() should be done on a non-blocking I/O (we do check
> the return value from our write(2) system calls, do we?).
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 8 in “t5512.40 sometimes dies by SIGPIPE”
  1. t5512.40 sometimes dies by SIGPIPEJunio C Hamano, Sep 13, 2024
  2. Eric SunshineSep 13, 2024
  3. Junio C HamanoSep 13, 2024
  4. Jeff KingSep 14, 2024
  5. Junio C HamanoSep 14, 2024
  6. Patrick SteinhardtSep 16, 2024
  7. Chris TorekSep 14, 2024
  8. Junio C HamanoSep 15, 2024

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.