[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#152270: marked as done (start-stop-daemon fails to detect already running daemons (patch))



Your message dated Fri, 12 Jul 2002 12:24:04 -0400
with message-id <E17T3DA-00055Q-00@auric.debian.org>
and subject line Bug#152270: fixed in dpkg 1.10.3
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 8 Jul 2002 13:44:19 +0000
>From thomas.morin@enst-bretagne.fr Mon Jul 08 08:44:19 2002
Return-path: <thomas.morin@enst-bretagne.fr>
Received: from smtp-out-6.wanadoo.fr (mel-rto6.wanadoo.fr) [193.252.19.25] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 17RYoM-0000n8-00; Mon, 08 Jul 2002 08:44:19 -0500
Received: from mel-rta10.wanadoo.fr (193.252.19.193) by mel-rto6.wanadoo.fr (6.5.007)
        id 3D1868370075680D for submit@bugs.debian.org; Mon, 8 Jul 2002 15:43:42 +0200
Received: from t0m.dyndns.org (80.11.28.83) by mel-rta10.wanadoo.fr (6.5.007)
        id 3D2131BA00352FFB for submit@bugs.debian.org; Mon, 8 Jul 2002 15:43:42 +0200
Received: by t0m.dyndns.org (Postfix, from userid 33)
	id F3C2327261; Mon,  8 Jul 2002 15:43:40 +0200 (CEST)
Received: from machine107.rd.francetelecom.com ( [machine107.rd.francetelecom.com])
	as user thomas@localhost by t0m.dyndns.org with HTTP;
	Mon,  8 Jul 2002 15:43:40 +0200
Message-ID: <[🔎] 1026135820.3d29970cd7246@t0m.dyndns.org>
Date: Mon,  8 Jul 2002 15:43:40 +0200
From: Thomas Morin <thomas.morin@enst-bretagne.fr>
To: submit@bugs.debian.org
Subject: start-stop-daemon fails to detect already running daemons (patch)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 3.1
Delivered-To: submit@bugs.debian.org

Package: dpkg 
Version: 1.10.2
Severity: grave

I've noticed the following behavior: current version of start-stop-daemon
fails to detect a daemon is already running. It's seems to be merely due to a
change in version 1.10.

I set severity of this report to grave because this can lead to a daemon not
beeing silently not restarted during an upgrade.

It seems to me that the reason for the error is an inverted test in check(pid)
in start-stop-daemon.c : check(pid) check that the process of pid
/var/run/foo.pid is actually running, but if it actually is, it doesn't push
it in the 'found' list, and returns.

(Side effect: with init scripts relying on --make-pif-file, if at some point
--start is called while the daemon is already running, the pid file will be
overwritten with a wrong pid, and then --stop will fail stopping the deamon)

--- start-stop-daemon.orig	2002-07-08 15:11:06.000000000 +0200
+++ start-stop-daemon.c	2002-07-08 15:11:23.000000000 +0200
@@ -686,7 +686,7 @@
 
	return;
 	if (cmdname && !pid_is_cmd(pid, cmdname))
 
	return;
-
if (start && pid_is_running(pid))
+
if (start && !pid_is_running(pid))
 
	return;
 	push(&found, pid);
 }

Example of misbehavior: 

  (Using omniNames init script) 

# /etc/init.d/omniorb-nameserver start
Starting omniorb name server: omniNames.
# cat /var/run/omniNames.pid 
13559
# ps 13559
  PID TTY      STAT   TIME COMMAND
13559 ?        S      0:00 /usr/bin/omniNames
# /etc/init.d/omniorb-nameserver start
Starting omniorb name server: omniNames.
# cat /var/run/omniNames.pid 
13569
# ps 13569
  PID TTY      STAT   TIME COMMAND
# /etc/init.d/omniorb-nameserver stop 
Stopping omniorb name server: omniNames.
# ps auxw |grep omni
root     13559  0.0  0.5  9052 1816 ?     S    15:18   0:00 /usr/bin/omniNames
root     13560  0.0  0.5  9052 1816 ?     S    15:18   0:00 /usr/bin/omniNames
root     13561  0.0  0.5  9052 1816 ?     S    15:18   0:00 /usr/bin/omniNames
root     13562  0.0  0.5  9052 1816 ?     S    15:18   0:00 /usr/bin/omniNames
root     13563  0.0  0.5  9052 1816 ?     S    15:18   0:00 /usr/bin/omniNames
root     13578  0.0  0.2  1708  688 pts/2 S    15:19   0:00 grep omni
# 


-- 
== Thomas Morin   --  GSM: 06 83 20 64 87   --   Tel: 02 98 05 98 54
== thomas.morin@enst-bretagne.fr    --    thomas.morin@tuxfamily.org
== PGP Id:8CEA233D   Key FP:503BF6CFD3AE8719377B832A02FB94E08CEA233D
--


---------------------------------------
Received: (at 152270-close) by bugs.debian.org; 12 Jul 2002 16:39:22 +0000
>From troup@auric.debian.org Fri Jul 12 11:39:22 2002
Return-path: <troup@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] (mail)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 17T3Ry-00017Z-00; Fri, 12 Jul 2002 11:39:22 -0500
Received: from troup by auric.debian.org with local (Exim 3.12 1 (Debian))
	id 17T3DA-00055Q-00; Fri, 12 Jul 2002 12:24:04 -0400
From: Adam Heath <doogie@debian.org>
To: 152270-close@bugs.debian.org
X-Katie: $Revision: 1.17 $
Subject: Bug#152270: fixed in dpkg 1.10.3
Message-Id: <E17T3DA-00055Q-00@auric.debian.org>
Sender: James Troup <troup@auric.debian.org>
Date: Fri, 12 Jul 2002 12:24:04 -0400
Delivered-To: 152270-close@bugs.debian.org

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

dpkg-dev_1.10.3_all.deb
  to pool/main/d/dpkg/dpkg-dev_1.10.3_all.deb
dpkg-doc_1.10.3_all.deb
  to pool/main/d/dpkg/dpkg-doc_1.10.3_all.deb
dpkg_1.10.3.dsc
  to pool/main/d/dpkg/dpkg_1.10.3.dsc
dpkg_1.10.3.tar.gz
  to pool/main/d/dpkg/dpkg_1.10.3.tar.gz
dpkg_1.10.3_i386.deb
  to pool/main/d/dpkg/dpkg_1.10.3_i386.deb
dselect_1.10.3_i386.deb
  to pool/main/d/dpkg/dselect_1.10.3_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 152270@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Adam Heath <doogie@debian.org> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 11 Jul 2002 22:58:43 -0500
Source: dpkg
Binary: dpkg-static dselect dpkg-dev dpkg-doc dpkg
Architecture: source all i386
Version: 1.10.3
Distribution: unstable
Urgency: low
Maintainer: Dpkg Development <debian-dpkg@lists.debian.org>
Changed-By: Adam Heath <doogie@debian.org>
Description: 
 dpkg       - Package maintenance system for Debian
 dpkg-dev   - Package building tools for Debian
 dpkg-doc   - Dpkg Internals Documentation
 dselect    - a user tool to manage Debian packages
Closes: 151992 152132 152161 152270
Changes: 
 dpkg (1.10.3) unstable; urgency=low
 .
   * Move dselect.cfg to dselect package. Closes: Bug#152132
   * Install methods into /usr/lib/dpkg/methods, not /usr/lib/dpkg.  Closes:
     #152161.
   * Fix test inversion in start-stop-daemon, when checking the pid given in
     a pid file.  Thanks Thomas Morin <thomas.morin@enst-bretagne.fr>.
     Closes: #152270.
   * If in --test mode, and --stop is given, increment n_killed, so that
     start-stop-daemon returns the proper exit value.  Thanks Thomas Morin
     <thomas.morin@enst-bretagne.fr>.  Closes: #151992.
Files: 
 7f4ce003847b18563e46b612ef545679 716 base required dpkg_1.10.3.dsc
 04552f3e53a56ccdaeacf8631c17b788 1566940 base required dpkg_1.10.3.tar.gz
 78b7b9e3ebc7bb9d71ed726ffba26d17 1159826 base required dpkg_1.10.3_i386.deb
 ccafb68f04dff1e6bcdbfe3f0a749458 89756 base required dselect_1.10.3_i386.deb
 147f24e8676e926bf981311ecf8e5b4d 1151291 byhand - dpkg-1.10.3_i386.nondebbin.tar.gz
 371867b0e9c6d24388a45f06fea09f9e 1316948 byhand - dpkg-1.10.3_i386-static.nondebbin.tar.gz
 edaa6d7ff71ab6ca746ef9a69cda9873 111708 utils standard dpkg-dev_1.10.3_all.deb
 dd964053bfc15290bac2f626b64db5db 10692 doc optional dpkg-doc_1.10.3_all.deb
 04552f3e53a56ccdaeacf8631c17b788 1566940 byhand - dpkg-1.10.3.tar.gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9LmBtiix9wovUpIkRAim6AJ9GQ/IHvKIlNxeOE57FHRoQAH7FsgCfefBe
3+LwPt55UQu8hXV8nS/NZCo=
=MJCz
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: