Red Hat Bugzilla – Bug 491567
httpd crashed on HUP for log rotation with undefined symbol
Last modified: 2010-02-26 22:40:48 EST
Description of problem:
Weekly log rotation happened this morning(Sunday), and httpd died. The error in the log is below. Interestingly, service httpd start worked just fine hours later when httpd was found to be down.
[Sun Mar 22 04:48:23 2009] [notice] SIGHUP received. Attempting to restart
httpd: Syntax error on line 188 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_proxy.so into serv
er: /etc/httpd/modules/mod_proxy.so: undefined symbol: ap_timeout_parameter_parse
Log rotation happened at roughly 4:48am, and httpd was updated at 4:01pm the day before.
I suspected the rpm scripts, but comparing httpd-2.2.10-2.x86_64 to httpd-2.2.11-2.fc10.x86_64 the sha1sums match.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Update to httpd-2.2.11-2.fc10.x86_64
2. /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null
httpd keeps running
The only mention I could find of someone with the same problem was the link below, translated from German.
Ah, sorry. This happens with SIGHUPs across minor version updates sometimes.
(hit enter too quickly)
The problem is with a SIGHUP after an upgrade, the 2.2.10 httpd tries to load the 2.2.11 modules, but the 2.2.11 modules depend on functions in the new httpd.
I thought this kind of thing was a known issue and services were set to be restarted on update to avoid it. I have run into the opposite of this problem with mysqld. I update it, and it restarts unexpectedly. So I see how it cuts both ways, but crash on log rotation is definitely not good.
I see conditional restarts on postuninstall with openssh, bind, and mysql.
This hit me too. I'd have expected a restart at update, too.
I don't consider restarts on upgrades feasible. When do you want to do it?
1. on update of the httpd package
2. on update of the httpd package or any httpd module
3. on update of the httpd package, any httpd module, or any dependant library
4. on update of the httpd package, any httpd module, any dependant library, or any web app (see also bug 491137)
1. Makes sense to me, as I've come to expect it on other daemon rpms.
2. Also makes sense.
3. Such as. . .
4. Should be advised in the bodhi update on an app-by-app basis if needed, as most wouldn't need a restart of httpd.
2 weeks in a row had the same happen after running a yum update. Restarting httpd manually works, but then the second week sighup failed again with the same "undefined symbol: ap_timeout_parameter_parse" error. We had updated to 2.2.11-2 on the 18th via yum, after that each log rotate has crashed apache.
*** Bug 492753 has been marked as a duplicate of this bug. ***
*** Bug 521520 has been marked as a duplicate of this bug. ***
So actually now %posttrans scriptlets exist, it would probably make sense to have a %posttrans scriptlet which did a condrestart after an upgrade of httpd, at minimum.
I can also report that I had this bug - httpd crashed an didn't restart after a log rotate; The log ends with:
[Sun Sep 06 03:06:19 2009] [notice] SIGHUP received. Attempting to restart
httpd: Syntax error on line 171 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_include.so into server: /etc/httpd/modules/mod_include.so: undefined symbol: ap_escape_html2
Starting httpd again (service httpd start) works without a problem.
Had been working fine for me until the most recent httpd update to 2.2.13-1.fc11 last week, on Sunday I also received the undefined symbol: ap_escape_html2 - and, like nyh, restarting manually worked without issue. This happened on two different servers.
Oddly enough, I have two other servers with the same httpd version that did not have any problems with the logrotate.
See comment 3 for an explanation of why this sometimes happens with updates.
If you restarted httpd between updating the package and the logrotate run, then, you won't see the problem.
The problem only occurs if you don't restart httpd before logrotate runs.
This bug hit me too after an update to Apache 2.2.14 on CentOS 5.4
Restarting manually, of course, was possible.
The log ended with:
[Sun Oct 25 01:37:03 2009] [notice] SIGHUP received. Attempting to restart
httpd: Syntax error on line 163 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_include.so into server: /etc/httpd/modules/mod_include.so: undefined symbol: ap_escape_html2
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '10'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 10's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 10 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
This bug is *not* specific to Fedora 10, and also existed in Fedora 11. Someone, please change the "version" of this bug so it doesn't get removed!
Would this not be fixed if httpd and any packages providing modules for httpd did something like this in the postinstall section?
service httpd status >/dev/null && service httpd graceful
httpd-2.2.14-1.fc11 has been submitted as an update for Fedora 11.
Please test out the 2.2.14-1 package when it hits updates-testing and post feedback at the bodhi link above (and here if you like). This update should resolve this issue.
httpd-2.2.14-1.fc10 has been submitted as an update for Fedora 10.
httpd-2.2.14-1.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update httpd'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-12604
httpd-2.2.14-1.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update httpd'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-12747
httpd-2.2.14-1.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
httpd-2.2.14-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.