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

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.devuan.org
Subject: bug#499: Smokeping service unable to stop/restart
Reply-To: ShadowM00n <shadowm00n@airmail.cc>, 499@bugs.devuan.org
Resent-From: ShadowM00n <shadowm00n@airmail.cc>
Resent-To: devuan-bugs@lists.dyne.org
Resent-CC: devuan-dev@lists.dyne.org
X-Loop: owner@bugs.devuan.org
Resent-Date: Mon, 27 Jul 2020 18:03:02 +0000
Resent-Message-ID: <handler.499.B.159587221831217@bugs.devuan.org>
Resent-Sender: owner@bugs.devuan.org
X-Devuan-PR-Message: report 499
X-Devuan-PR-Package: smokeping
X-Devuan-PR-Keywords: 
Received: via spool by submit@bugs.devuan.org id=B.159587221831217
          (code B); Mon, 27 Jul 2020 18:03:02 +0000
Received: (at submit) by bugs.devuan.org; 27 Jul 2020 17:50:18 +0000
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Mon, 27 Jul 2020 17:50:18 +0000 (UTC)
Received: from mail.cock.li (mail.cock.li [37.120.193.124])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 5FA7EF608B8
	for <submit@bugs.devuan.org>; Mon, 27 Jul 2020 19:46:20 +0200 (CEST)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; unprotected) header.d=airmail.cc header.i=@airmail.cc header.b="KIx6btfe";
	dkim-atps=neutral
Date: Mon, 27 Jul 2020 12:46:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=airmail.cc; s=mail;
	t=1595871979; bh=/l9h17mopLlsaou9ThJoHJf7d1uMRncnU/SqL+KEzck=;
	h=Date:From:To:Subject:From;
	b=KIx6btfe+Rj+VSNJWdgRyazoKyLMcyjYqhGHK96d1CF7pXHfLzlgzxh1PK0i6of2S
	 2AyeXizettEDAJ5jrEJRF1yxatW+eVQSLX9QqGm48HXGfmX9al6nyWDDG3iAaXR0XU
	 WE2Ypbsf7wElUeaFBcUtalZDsvdXP4XmBP0U9UR1eEf7hdUb0HrfG4ouasIfhvH9eK
	 haS/ps5cWEHtAbFMTGdCUEAY71f6S7w6MvL7Vy5nHKPAVJ9iTR09eE1NPcnCiN9tD/
	 cHyjE4zxhGO4Vq16yA4Q1PdqqHbO8wdj3A2ecSwuXMw31CzbAut9D12+RzU9N0qj4/
	 qmMRey2z0QXXg==
From: ShadowM00n <shadowm00n@airmail.cc>
To: submit@bugs.devuan.org
Message-ID: <20200727174615.GA4706@ascii>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
	DKIM_VALID_AU,DKIM_VALID_EF,T_SPF_PERMERROR autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org
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.

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: Thu Mar 28 15:19:12 2024;