reload does not shut down lighttpd gracefully

Bug #1707312 reported by Vasya Pupkin on 2017-07-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lighttpd (Ubuntu)

Bug Description

I noticed that /etc/init.d/lighttpd reload kills lighttpd almost instantly. I can manually shut down lighttpd gracefully by sending it SIGINT, so this is an issue somewhere within init.d script.

Here's log message when I call init.d reload:

2017-07-28 22:54:10: (server.c.1558) server stopped by UID = 0 PID = 1
2017-07-28 22:54:10: (log.c.164) server started

Here's log message when I send SIGINT:

2017-07-28 23:30:29: (server.c.1442) [note] graceful shutdown started
2017-07-28 23:30:37: (server.c.1558) server stopped by UID = 0 PID = 16714

Note first line about graceful shutdown. Never happens when reload is done via init.d script.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lighttpd 1.4.35-4ubuntu2
ProcVersionSignature: Ubuntu 4.10.0-26.30~16.04.1-generic 4.10.17
Uname: Linux 4.10.0-26-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Sat Jul 29 01:43:39 2017
InstallationDate: Installed on 2011-04-14 (2297 days ago)
InstallationMedia: Ubuntu-Server 10.04.2 LTS "Lucid Lynx" - Release amd64 (20110211.1)
SourcePackage: lighttpd
UpgradeStatus: Upgraded to xenial on 2016-07-30 (363 days ago)
modified.conffile..etc.lighttpd.conf-available.05-auth.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-accesslog.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-cgi.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-dir-listing.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-evasive.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-evhost.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-expire.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-fastcgi.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-flv-streaming.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-no-www.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-proxy.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-rrdtool.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-simple-vhost.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-ssi.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-ssl.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-status.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-userdir.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.10-usertrack.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.11-extforward.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.15-fastcgi-php.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.90-debian-doc.conf: [deleted]
modified.conffile..etc.lighttpd.conf-available.README: [deleted]
modified.conffile..etc.lighttpd.lighttpd.conf: [inaccessible: [Errno 13] Permission denied: '/etc/lighttpd/lighttpd.conf']

Vasya Pupkin (shadowlmd) wrote :
Vasya Pupkin (shadowlmd) on 2017-07-28
description: updated
Vasya Pupkin (shadowlmd) wrote :

After reading man start-stop-daemon I found the problem.

"... schedule is a list of at least two items separated by slashes (/); each item may be -signal-number or [-]signal-name, which means to send that signal, or timeout, which means to wait that many seconds for processes to exit ..."

"If a schedule is specified, then any signal specified with --signal is ignored"

So a solution would be to remove "--signal INT" and change "--retry=TERM/60/KILL/5" to "--retry=INT/60/KILL/5".

On my system it works as expected after these changes.

The attachment "lighttpd.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers