httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10515] - cgi lock when writing to stderr
Date Tue, 08 Oct 2002 21:59:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10515>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10515

cgi lock when writing to stderr





------- Additional Comments From michael@vpmonline.com  2002-10-08 21:59 -------
Ran into the same behavior today.  After upgrading to Redhat 8, and apache
2.0.40.  I just installed 2.0.43 and it exhibits the same lock.  Both PERL and C
++ programs exhibit the locking.  Locking only happens when writing to STDERR. 
This is using a stock Redhat 8 install.  Can reproduce on apache 2.0.40-8 (
redhat default) and fresh build of 2.0.43.

Sample C++ CGI Program:
//////////////////////////////////////////////
#include <iostream>
#include <sys/types.h>
#include <unistd.h>

using namespace std;

int main() {
  cout << "Content-Type:text/plain\n\n";
  cout << getpid() << endl;
  sleep (20); // allow me to hook an strace to the pid

  for (int i=0; i < 1000; i++) {
    cout << "Here " << i << endl;
    cerr << "Here " << i << endl;
  }
  return 0;
}
/////////////////////////////////////////////////////

Here is the last of an strace up to hang:

write(1, "Here 466\n", 9)               = 9
write(2, "H", 1)                        = 1
write(2, "e", 1)                        = 1
write(2, "r", 1)                        = 1
write(2, "e", 1)                        = 1
write(2, " ", 1)                        = 1
write(2, "4", 1)                        = 1
write(2, "6", 1)                        = 1
write(2, "6", 1)                        = 1
write(2, "\n", 1)                       = 1
write(1, "Here 467\n", 9)               = 9
write(2, "H", 1)                        = 1
write(2, "e", 1)                        = 1
write(2, "r", 1)                        = 1
write(2, "e", 1

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message