Bug#754702: libapache2-mod-perl2: Apache2 "comm" field in /proc/[pid]/stat is changed to full path when mod_perl is enabled

Damyan Ivanov dmn at debian.org
Thu Sep 4 20:16:12 UTC 2014


-=| Frank Fegert, 13.07.2014 15:49:23 +0200 |=-
> Package: libapache2-mod-perl2
> Version: 2.0.7-3
> Severity: minor
> 
> 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:
> 
>     # 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 [...]
> 
> Example with mod_perl:
> 
>     # 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 [...]
> 
> Since i can't assess the implications, could you please consider adopting this
> patch: https://bugzilla.redhat.com/attachment.cgi?id=567625&action=diff

-     modperl_config_srv_argv_push(s->process->argv[0]);
+     modperl_config_srv_argv_push(s->process->short_name);

Seems good, but breaks tests. FindBin complains that it cannot find 
"apache2". And if the line is commented another test fails since 
FindBin cannot find "-wT" executable (probably coming from "perl 
-wT").

This might as well be a bug in FindBin. Right?



More information about the pkg-perl-maintainers mailing list