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

Re: [Updated PATCH 1/2] Report exec errors from run-command

From
TTarmigan <tarmigan+git@gmail.com>
Date
Dec 31, 2009, 05:26 UTC
Message-ID
<905315640912302126n1848c99cre0f9caa644041fad@mail.gmail.com>
In-Reply-To
<1262170338-11574-2-git-send-email-ilari.liusvaara@elisanet.fi>

On Wed, Dec 30, 2009 at 5:52 AM, Ilari Liusvaara <ilari.liusvaara@elisanet.fi> wrote:

Show 8 quoted lines
> Previously run-command was unable to report errors happening in exec
> call. Change it to pass errno from failed exec to errno value at
> return.
>
> The errno value passing can be done by opening close-on-exec pipe and
> piping the error code through in case of failure. In case of success,
> close-on-exec closes the pipe on successful exec and parent process
> gets end of file on read.
I was testing pu and 'git diff' and 'git log' would hang forever.

Bisecting pointed to v1 of this patch. But seeing that v2 was out, I tried v2 of the patch, but the issue remains.

Tried on OSX and linux with the same results.

Here's a gdb backtrace on OSX at the point where I interrupted it: (gdb) bt #0 0x9923dbfe in read$UNIX2003 () #1 0x000b399b in start_command (cmd=0x10b300) at run-command.c:110 #2 0x00099452 in setup_pager () at pager.c:94 #3 0x0002196b in cmd_diff (argc=1, argv=0xbffff42c, prefix=0x0) at builtin-diff.c:316 #4 0x00002a2a in run_builtin [inlined] () at git.c:257 #5 0x00002a2a in handle_internal_command (argc=1, argv=0xbffff42c) at git.c:401 #6 0x00002cab in main (argc=1, argv=0xbffff42c) at git.c:443

and on linux:
(gdb) bt
#0  0x0000003530a0d590 in __read_nocancel () from /lib64/libpthread.so.0
#1  0x0000000000494858 in start_command (cmd=0x71ed60) at run-command.c:93
#2  0x000000000047daf8 in setup_pager () at pager.c:94
#3  0x000000000041d83f in cmd_diff (argc=1, argv=0x7fff256f9fe0, prefix=0x0)
    at builtin-diff.c:316
#4  0x0000000000403ced in handle_internal_command (argc=1, argv=0x7fff256f9fe0)
    at git.c:257
#5  0x0000000000403f26 in main (argc=1, argv=0x7fff256f9fe0) at git.c:445

Thanks, Tarmigan

Previous: Erik Faye-LundNext: Ilari Liusvaara
Message 4 of 13 in “Improve remote helpers exec error reporting”
  1. 0/2 Improve remote helpers exec error reportingIlari Liusvaara, Dec 30, 2009
  2. 1/2 Report exec errors from run-commandIlari Liusvaara, Dec 30, 2009
  3. Erik Faye-LundDec 30, 2009
  4. TarmiganDec 31, 2009
  5. Ilari LiusvaaraDec 31, 2009
  6. TarmiganDec 31, 2009
  7. 2/2 Improve transport helper exec failure reportingIlari Liusvaara, Dec 30, 2009
  8. Johannes SixtDec 31, 2009
  9. Ilari LiusvaaraDec 31, 2009
  10. Johannes SixtDec 31, 2009
  11. Ilari LiusvaaraDec 31, 2009
  12. Johannes SixtDec 31, 2009
  13. Johannes SixtJan 1, 2010

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.