Re: PHP 4.0 Bug #3911: apachectl restart segfaults

From: Date: Fri, 24 Mar 2000 10:02:12 +0000
Subject: Re: PHP 4.0 Bug #3911: apachectl restart segfaults
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-17196@lists.php.net to get a copy of this message
| I have the same problem on a Red Hat Linux 6.0 (2.2.14) System running the Apache 1.3.12 | rpm compiled from the rawhide apache-1.3.12-1.src.rpm. Anytime an kill -HUP {daemon PID} | is done, the server segfaults and doesn't restart. Logrotate was killing mine once a week. Hi, I did some testing, and it seems that I can reproduce this on my system too. If I just do a single killall -HUP httpd, everything is ok, and when I do it several with some time in between, everything is still allright. But when I do killall -HUP httpd; killall -HUP httpd (thus, doing it twice without any time in between), it dumps core. This happens 9 out of 10 times. Standard RedHat /etc/logrotata.d/apache has: /var/log/httpd/access_log { missingok postrotate /usr/bin/killall -HUP httpd endscript } /var/log/httpd/agent_log { missingok postrotate /usr/bin/killall -HUP httpd endscript } /var/log/httpd/error_log { missingok postrotate /usr/bin/killall -HUP httpd endscript } /var/log/httpd/referer_log { missingok postrotate /usr/bin/killall -HUP httpd endscript } I think logrotate isn't that smart to just sent a SIGHUP once. So probably, if reinitializing Apache is taking a bit longer than rotating a logfile (and because we have included PHP it's taking a lot longer), there seems to be a problem. I think a sleep 5 (or whatever) right after the kill commands will fix the problem. But it sure is a bug. Ime

« previous php.dev (#17196) next »