[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /proc/*/comm



Hi Bengt,

bol wrote:
> I'm newbie her and hope it`s right list... : /

Depends. It's not meant for support but for packaging issues. See also
https://lists.debian.org/debian-apache/.

For support questions, I think debian-user@lists.debian.org or
debian-user-swedish@lists.debian.org are probably the best starting
point in your case.

Nevertheless I was curious enough to see how that looks on my servers:

> I have two Wheezy servers running the distributed Apache server.
> 
> The are showing wrong /proc/*/comm entries:
> 
> grep apach  /proc/*/comm
> /proc/14566/comm:*/usr/sbin/apach*
> /proc/18832/comm:/usr/sbin/apach
> /proc/18846/comm:/usr/sbin/apach
> /proc/18847/comm:/usr/sbin/apach
> /proc/18903/comm:/usr/sbin/apach
> /proc/18912/comm:/usr/sbin/apach
> /proc/18913/comm:/usr/sbin/apach
> /proc/18914/comm:/usr/sbin/apach
> /proc/19465/comm:/usr/sbin/apach
> /proc/2290/comm:/usr/sbin/apach
> /proc/9491/comm:/usr/sbin/apach
> 
> On two other Wheezy servers running the distributed Apache server
> are showing "correct" entries:
> 
> grep apach  /proc/*/comm
> /proc/12523/comm:*apache2*
> /proc/12561/comm:apache2
> /proc/19280/comm:apache2
> /proc/24392/comm:apache2
> /proc/26435/comm:apache2
> /proc/27417/comm:apache2
> /proc/3006/comm:apache2
> /proc/4425/comm:apache2
> /proc/8835/comm:apache2
> /proc/8853/comm:apache2
> /proc/8908/comm:apache2

The main differences seems to be that once the path is included and
once not. The truncating may just come with the longer strings at some
point. https://www.kernel.org/doc/Documentation/filesystems/proc.txt
says 16 characters maximum.

> On all servers:
> /etc/debian_version >> 7.1

I checked 8 of my Wheezy based Apache servers. Actually I also checked
a bunch of Squeeze based Apache servers, but they don't have "comm"
entries unless they run kernels from the backports repository.

But all my servers belong to the type without path.

And they showed something else: None of them had asterisks anywhere in
the value. Both examples from your servers show "*" at the beginning
and end of the first value. Actually no process at all had "*"
anywhere in there. (Or was that some copy & paste issue?)

I reformated the following for better readability:

> On the "/usr/sbin/apach" servers:
> 
> # dpkg -l |grep apache
> ii  apache2			   2.2.22-13       i386 Apache HTTP Server metapackage
> ii  apache2-mpm-prefork	   2.2.22-13  	   i386 Apache HTTP Server - traditional non-threaded model
> ii  apache2-utils 		   2.2.22-13  	   i386 utility programs for webservers
> ii  apache2.2-bin 		   2.2.22-13  	   i386 Apache HTTP Server common binary files
> ii  apache2.2-common 		   2.2.22-13  	   i386 Apache HTTP Server common files
> ii  libapache-asp-perl 	   2.62-1     	   all  perl Apache::ASP - Active Server Pages for Apache with mod_perl
> ii  libapache-pom-java 	   10-2       	   all  Maven metadata for all Apache Software projects
> ii  libapache2-mod-ldap-userdir  1.1.19-1   	   i386 Apache module that provides UserDir lookups via LDAP
> ii  libapache2-mod-perl2 	   2.0.7-3    	   i386 Integration of perl with the Apache2 web server
> ii  libapache2-mod-php5	   5.4.4-14+deb7u3 […]
> 
> 
> On the correct "apache2" servers:
> # dpkg -l |grep apache
> ii  apache2                      2.2.22-13        i386  Apache HTTP Server metapackage
> ii  apache2-mpm-prefork 	   2.2.22-13  	    i386  Apache HTTP Server - traditional non-threaded model
> ii  apache2-utils 		   2.2.22-13  	    i386  utility programs for webservers
> ii  apache2.2-bin 		   2.2.22-13  	    i386  Apache HTTP Server common binary files
> ii  apache2.2-common 		   2.2.22-13  	    i386  Apache HTTP Server common files
> ii  libapache2-mod-php5 	   5.4.4-14+deb7u3  i386  server-side, HTML-embedded scripting language (Apache 2 module)
> 
> Some one how has a clue?

The only difference seems to be Perl and Java stuff on the
"/usr/sbin/apach" servers. The remainder looks identical.

The only listed package I can imagine to fiddle around that deep in
the process-management is mod_perl (aka libapache2-mod-perl2), but
since some of my servers have mod_perl and others haven't and I didn't
see any difference between them. But since IIRC the perl interpreter
runs inside the Apache processes, it maybe that one of the Perl
scripts or modules loaded fiddle around there. (I though think that
would be very uncommon, especially since /proc/*/comm is a relatively
new feature.)

Next idea I had were the environment variables present in
/etc/apache2/envvars. They are used inside /etc/apache2/apache2.conf
and other files, but may not be used of the changes from the packages
have not been merged into the existing local config. They were
introduced with Debian Squeeze IIRC. So in case the server with the
path name in /proc/*/comm has been upgraded from Lenny to Squeeze to
Wheezy, this may have influenced something like search path vs
hardcoded path. But then again, "sbin" doesn't show up there.

But then again the only place where sbin shows up literally is in the
init.d script:

# fgrep -r sbin /etc/init.d/apache2  /etc/default/apache2 /etc/apache2/
/etc/init.d/apache2:    APACHE_HTTPD=/usr/sbin/apache2
/etc/init.d/apache2:APACHE2CTL="$ENV /usr/sbin/apache2ctl"
/etc/init.d/apache2:HTCACHECLEAN="$ENV /usr/sbin/htcacheclean"
#

The according code snippet is:

APACHE_HTTPD=$(. $APACHE_ENVVARS && echo $APACHE_HTTPD)
if [ -z "$APACHE_HTTPD" ] ; then
        APACHE_HTTPD=/usr/sbin/apache2
fi

But since this (a value with path) is the default and all my Apache
servers didn't show the path in /proc/*/comm, I don't think this can
be the reason for your phenomenon.

And now I'm out of ideas, too. And not being able to reproduce it
doesn't make guessing easier…

BTW: How did you stumble upon this? Does this cause problems
elsewhere?

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


Reply to: