git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* deadlock git upload-pack command when GIT_TRACE is enabled
@ 2016-05-09 17:49 Eugene Petrenko
  2016-05-09 17:53 ` Stefan Beller
  0 siblings, 1 reply; 3+ messages in thread
From: Eugene Petrenko @ 2016-05-09 17:49 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-09 17:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-09 17:49 deadlock git upload-pack command when GIT_TRACE is enabled Eugene Petrenko
2016-05-09 17:53 ` Stefan Beller
2016-05-09 17:54   ` Stefan Beller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).