Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 102005 - child httpd hangs when cgi prints more than 4096 bytes to stderr
child httpd hangs when cgi prints more than 4096 bytes to stderr
Product: Red Hat Linux
Classification: Retired
Component: httpd (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Joe Orton
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-08-08 15:49 EDT by Luiz
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-11 10:44:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
CGI source code (254 bytes, text/plain)
2003-08-08 15:51 EDT, Luiz
no flags Details

  None (edit)
Description Luiz 2003-08-08 15:49:14 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030711

Description of problem:
A CGI (and its parent httpd) hangs while printing long strings with more than
4096 bytes to stderr.

Multiple small strings on printf have the same effect as a single long string in

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. gcc -o /var/www/cgi-bin/apbuf.cgi apbuf.c
2. wget http://localhost/cgi-bin/apbuf.cgi


Actual Results:  Both the cgi and its parent httpd hanged.

# strace -p `pidof apbuf.cgi`
write(2, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"..., 4097 <unfinished ...>

# strace -p 22412
poll( <unfinished ...>

(22412 was apbuf.cgi parent)

Even after killing wget with ctrl-c:
     &#9474;       &#9492;&#9472;httpd&#9472;&#9472;&#9472;apbug.cgi

Nothing is appended to error_log.

Expected Results:  wget should save apbug.cgi file with an "ok",
apache should append a line with 4097 A's to error_log.

Additional info:

Comment 1 Luiz 2003-08-08 15:51:32 EDT
Created attachment 93535 [details]
CGI source code
Comment 2 Joe Orton 2003-09-11 10:44:41 EDT
This is a known design issue with mod_cgi in httpd 2.0.x; I'll defer to the
upstream bug, there is no simple fix we can integrate.  Thanks for the report.


Note You need to log in before you can comment on or make changes to this bug.