Hello,
when enabling mod_perl, the "comm" field in /proc/[pid]/stat of the Apache2
processes is changed to the full path of the Apache2 executable and subsequently
truncated to 15+NUL characters. Probably not an issue by itself, but i breaks
e.g. monitoring tools like Nagios/NRPE which look at the process name either
directly in /proc/[pid]/stat or through commands like "ps".
Example without mod_perl:
# service apache2 stop
[ ok ] Stopping web server: apache2 ... waiting .
# a2dismod perl
Module perl disabled.
To activate the new configuration, you need to run:
service apache2 restart
# service apache2 start
[ ok ] Starting web server: apache2.
# ps -ef | grep apache2
root 8196 1 0 15:20 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8199 8196 0 15:20 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8200 8196 0 15:20 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8201 8196 0 15:20 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8202 8196 0 15:20 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8203 8196 0 15:20 ? 00:00:00 /usr/sbin/apache2 -k start
# cat /proc/8{1,2}{9,0}*/stat
8196 (apache2) S 1 8196 8196 0 -1 4202560 [...]
8199 (apache2) S 8196 8196 8196 0 -1 4202816 [...]
8200 (apache2) S 8196 8196 8196 0 -1 4202816 [...]
8201 (apache2) S 8196 8196 8196 0 -1 4202816 [...]
8202 (apache2) S 8196 8196 8196 0 -1 4202816 [...]
8203 (apache2) S 8196 8196 8196 0 -1 4202816 [...]
Example with mod_perl:
# service apache2 stop
[ ok ] Stopping web server: apache2 ... waiting .
# a2enmod perl
Enabling module perl.
To activate the new configuration, you need to run:
service apache2 restart
# service apache2 start
[ ok ] Starting web server: apache2.
# ps -ef | grep apache2
root 8291 1 0 15:21 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8296 8291 0 15:21 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8297 8291 0 15:21 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8298 8291 0 15:21 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8299 8291 0 15:21 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 8300 8291 0 15:21 ? 00:00:00 /usr/sbin/apache2 -k start
# cat /proc/8{2,3}{9,0}*/stat
8291 (/usr/sbin/apach) S 1 8291 8291 0 -1 4202560 [...]
8296 (/usr/sbin/apach) S 8291 8291 8291 0 -1 4202816 [...]
8297 (/usr/sbin/apach) S 8291 8291 8291 0 -1 4202816 [...]
8298 (/usr/sbin/apach) S 8291 8291 8291 0 -1 4202816 [...]
8299 (/usr/sbin/apach) S 8291 8291 8291 0 -1 4202816 [...]
8300 (/usr/sbin/apach) S 8291 8291 8291 0 -1 4202816 [...]
Since i can't assess the implications, could you please consider adopting this
patch: https://bugzilla.redhat.com/attachment.cgi?id=567625&action=diff
Thanks & best regards,
Frank Fegert
-------------8<---------- End Bug Report --------------8<----------