delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/12/31/07:19:51

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Message-ID: <3C305864.312A66E6@wapme-systems.de>
Date: Mon, 31 Dec 2001 13:21:56 +0100
From: Stipe Tolj <tolj AT wapme-systems DOT de>
Organization: Wapme Systems AG
X-Mailer: Mozilla 4.7 [de]C-CCK-MCD QXW0322b (WinNT; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: Sami Tikka <sami DOT tikka AT welho DOT com>
CC: "cygwin-apps AT cygwin DOT com" <cygwin-apps AT cygwin DOT com>
Subject: Re: Apache/cygwin shutdown problem
References: <3C2FB769 DOT 5030508 AT welho DOT com>

Hi Sami,

> I've been using Apache 1.3.20 and 1.3.22 which I've compiled myself
> under Cygwin and been quite happy with them. Recently, however, there's
> been this problem that is quite irritating:
> 
> I cannot shut down Apache. When I do 'apachectl stop', one of the httpd
> processes turns into '<defunct>' but that is all. All of the other httpd
> processes hang there. In the error_log it says:
> 
> [Mon Dec 31 02:41:37 2001] [warn] child process 1568 still did not exit,
> ending a SIGTERM
> [Mon Dec 31 02:41:37 2001] [warn] child process 1668 still did not exit,
> ending a SIGTERM
> [Mon Dec 31 02:41:41 2001] [error] child process 1568 still did not
> exit, sending a SIGKILL
> [Mon Dec 31 02:41:41 2001] [error] child process 1668 still did not
> exit, sending a SIGKILL
> [Mon Dec 31 02:41:43 2001] [error] could not make child process 1568
> exit, attempting to continue anyway
> [Mon Dec 31 02:41:43 2001] [error] could not make child process 1668
> exit, attempting to continue anyway
> [Mon Dec 31 02:41:43 2001] [info] removed PID file /www/logs/httpd.pid
> (pid=1732)
> [Mon Dec 31 02:41:43 2001] [notice] caught SIGTERM, shutting down

yes, that effect is known to me. It seems Cygwin has problems with
signal passing under high loaded or long-running processes.

Usually Apache will try to use SIGUSR signal to gracefully shutdown
the childs, if this fails for some defined timeout, the parent process
(`cat <path>/logs/httpd.pid`) will send "stronger" singnals, so
SIGTERM and SIGKILL are send, which then should shutdown the child
processes. 

It takes some seconds to perform this, so that's why a "apachectl
restart" usually fails, because it does not check if the processes
have gone away before "starting" again.

Usually it is eneough to 

 $ kill -TERM `cat <path>/logs/httpd.pid`

to stop all processes, which is in fact the same thing "apachectl
stop" does.

> Usually I can kill the httpd processes using Windows 2000 Task Manager.
> Sometimes Task Manager just says "Access denied" and the process just
> hangs there. The only way I've managed to get rid of the hanging process
> is to reboot.

I have never experienced that kind of trouble with the task manager,
at least not with the apache 1.3 branch which uses prefork to scale.

Only the new 2.0 branch with worker mpm, which uses pthreads for
Cygwin has "stopped" my machine (Win2k WS) one time, so that I even
could not call the ctrl-alt-del screen.

> I'm developing an Apache module so I'm doing a lot of starting and
> stopping of Apache.

What about doing

  $ kill -HUP `cat <path>/logs/httpd.pid`

which will reload the configuguration and restart gracefully? Wouldn't
that help?

> I'm fairly certain Apache behaviour changed when I upgraded Cygwin.dll
> from 1.3.5 to 1.3.6, so it seems like a Cygwin problem. I'm just
> emailing you first to ask if you have seen this same problem or heard of
> anyone else having the same problem?

That would be interesting to the Cygwin developer folks, so I'll CC to
them. Chris, Robert are you having noticed that yet?

To be honoust I'm running Cygwin 1.3.5 and not yet 1.3.6, so I can not
confirm that effect, but as I have stated in a couple of posting
regarding Apache's "hanging effect in keep-alive mode" this seems to
be Cygwin specific.

> The problem is quite easy to replicate:
> 
> /www/bin/apachectl start
> /www/bin/apachectl stop
> 
> And the httpd processes just won't die.

have you waited for a couple of seconds, let say 20-30 sec. to see if
they die? Sometimes it takes some time...

> I've compiled Apache 1.3.22 like this:
> ./configure --prefix=/www
> make
> make install

which means you have build a static version, that should be working
fine.

> Another question: I tried to compile a version of Apache where I can use
> LoadModule to load DLLs but failed to build it. The cygwin.html file in
> the manual says you need a patched ld.exe. Is that information still valid?

No, the patched ld.exe was required before we had offficial
--auto-load support in binutils's ld. That is obsolet for Cygwin 1.3.6
and up. -- Thanks for the reminder, I will update this in the Apache
for Cygwin docs for the next 1.3 branch release.

Regards,
Stipe

tolj AT wapme-systems DOT de
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info AT wapme-systems DOT de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019