[mp2] Overwrites and truncates Apache process name

Jonathan Wiltshire <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hi,

Current versions of mod_perl2 include the following line in
src/modules/perl/modperl_config.c:

187     /* make sure httpd's argv[0] is the first argument so $0 is
188      * correctly connected to the real thing */
189     modperl_config_srv_argv_push(s->process->argv[0]);

Without mod_perl2, a running Apache process has a name "apache2" in
/proc/$$/status (this is on a Debian machine, so on other distributions
that name might differ).

With mod_perl2 loaded, the name is "/usr/sbin/apach" - note the
additional path information that causes the name to be truncated.

This causes us (Tiger Computing) some difficulties in our monitoring of
Apache with mod_perl loaded, and users elsewhere have reported similar
experiences [1][2]

A bug was reported to Fedora[3] in March 2012, and a patch applied[4],
but it's not clear whether this was ever reported upstream. The patch
uses s->process->short_name instead.

Please could you comment on
a) the problem, and whether it's a genuine bug
b) the patch that Fedora applied

1: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754702
2:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1008385
3: https://bugzilla.redhat.com/show_bug.cgi?id=782369
4: https://bugzilla.redhat.com/attachment.cgi?id=567625&action=diff

Thanks,

-- 
Jonathan Wiltshire
Tiger Computing Ltd
"Linux for Business"

Tel: 01600 483 484
Web: http://www.tiger-computing.co.uk
Follow us on Facebook: http://www.facebook.com/TigerComputing

Registered in England. Company number: 3389961
Registered address: Wyastone Business Park,
 Wyastone Leys, Monmouth, NP25 3SR
signature.asc (application/pgp-signature, 880 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBAgAGBQJT6Mg8AAoJEL0egz/nY20JPI0P/1FMjRnUjf5ffzeDLNA9Mvrk
Kw7eMNk6WrUkwIzCdbo8ahQdoWxLMdS8DZ3SkkFZonRvNzi22ppMX7SkImMEshdd
JShVY1k3hhRFYBLOWG1I+cDVokM4aayaLGNEQP87dJYDVnrtKuJCrSL2dxw8pLCU
hEl1oguz9or+Ojmps9Wi08VK5pJA8l5lYj26CZA8Lmey/Ix2Df0l4XcvlB+YI+/H
WZDmi6cNEj7Qp1X8bbOWx1joCtSIjzD9sbMEr3M3verzKAm2sP1xiKONdrR1uH1b
YNH7Kd+E1o9sttgfHIe9SGI7GjvVn1KM1Y2UrDGphoDBqD5epF2v0JXxRWzbJjgH
uIgPp5bMqwL1efBEiVXsM7mPLp+JqyI/kvuyDw79jP+LB+BQ3jC25inmzNrh78MG
+q6GdH3tdzoMblHWE7xRTHkq2RN1daiD4AWKrvy2zF6btRIEMZt5YIucB6IMsgki
us6PO7zT4+CU2ok1o9fFEm6wCpdnqHiJnSUTaNA9wm3q/ZqXuKHZDTWevEMr0Clm
fNdDA7F5qjec/XG0KEKTeJwq+rk3a8dGQMKDYS0dVpmhih5xwLV9DCnOE3E0Xs49
bpaBPZLzkereYGYEVY+1vDNAVKgIhcdTaNDNSExy4E3gejK50LJaogl9RbokhWtR
SyevhzFonRXc24fmyzjs
=UqEK
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.