NetBSD Problem Report #40141

From www@NetBSD.org  Tue Dec  9 11:45:12 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 1296F63B89C
	for <gnats-bugs@gnats.netbsd.org>; Tue,  9 Dec 2008 11:45:12 +0000 (UTC)
Message-Id: <20081209114511.B867F63B121@narn.NetBSD.org>
Date: Tue,  9 Dec 2008 11:45:11 +0000 (UTC)
From: gavan@coolfactor.org
Reply-To: gavan@coolfactor.org
To: gnats-bugs@NetBSD.org
Subject: apache restart not reliable
X-Send-Pr-Version: www-1.0

>Number:         40141
>Category:       pkg
>Synopsis:       apache restart not reliable
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 09 11:50:00 +0000 2008
>Closed-Date:    Sun Dec 19 01:52:06 +0000 2021
>Last-Modified:  Sun Dec 19 01:52:06 +0000 2021
>Originator:     Gavan Fantom
>Release:        pkgsrc-current
>Organization:
>Environment:
>Description:
This report is about www/apache. I've most recently experienced this with apache-1.3.41, although this has been a longstanding problem with this package.

/etc/rc.d/apache restart will fail to restart apache if the server takes too long to stop. The server is first stopped, then it is started again, but the start action can occur before the server has actually finished stopping.

The start action then presents an error (already running) and does nothing, leaving only an apache which is about to exit.

>How-To-Repeat:
Set up apache such that it will take some time to exit. Then try restarting it with the rc script. Watch it fail to restart some of the time.

>Fix:
I believe this is down to the stop action not waiting for the server to completely exit. That waiting could be made more robust. Alternatively (or in addition) the restart action could be made to call directly into apachectl restart, which appears to do the right thing.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: obache@NetBSD.org
State-Changed-When: Tue, 09 Dec 2008 12:16:12 +0000
State-Changed-Why:
Probably same as PR 39713 for apache22.
Can you try modification for rc.d/apache noted in the PR?


From: Gavan Fantom <gavan@coolfactor.org>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, 
 gnats-admin@netbsd.org, obache@NetBSD.org
Subject: Re: pkg/40141 (apache restart not reliable)
Date: Tue, 09 Dec 2008 12:25:10 +0000

 obache@NetBSD.org wrote:
 > Synopsis: apache restart not reliable
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: obache@NetBSD.org
 > State-Changed-When: Tue, 09 Dec 2008 12:16:12 +0000
 > State-Changed-Why:
 > Probably same as PR 39713 for apache22.
 > Can you try modification for rc.d/apache noted in the PR?

 After adding pidfile="/var/run/httpd.pid", I still get:

 # /etc/rc.d/apache restart
 /usr/pkg/sbin/apachectl stop: httpd stopped
 /usr/pkg/sbin/apachectl start: httpd (pid 22253) already running

 -- 
 Gillette - the best a man can forget

State-Changed-From-To: feedback->open
State-Changed-By: obache@NetBSD.org
State-Changed-When: Tue, 09 Dec 2008 13:28:31 +0000
State-Changed-Why:
rc.d/apache has custom {start,stop}_cmd,  so not check pids automatically.
Mayby PR 39713 is also not fixed yet.


From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/40141 (apache restart not reliable)
Date: Thu, 19 Feb 2009 22:00:38 +0900

 On Tue, 09 Dec 2008 21:30:04 +0900, Gavan Fantom <gavan@coolfactor.org> wrote:

 > The following reply was made to PR pkg/40141; it has been noted by GNATS.
 >  After adding pidfile="/var/run/httpd.pid", I still get:
 > 
 >  # /etc/rc.d/apache restart
 >  /usr/pkg/sbin/apachectl stop: httpd stopped
 >  /usr/pkg/sbin/apachectl start: httpd (pid 22253) already running

 Can you try again with also adding following line?

 stop_postcmd="run_rc_command poll"

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 01 Apr 2009 04:27:52 +0000
State-Changed-Why:
Another question was asked.


State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 31 Oct 2012 20:25:24 +0000
State-Changed-Why:
feedback timeout (since 2009) -- this needs someone able/willing to
test apache 1.3.


State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 19 Dec 2021 01:52:06 +0000
State-Changed-Why:
apache 1.3 was removed aeons ago


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.