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

deadlock git upload-pack command when GIT_TRACE is enabled

From
EPEugene Petrenko <eugene.petrenko@gmail.com>
Date
May 9, 2016, 17:49 UTC
Message-ID
<CAJNyVBAr7dJFxXA2+dXCJUMs=mB9u3-Ja7r4wemk9C_HBZ3W2A@mail.gmail.com>
Hello,

I stuck around the deadlock inside git when running git upload-pack . command. A debugging shown that the bottom process (it starts several processes to implement the task) hangs writing to stderr. I managed to reproduce the issue with a tiny bash script. The repository and the script is found here https://github.com/jonnyzzz/git-upload-pack-deadlock

I saw the issue reproducing both under Windows and Linux/Mac.

Windows thread dumps are available here https://github.com/jonnyzzz/git-upload-pack-deadlock/tree/master/debug

According to those thread dumps I see the following problem around upload-pack.c line 129. There the pack_objects command is executed. First the wants block is pushed to the command, next the stdout processing is started. This means, that pack_objects process output is not processed until all output is put there. In the case I have, the pack_objects process writes TRACE logging into stderr and eventually (on hug repo) the OS buffer runs-out deadlocking the execution.

Best regards, Eugene Petrenko

Next: Stefan Beller
Message 1 of 3 in “deadlock git upload-pack command when GIT_TRACE is enabled”
  1. Eugene PetrenkoMay 9, 2016
  2. Stefan BellerMay 9, 2016
  3. Stefan BellerMay 9, 2016

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.