Devuan bug report logs - #499
Smokeping service unable to stop/restart

version graph

Package: smokeping; Maintainer for smokeping is (unknown); Source for smokeping is src:smokeping.

Reported by: ShadowM00n <shadowm00n@airmail.cc>

Date: Mon, 27 Jul 2020 18:03:02 UTC

Severity: normal

Tags: debian

Merged with 699

Found in versions 2.7.3-3, 2.7.3-2

Fixed in version 2.7.3-4

Done: Mark Hindley <mark@hindley.org.uk>

Forwarded to https://bugs.debian.org/989354

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#499; Package smokeping. (Mon, 27 Jul 2020 18:03:02 GMT) (full text, mbox, link).


Acknowledgement sent to ShadowM00n <shadowm00n@airmail.cc>:
New bug report received and forwarded. Copy sent to devuan-dev@lists.dyne.org. (Mon, 27 Jul 2020 18:03:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: ShadowM00n <shadowm00n@airmail.cc>
To: submit@bugs.devuan.org
Subject: Smokeping service unable to stop/restart
Date: Mon, 27 Jul 2020 12:46:15 -0500
Package: smokeping
Version: 2.7.3-2

First-time submitter, so please excuse and correct me on any procedural 
errors on my part.

Basically, the current version of smokeping's init service quietly fails 
to stop smokeping, and then subsequently fails to restart it because the 
process is still running.

My understanding is that between ASCII and Beowulf the service was 
altered in an attempt to improve security. In ASCII, it checked only 
that a process with a saved PID existed; in Beowulf it also tries to 
compare the invocation string to the program string in the process list. 

While this seems a reasonable idea for most daemons, smokeping seems to 
be a bit of an exception -- it runs under an interpreter (perl), and as 
such the stored PID refers to the perl process launching it; naturally, 
the process string differs from the invocation, being e.g.
"/usr/bin/perl /usr/sbin/smokeping --config=/etc/smokeping/config" while 
being launched as "/usr/sbin/smokeping --config=/etc/smokeping/config".

Given this complication, my current personal setup, and my suggestion, 
is to instead check the owner of the process against the $DAEMON_USER 
when stopping, as this is configured to be a package-specific user 
called "smokeping":

< start-stop-daemon --oknodo --stop --retry 3 --quiet --pidfile $PIDFILE --exec $DAEMON --signal 15
> start-stop-daemon --oknodo --stop --retry 3 --quiet --pidfile $PIDFILE --user $DAEMON_USER --signal 15

This seems to work well for me, though I would certainly not be opposed 
to any other working method if this is less than ideal for some reason.

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#499; Package smokeping. (Tue, 28 Jul 2020 10:18:01 GMT) (full text, mbox, link).


Message #8 received at 499@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: ShadowM00n <shadowm00n@airmail.cc>, 499@bugs.devuan.org
Subject: Re: bug#499: Smokeping service unable to stop/restart
Date: Tue, 28 Jul 2020 11:04:04 +0100
Control: tags -1 debian

On Mon, Jul 27, 2020 at 12:46:15PM -0500, ShadowM00n wrote:
> Package: smokeping
> Version: 2.7.3-2
> 
> First-time submitter, so please excuse and correct me on any procedural 
> errors on my part.

Thanks for taking the time to report this.

> Basically, the current version of smokeping's init service quietly fails 
> to stop smokeping, and then subsequently fails to restart it because the 
> process is still running.
> 
> My understanding is that between ASCII and Beowulf the service was 
> altered in an attempt to improve security. In ASCII, it checked only 
> that a process with a saved PID existed; in Beowulf it also tries to 
> compare the invocation string to the program string in the process list. 

Your analysis seems resonable.

In Devuan this package is used directly from Debian without recompilation. In
general for packages in that category, the bug reports should go to Debian's BTS
to be fixed there as the bug will also be present in Debian.

Please could you report to submit@bugs.debian.org? Once you have we can add the
forwarded bug number/URL here.

Thanks.

Mark


Added tag(s) debian. Request was from Mark Hindley <mark@hindley.org.uk> to 499-submit@bugs.devuan.org. (Tue, 28 Jul 2020 10:18:03 GMT) (full text, mbox, link).


Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#499; Package smokeping. (Tue, 28 Jul 2020 18:03:02 GMT) (full text, mbox, link).


Acknowledgement sent to ShadowM00n <shadowm00n@airmail.cc>:
Extra info received and forwarded to list. Copy sent to devuan-dev@lists.dyne.org. (Tue, 28 Jul 2020 18:03:04 GMT) (full text, mbox, link).


Message #15 received at 499@bugs.devuan.org (full text, mbox, reply):

From: ShadowM00n <shadowm00n@airmail.cc>
To: Mark Hindley <mark@hindley.org.uk>, 499@bugs.devuan.org
Subject: Re: bug#499: Smokeping service unable to stop/restart
Date: Tue, 28 Jul 2020 12:45:04 -0500
On 2020 Jul 28 11:04, Mark Hindley wrote:
> In Devuan this package is used directly from Debian without recompilation. In
> general for packages in that category, the bug reports should go to Debian's BTS
> to be fixed there as the bug will also be present in Debian.
> 
> Please could you report to submit@bugs.debian.org? Once you have we can add the
> forwarded bug number/URL here.

I was going to do so, but I don't think this actually affects Debian.

I wanted to be sure before filing a bug with them, so I set up two VMs, 
one with stock Buster and one with stock Beowulf, both installed from 
netinstall images and without a DE. I found that despite the init files 
being identical (confirmed with md5sum) and the versions of both 
packages being 2.7.3-2 (confirmed with dpkg -s smokeping | grep 
Version), the behaviour is not -- the service actually stops correctly 
on Debian and fails to stop on Beowulf. I took a side-by-side screenshot 
showcasing all of this for reference. I can include it if it's deemed 
useful, though I'm not sure it is beyond merely confirming what I just 
wrote.

I am now uncertain how accurate my earlier analysis was given that the 
Debian system worked without my fix. Any suggestions on what else should 
be looked at?

Merged 499 Request was from Mark Hindley <mark@hindley.org.uk> to control@bugs.devuan.org. (Wed, 11 Jan 2023 12:12:01 GMT) (full text, mbox, link).


Marked as found in versions 2.7.3-3. Request was from Mark Hindley <mark@hindley.org.uk> to control@bugs.devuan.org. (Wed, 11 Jan 2023 12:12:04 GMT) (full text, mbox, link).


Merged 499 699 Request was from Mark Hindley <mark@hindley.org.uk> to control@bugs.devuan.org. (Wed, 11 Jan 2023 12:12:04 GMT) (full text, mbox, link).


Set bug forwarded-to-address to 'https://bugs.debian.org/989354'. Request was from Mark Hindley <mark@hindley.org.uk> to control@bugs.devuan.org. (Wed, 11 Jan 2023 12:14:01 GMT) (full text, mbox, link).


Reply sent to Mark Hindley <mark@hindley.org.uk>:
You have taken responsibility. (Wed, 11 Jan 2023 12:16:01 GMT) (full text, mbox, link).


Notification sent to ShadowM00n <shadowm00n@airmail.cc>:
bug acknowledged by developer. (Wed, 11 Jan 2023 12:16:02 GMT) (full text, mbox, link).


Message #28 received at 499-done@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: 499-done@bugs.devuan.org
Subject: Fixed in Debian #989354
Date: Wed, 11 Jan 2023 12:14:13 +0000
Version: 2.7.3-4

Reply sent to Mark Hindley <mark@hindley.org.uk>:
You have taken responsibility. (Wed, 11 Jan 2023 12:16:03 GMT) (full text, mbox, link).


Notification sent to TS Lura <tslura@gmail.com>:
bug acknowledged by developer. (Wed, 11 Jan 2023 12:16:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Sat Nov 23 22:30:19 2024;