NetBSD Problem Report #54295

From root@labma.ru  Thu Jun 13 21:15:35 2019
Return-Path: <root@labma.ru>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2E7107A180
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Jun 2019 21:15:35 +0000 (UTC)
Message-Id: <20190613195633.8153225DB9@star.labma.ru>
Date: Thu, 13 Jun 2019 22:56:33 +0300 (MSK)
From: kab00m@labma.ru
Reply-To: kab00m@labma.ru
To: gnats-bugs@NetBSD.org
Subject: www/lighttpd reload function is not working
X-Send-Pr-Version: 3.95

>Number:         54295
>Category:       pkg
>Synopsis:       www/lighttpd reload function is not working
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    nia
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 13 21:20:00 +0000 2019
>Closed-Date:    Wed Nov 13 12:35:01 +0000 2019
>Last-Modified:  Wed Nov 13 12:35:01 +0000 2019
>Originator:     Dima Veselov
>Release:        NetBSD 8.1_STABLE
>Organization:
LMA
>Environment:
System: NetBSD star 8.1_STABLE NetBSD 8.1_STABLE (Blaze) #6: Mon Jun 10 10:45:28 MSK 2019 kab00m@almaz:/export/build/obj/amd64/sys/arch/amd64/compile/Blaze amd64
Architecture: x86_64
Machine: amd64
>Description:
	Reload function for lighttpd does not work. It is known for lighttpd to be used with lighttpd-angel binary to make it work. See lighttpd-angel(8).
>How-To-Repeat:
	Install lighttpd, change config, run /etc/rc.d/lighttpd reload
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->nia
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Fri, 14 Jun 2019 11:54:28 +0000
Responsible-Changed-Why:
Nia, you touched it last :) Do you have any ideas?
(Feel free to unassign if not.)


From: nia <nia@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org,
	bsiegert@NetBSD.org, kab00m@labma.ru
Subject: Re: pkg/54295 (www/lighttpd reload function is not working)
Date: Fri, 14 Jun 2019 12:46:40 +0000

 On Fri, Jun 14, 2019 at 11:54:29AM +0000, bsiegert@NetBSD.org wrote:
 > Synopsis: www/lighttpd reload function is not working
 > 
 > Responsible-Changed-From-To: pkg-manager->nia
 > Responsible-Changed-By: bsiegert@NetBSD.org
 > Responsible-Changed-When: Fri, 14 Jun 2019 11:54:28 +0000
 > Responsible-Changed-Why:
 > Nia, you touched it last :) Do you have any ideas?
 > (Feel free to unassign if not.)
 > 
 > 
 >

 I don't think it could work without lighttpd-angel.

 According to `man rc.subr`, the reload command defaults to sending
 SIGHUP.

 When lighttpd-angel is told to reload lighttpd with SIGHUP, what it
 actually does is send SIGINT to the lighttpd process, wait 5
 microseconds (!), and spawn another process.

 I don't have a working lighttpd config right now, but it seems like
 it would be a good idea to make our init script spawn the angel
 process instead.

 Then again, looking in other packaging systems, they're also sending
 SIGHUP to lighttpd and expecting it to reload. Hm...

From: Dima Veselov <kab00m@labma.ru>
To: gnats-bugs@netbsd.org
Cc: nia@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/54295 (www/lighttpd reload function is not working)
Date: Fri, 14 Jun 2019 18:58:04 +0300

 On Fri, Jun 14, 2019 at 12:50:01PM +0000, nia wrote:
 >  
 >  I don't think it could work without lighttpd-angel.
 >  
 >  According to `man rc.subr`, the reload command defaults to sending
 >  SIGHUP.
 >  
 >  When lighttpd-angel is told to reload lighttpd with SIGHUP, what it
 >  actually does is send SIGINT to the lighttpd process, wait 5
 >  microseconds (!), and spawn another process.
 >  
 >  I don't have a working lighttpd config right now, but it seems like
 >  it would be a good idea to make our init script spawn the angel
 >  process instead.
 >  
 >  Then again, looking in other packaging systems, they're also sending
 >  SIGHUP to lighttpd and expecting it to reload. Hm...

 My quick research on this topic found that one day it worked
 and most of systems missed the point when SIGHUP stopped 
 working on lighttpd binary itself. pkgsrc may be the first
 one fixing that :-).

 Also have to note that SIGHUP is graceful restart but reload is
 done by SIGUSR1 instead.

From: "Niclas Rosenvik" <nros@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54295 CVS commit: pkgsrc/www/lighttpd/files
Date: Wed, 13 Nov 2019 11:53:29 +0000

 Module Name:	pkgsrc
 Committed By:	nros
 Date:		Wed Nov 13 11:53:29 UTC 2019

 Modified Files:
 	pkgsrc/www/lighttpd/files: lighttpd.sh

 Log Message:
 Fix reload of lighttpd config files

 lighttpd uses the USR1 signal to reload config files as pointed out in
 PR pkg/54295. Tested and it works.
 Closes PR pkg/54295 .


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/www/lighttpd/files/lighttpd.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Closing this PR as it is fixed. ok'ed by nia.
State-Changed-From-To: open->closed
State-Changed-By: nros@NetBSD.org
State-Changed-When: Wed, 13 Nov 2019 12:35:01 +0000
State-Changed-Why:
The issue has been fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 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.