From: Eugene Petrenko <eugene.petrenko@gmail.com>
To: git@vger.kernel.org
Subject: deadlock git upload-pack command when GIT_TRACE is enabled
Date: Mon, 9 May 2016 19:49:01 +0200 [thread overview]
Message-ID: <CAJNyVBAr7dJFxXA2+dXCJUMs=mB9u3-Ja7r4wemk9C_HBZ3W2A@mail.gmail.com> (raw)
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 reply other threads:[~2016-05-09 17:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 17:49 Eugene Petrenko [this message]
2016-05-09 17:53 ` deadlock git upload-pack command when GIT_TRACE is enabled Stefan Beller
2016-05-09 17:54 ` Stefan Beller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJNyVBAr7dJFxXA2+dXCJUMs=mB9u3-Ja7r4wemk9C_HBZ3W2A@mail.gmail.com' \
--to=eugene.petrenko@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).