Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803821 - www-servers/lighttpd: | * start-stop-daemon: 1 process refused to stop
Summary: www-servers/lighttpd: | * start-stop-daemon: 1 process refused to stop
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Herb Miller Jr.
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-24 11:37 UTC by jhon
Modified: 2022-07-24 01:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jhon 2021-07-24 11:37:02 UTC
/etc/init.d/lighttpd stop function doesn't cover a case where there's more than one lighttpd process, i.e. by using workers for example.
I elaborated here: https://forums.gentoo.org/viewtopic-t-1139476.html
Anyways, my offered solution is to replace the stop function line:
start-stop-daemon --stop --quiet --pidfile "${LIGHTTPD_PID}"
with the following line perhaps:
start-stop-daemon --stop --quiet --name lighttpd.
Comment 1 Herb Miller Jr. 2021-09-16 02:55:30 UTC
My concern with that is the possibility of start-stop-daemon killing things that are not actually lighttpd, though it may be best if someone with more experience than myself chime in on this one.

I think this is worth marking confirmed, because it is true that the current infrastructure can't handle multiple lighttpd processes.
Comment 2 jhon 2021-09-17 11:55:00 UTC
yeah, i know my suggested solution probably doesn't holds the highest standard, I'm just not really well versed with shell/POSIX to suggest any better.
probably, a more ideal solution would be to get all pIDs of all lighttpd processes running (including worker processes) and then the restart function may just loop over all of them or something..
if it's possible, i don't know how to do so from the init.d script though...
Comment 3 gstrauss 2022-01-21 11:31:29 UTC
> /etc/init.d/lighttpd stop function doesn't cover a case where there's more than one lighttpd process, i.e. by using workers for example.

Why not?  Do you have evidence of this?

If multiple lighttpd workers are used, then there is a primary lighttpd process that monitors those workers.  When the primary lighttpd process is signalled, e.g. from /etc/init.d/lighttpd stop, then the primary lighttpd process propagates the signal to the lighttpd workers.

Please review what signals are being sent to lighttpd and the expected behavior of those signals: https://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource#signals
Comment 4 gstrauss 2022-03-02 09:57:48 UTC
As noted by Sam James, this is likely addressed in https://bugs.gentoo.org/626688
Comment 5 Larry the Git Cow gentoo-dev 2022-07-24 01:49:01 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f561442e589e60f79873b3f4db5e9935970ac46

commit 2f561442e589e60f79873b3f4db5e9935970ac46
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-24 01:48:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-24 01:48:52 +0000

    www-servers/lighttpd: drop 1.4.55-r102, 1.4.58-r2, 1.4.59-r2
    
    Bug: https://bugs.gentoo.org/851234
    Bug: https://bugs.gentoo.org/830691
    Bug: https://bugs.gentoo.org/803821
    Signed-off-by: Sam James <sam@gentoo.org>

 www-servers/lighttpd/Manifest                      |   3 -
 www-servers/lighttpd/files/conf/lighttpd.conf      | 279 ---------------------
 .../files/lighttpd-1.4.59-nspr-header.patch        |  16 --
 www-servers/lighttpd/files/lighttpd.initd          |  79 ------
 www-servers/lighttpd/lighttpd-1.4.55-r102.ebuild   | 247 ------------------
 www-servers/lighttpd/lighttpd-1.4.58-r2.ebuild     | 268 --------------------
 www-servers/lighttpd/lighttpd-1.4.59-r2.ebuild     | 242 ------------------
 www-servers/lighttpd/metadata.xml                  |   2 -
 8 files changed, 1136 deletions(-)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-24 01:49:11 UTC
(In reply to gstrauss from comment #4)
> As noted by Sam James, this is likely addressed in
> https://bugs.gentoo.org/626688

Thanks for all the help!