httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: WWW Form Bug Report: "signal handlers use non-rentrant functions" on OTHER:NetBSD
Date Tue, 03 Dec 1996 22:09:46 GMT

Thanks for the patch. I'll forward it to the developers list.

cheers,
rob

Liz Stokes wrote:
>> ilaine@panix.com wrote:
>> >
>> >Submitter: ilaine@panix.com
>> >Operating system: OTHER:NetBSD, version: 1.2_BETA
>> >Version of Apache Used: 1.1.1
>> >Extra Modules used: 
>> >URL exhibiting problem: 
>> >
>> >Symptoms:
>> >--
>> >sig_term, sig_bus, and sig_fault all call log_error, which calls many
>> >non re-entrant functions. In the example which brought the problem to my
>> >attention, httpd was in vfprintf when it received a SIGSEGV. It
>> >called log_error which caused it to re-enter vfprintf with unhappy
>> >results - it went into a tight loop inside vfprintf and chewed cycles
>> >at a prodigious rate till exterminated.
>> >
>> >I have patched our version to use a simple write() inside the signal handlers
>> >instead of log_error. It's not terribly elegant, and of course you lose the
>> >timestamp, but I'd be happy to provide the diff if you wish.
>> 
>> Thanks for the info. Apache 1.2b1 will be released in the next few hours.
>> Many bugs have been fixed and problems resolved. Can you send us a patch
>> for 1.2b1 if the problem persists.
>
>The bug is still there - the signal handlers are unchanged. Appended is a 
>diff for http_main.c
>
>-Liz
>
>
>*** http_main.c	Sun Dec  1 15:28:26 1996
>--- http_main.c.new	Tue Dec  3 14:58:52 1996
>***************
>*** 1066,1072 ****
>  }
>  
>  void sig_term() {
>!     log_error("httpd: caught SIGTERM, shutting down", server_conf);
>      cleanup_scoreboard();
>  #ifndef NO_KILLPG
>      killpg(pgrp,SIGKILL);
>--- 1066,1073 ----
>  }
>  
>  void sig_term() {
>!     write (fileno(server_conf->error_log),
>!            "httpd: caught SIGTERM, shutting down\n", 38);
>      cleanup_scoreboard();
>  #ifndef NO_KILLPG
>      killpg(pgrp,SIGKILL);
>***************
>*** 1079,1085 ****
>  }
>  
>  void bus_error() {
>!     log_error("httpd: caught SIGBUS, dumping core", server_conf);
>      chdir(server_root);
>      abort();         
>      exit(1);
>--- 1080,1087 ----
>  }
>  
>  void bus_error() {
>!     write (fileno(server_conf->error_log),
>!            "httpd: caught SIGBUS, dumping core\n", 36);
>      chdir(server_root);
>      abort();         
>      exit(1);
>***************
>*** 1086,1092 ****
>  }
>  
>  void seg_fault() {
>!     log_error("httpd: caught SIGSEGV, dumping core", server_conf);
>      chdir(server_root);
>      abort();
>      exit(1);
>--- 1088,1095 ----
>  }
>  
>  void seg_fault() {
>!     write (fileno(server_conf->error_log),
>!            "httpd: caught SIGSEGV, dumping core\n", 37);
>      chdir(server_root);
>      abort();
>      exit(1);
>
>



Mime
View raw message