VMware Cloud Community
langeman
Contributor
Contributor

Apache SNMP - logrotate - crashing

Using Linux Apache 2.2.4 with the SNMP-modules, the http daemon frequently crashes after the daily logrotate. Aftert the log rotate a kill -HUP is done: (/etc/logrotate.d/httpd)

/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null`

In quite some cases an error occures; error.log shows:

[Wed Jul 14 04:02:09 2010] [notice] seg fault or similar nasty error detected in the parent process

No further information is given, Apache hangs; only the parrent process is running, no child processes. The parrent process hangs.

The problem ONLY occurs when, at some time, a gracefull restart is given; doing a kill -HUP afterwards gives the "nasty error"

Message was edited by: tall_male
Reply
0 Kudos
5 Replies
admin
Immortal
Immortal

Hi,

I have a few apache's running with mod_snmp and logrotate and I've never seen this.

Have you removed mod_snmp and verified that it stops crashing after the logrotate?
Reply
0 Kudos
langeman
Contributor
Contributor

Yes, after removing the snmp modules the problem disapears. I tried Apache 2.2.14 as wel, same problem.
Reply
0 Kudos
admin
Immortal
Immortal

Hi,

The mod_snmp module is a 3rd party module. I did some googling hoping to find similar reports and I had no success.

I'm guessing something specific in your configuring is causing the module to misbehavior. Now the fun part is to figure out what. 😞

Could you give me an idea of what your apache configuration looks like? Such as number of virtual hosts, if any? Any other non-default modules loaded?

Which linux distribution and version are you using?
Reply
0 Kudos
langeman
Contributor
Contributor

The problem as described is reproduced on Red Hat 4.7 as well as Centos 5.5 (32 bit).

It seems it has nothing to do with a specific configuration. I build a default Apache 2.2.14:

rpmbuild -bb httpd.spec with the spec file taken from /usr/src/redhat/SOURCES/httpd-2.2.14.tar.gz. The file was taken from www.apache.org with no additional patches.

Doing a kill -HUB or apachectl reload AFTER apachectl -k graceful make both httpd and httpd.worker fail as described.
Reply
0 Kudos
langeman
Contributor
Contributor

Anyone...?
Reply
0 Kudos