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

Re: [PATCH] http-backend: Don't infinite loop during die()

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 22, 2010, 20:25 UTC
Message-ID
<7vhbo885os.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100322142204.GB8916@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 5 quoted lines
> If stdout has already been closed by the CGI and die() gets called,
> the CGI will fail to write the "Status: 500 Internal Server Error" to
> the pipe, which results in die() being called again (via safe_write).
> This goes on in an infinite loop until the stack overflows and the
> process is killed by SIGSEGV.

Before looking at the code I first thought "wouldn't we have the same problem in die(), and shouldn't we have "dying" flag there?" but I was stupid as usual ;-)

The patch looks sane.  Thanks.
Previous: Shawn O. PearceNext: Junio C Hamano
Message 4 of 9 in “git clone over smart-http hanging for just one repo.”
  1. Brady CathermanMar 22, 2010
  2. Shawn O. PearceMar 22, 2010
  3. http-backend: Don't infinite loop during die()Shawn O. Pearce, Mar 22, 2010
  4. Junio C HamanoMar 22, 2010
  5. Junio C HamanoMar 24, 2010
  6. Shawn O. PearceMar 24, 2010
  7. Nicolas PitreMar 24, 2010
  8. Shawn PearceMar 24, 2010
  9. Junio C HamanoMar 24, 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.