From: "Shawn O. Pearce" <spearce@spearce.org>
To: Brady Catherman <brady@catherman.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git clone over smart-http hanging for just one repo.
Date: Mon, 22 Mar 2010 07:12:30 -0700 [thread overview]
Message-ID: <20100322141230.GA8916@spearce.org> (raw)
In-Reply-To: <51569EE6-A926-45DB-A588-B659750BA643@catherman.org>
Brady Catherman <brady@catherman.org> wrote:
> I have a git repo that fails to clone or fetch over smart-http, but
> works great over dav. I am wondering if somebody can help me debug the
> issue since I am at a loss why this is happening.
Yea, I'm at a loss too. :-(
> The interesting parts of a strace of git-http-backend following a git
> clone follow:
...
> 12037 close(1) = 0
Why did the CGI process just close stdout? I'm guessing this is
part of the exec of the upload-pack child in the background. Oh,
right, we closed it because we passed the descriptor to the child
and now the parent CGI doesn't want it anymore.
> 12037 write(1, "Status: 500 Internal Server Error\r\n", 35) = -1 EBADF
> (Bad file descriptor)
This smells like the backend upload-pack process got into trouble and
exited early, so now the CGI is trying to change the status to 500
since the backend exited with a non-zero status. Only its too late,
as the filedescriptor was already closed after the successful fork().
We're stuck in a loop because we're failing during the die routine.
Because the file descriptor is closed, safe_write() which was what
originated that write(1, ...) above, tries to call die(). But that
die() call invokes die_webcgi() which in turn tries to write that
500 error message again to 1. So this goes on a for a while...
> 12037 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> 12037 +++ killed by SIGSEGV +++
and then we run out of stack space, due to too many recursions,
and the process is aborted by a SIGSEGV.
> Anybody have any thoughts why this would happen or what can be done to
> fix it?
A gdb trace or something of the upload-pack process would help.
That appears to have also died and we don't know why. Its death
is what contributed to the CGI crashing above.
I'll try to send a patch for this recursive crashing problem in
the CGI.
--
Shawn.
next prev parent reply other threads:[~2010-03-22 14:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 6:52 git clone over smart-http hanging for just one repo Brady Catherman
2010-03-22 14:12 ` Shawn O. Pearce [this message]
2010-03-22 14:22 ` [PATCH] http-backend: Don't infinite loop during die() Shawn O. Pearce
2010-03-22 20:25 ` Junio C Hamano
2010-03-24 18:29 ` Junio C Hamano
2010-03-24 20:06 ` Shawn O. Pearce
2010-03-24 20:24 ` Nicolas Pitre
2010-03-24 20:25 ` Shawn Pearce
2010-03-24 21:37 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100322141230.GA8916@spearce.org \
--to=spearce@spearce.org \
--cc=brady@catherman.org \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).