You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jeremy Tinley <jt...@unirez.com> on 2003/01/08 17:38:41 UTC
[users@httpd] Semaphores and "child process #### still did not exit"
Howdy,
I've got Apache 1.3.27 compiled with mod_ssl-2.8.12-1.3.27 on a Redhat 8.0
machine. We rsync our content to this server and then /etc/rc.d/init.d/httpd
restart it to load module changes into mod_perl. All this works fine.
I noticed yesterday that apache had stopped. Checking the log like a good
sysadmin does, I found:
semget: No space left on device
A little bit of googling finds that this means I'm out of semaphores and an
ipcs -s confirms this. I've used my linux limit of 128. I do an ipcrm to
remove the offending semaphores and I'm good to go again.
Today my quest is to find out why these are hanging around after I restart
Apache. More log research shows (apologies for the line wrapping):
[Tue Jan 7 16:59:30 2003] [warn] child process 2807 still did not exit,
sending a SIGTERM
[Tue Jan 7 16:59:30 2003] [warn] child process 2810 still did not exit,
sending a SIGTERM
[Tue Jan 7 16:59:30 2003] [warn] child process 2795 still did not exit,
sending a SIGTERM
[Tue Jan 7 16:59:30 2003] [warn] child process 2797 still did not exit,
sending a SIGTERM
[Tue Jan 7 16:59:30 2003] [warn] child process 2798 still did not exit,
sending a SIGTERM
[Tue Jan 7 16:59:30 2003] [warn] child process 2811 still did not exit,
sending a SIGTERM
[Tue Jan 7 16:59:35 2003] [notice] Apache configured -- resuming normal
operations
[Tue Jan 7 16:59:35 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
This suggests that when I issue a restart, the child processes are not
existing and are getting a SIGTERM, potentially causing my semaphore problem.
I can reproduce these messages on every restart. I also increment my
semaphores for apache by 1 every restart. Looks like I found a link.
Now comes the fun part. Why are my processes not exiting cleanly? I've tried
the rc script as well as apachectl. Same result.
Apache configured with the following:
./configure \
"--with-layout=Apache" \
"--prefix=/usr/local/httpd-1.3.27/" \
"--enable-module=so" \
"--enable-module=all" \
"--enable-shared=max" \
"--activate-module=src/modules/perl/libperl.a" \
"--activate-module=src/modules/ssl/libssl.a" \
"$@"
ipcs output after numerous restarts:
# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems status
0x00000000 4325376 apache 600 1
0x00000000 4358145 apache 600 1
0x00000000 4390914 apache 600 1
0x00000000 4423683 apache 600 1
0x00000000 4456452 apache 600 1
0x00000000 4489221 apache 600 1
0x00000000 4521990 apache 600 1
0x00000000 4554759 apache 600 1
0x00000000 4587528 apache 600 1
0x00000000 4620297 apache 600 1
0x00000000 4653066 apache 600 1
0x00000000 4751371 apache 600 1
0x00000000 4784140 apache 600 1
0x00000000 4816909 apache 600 1
0x00000000 4849678 apache 600 1
0x00000000 4882447 apache 600 1
Here's the log output of a complete start and stop with LogLevel debug:
[Wed Jan 8 10:32:50 2003] [info] mod_ssl:Compat: MAPPED 'SSLEnable' =>
'SSLEngine on'
[Wed Jan 8 10:32:50 2003] [info] created shared memory segment #4947968
[Wed Jan 8 10:32:50 2003] [notice] Apache configured -- resuming normal
operations
[Wed Jan 8 10:32:50 2003] [info] Server built: Dec 14 2002 17:06:15
[Wed Jan 8 10:32:50 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Wed Jan 8 10:33:00 2003] [warn] child process 20750 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20751 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20752 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20753 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20754 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20755 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20756 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20757 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20758 still did not exit,
sending a SIGTERM
[Wed Jan 8 10:33:00 2003] [warn] child process 20759 still did not exit,
sending a SIGTERM
Yes, there is a temporary workaround of increasing the semaphores in
/etc/sysctl. I can also setup some sort of cron process to do a ipcs -s |
grep -c apache, if the result is > 150, stop apache and remove. Or I could go
even simpler and include the ipcrm command in the apache restart script.
I would much rather have an Apache that behaves itself. :)
-J
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Semaphores and "child process #### still did not exit"
Posted by Jeremy Tinley <jt...@unirez.com>.
And oddly enough, a barebones installation of Apache does not exhibit this
problem. It appears to manifest itself when I compile in mod_ssl as a DSO.
Guess I'll take this to modssl-users. :)
-J
-----Original Message-----
From: Jeremy Tinley [mailto:jtinley@unirez.com]
Sent: Wednesday, January 08, 2003 11:45 AM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Semaphores and "child process #### still did not
exit"
Compiling Apache with MM 1.2.2 did not change the result. Both the extra
semaphores and SIGTERMed processes are still present.
-J
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Semaphores and "child process #### still did not exit"
Posted by Jeremy Tinley <jt...@unirez.com>.
Compiling Apache with MM 1.2.2 did not change the result. Both the extra
semaphores and SIGTERMed processes are still present.
-J
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org