Page 1 of 1

Problem with autofs and httpd

Posted: 2012/09/06 04:08:09
by kul3ana
Hi All,

We have a problem with autofs and httpd services not being able to be killed with the init.d scripts. After booting up both services start normally and all is well. I can change directory to an auto mounted directory and I can browse to various web pages on the server. If however I want to restart either service or shutdown either service, it cannot be done without sending a SIGKILL to the respective processes. When I do a "service httpd stop" all processes stop except for the second spawned process.

# ps -elf | grep http
5 S root 3037 1 0 80 0 - 72839 poll_s 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3039 3037 0 80 0 - 72851 autofs 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3040 3037 0 80 0 - 72839 inet_c 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3041 3037 0 80 0 - 72839 inet_c 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3042 3037 0 80 0 - 72839 inet_c 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3043 3037 0 80 0 - 72839 inet_c 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3044 3037 0 80 0 - 72839 inet_c 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3045 3037 0 80 0 - 72839 inet_c 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3046 3037 0 80 0 - 72839 inet_c 17:59 ? 00:00:00 /usr/sbin/httpd
5 S apache 3047 3037 0 80 0 - 72839 inet_c 17:59 ? 00:00:00 /usr/sbin/httpd

# service httpd stop
Stopping httpd: [ OK ]
# ps -elf | grep http
5 S apache 3039 1 0 80 0 - 72851 autofs 17:59 ? 00:00:00 /usr/sbin/httpd
0 S root 3088 2028 0 80 0 - 25809 pipe_w 17:59 pts/1 00:00:00 grep http

As you can see it is the second process that is in a weird state. The WCHAN is listed as autofs. I don't know what the relation of autofs is to httpd. If I try to stop the autofs service, it will keep failing. The only way to kill the automount process is to send a kill -9 (SIGKILL) to the process.

This is a fresh install and I configured very little. before this. The /etc/httpd/conf/httpd.conf is the original that comes with the system. The auto.master has the following inside.

/home yp:home.indirect retry=3 --timeout=60

Even though I cannot kill these things, they keep operating fine. I can keep changing to automounted directories and I can keep sending request to the webserver.

Has anyone else seen something similar? I can create a workaround by implmenting SIGKILL's in the init.d scripts, but figured someone else must have seen something like it. Or its a bug of some sort. Any insight is greatly appreciated.

Re: Problem with autofs and httpd

Posted: 2012/09/07 00:18:27
by kul3ana
In doing more experimenting on this issue I've found it is definitely something about the yp(nis) map that autofs is using. I changed my auto.master file so that it used a file as the map and it never had a problem. Only when I add in the yp:home.indirect does it have a problem.