Debian Bug report logs - #566004
Init script does not restart the daemon process on 'restart' command

version graph

Package: kgb-bot; Maintainer for kgb-bot is Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>; Source for kgb-bot is src:kgb-bot.

Reported by: Damyan Ivanov <dmn@debian.org>

Date: Wed, 20 Jan 2010 15:36:02 UTC

Severity: serious

Found in version kgb-bot/1.01-2

Fixed in version kgb-bot/1.01-3

Done: Damyan Ivanov <dmn@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>:
Bug#566004; Package kgb-bot. (Wed, 20 Jan 2010 15:36:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Damyan Ivanov <dmn@debian.org>:
New Bug report received and forwarded. Copy sent to Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>. (Wed, 20 Jan 2010 15:36:08 GMT) Full text and rfc822 format available.

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

From: Damyan Ivanov <dmn@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Init script does not restart the daemon process on 'restart' command
Date: Wed, 20 Jan 2010 17:32:57 +0200
Package: kgb-bot
Version: 1.01-2
Severity: serious

Justification: breaks Policy §9.3.2

Synopsys:

# ps axu | grep \[k\]gb
111       7603  0.0  0.7  20632 16020 ?        Ss   Jan16   0:20 /usr/bin/perl /usr/sbin/kgb-bot --foreground --config /etc/kgb-bot/kgb.conf
# /etc/init.d/kgb-bot restart
Reloading Collaborative IRC helper: kgb-bot.
# ps axu | grep \[k\]gb
111       7603  0.0  0.7  20632 16032 ?        Ss   Jan16   0:21 /usr/bin/perl /usr/sbin/kgb-bot --foreground --config /etc/kgb-bot/kgb.conf

i.e. the very same process still runs.

Policy §9.3.2 says:

  restart
      stop and restart the service if it's already running, otherwise 
      start the service

The particular problem at hand is that 'restart' action does not cause 
a new instance of the daemon to be executed and the old instance keeps 
using old versions of shared libraries (checked with checkrestart) 
which were upgraded due to security issues.


-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages kgb-bot depends on:
ii  adduser                  3.110           add and remove users and groups
ii  kgb-client               1.01-2          client for KGB (IRC collaboration
ii  libdigest-sha1-perl      2.11-2+b1       NIST SHA-1 message digest algorith
ii  libpoe-component-irc-per 5.84+dfsg-1     a fully event-driven IRC client mo
ii  libpoe-component-server- 1.12-1          POE component to publish event han
ii  libpoe-perl              2:1.0003-1      event driven component architectur
ii  libproc-pid-file-perl    1.24-6          Perl module for managing process i
ii  libyaml-perl             0.66-1          YAML Ain't Markup Language (tm)
ii  perl                     5.10.0-19lenny2 Larry Wall's Practical Extraction

kgb-bot recommends no packages.

Versions of packages kgb-bot suggests:
ii  libipc-run-perl              0.80-2      Perl module for running processes
ii  polygen                      1.0.6.ds2-6 generator of random sentences from

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>:
Bug#566004; Package kgb-bot. (Sat, 23 Jan 2010 17:06:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Evgeni Golov <evgeni@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>. (Sat, 23 Jan 2010 17:06:13 GMT) Full text and rfc822 format available.

Message #10 received at 566004@bugs.debian.org (full text, mbox):

From: Evgeni Golov <evgeni@debian.org>
To: 566004@bugs.debian.org
Cc: Damyan Ivanov <dmn@debian.org>
Subject: kgb-bot Init script does not restart the daemon process on 'restart' command
Date: Sat, 23 Jan 2010 17:55:09 +0100
Hi,

a short look at debian/kgb-bot.init, we should just rename:
1. restart -> soft-restart
2. force-restart -> restart
and all should be fine, right?
Or just drop the current restart and do step 2.

Regards
Evgeni

-- 
Bruce Schneier can read and understand Perl programs.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>:
Bug#566004; Package kgb-bot. (Mon, 25 Jan 2010 06:15:06 GMT) Full text and rfc822 format available.

Message #13 received at 566004@bugs.debian.org (full text, mbox):

From: Damyan Ivanov <dmn@debian.org>
To: Evgeni Golov <evgeni@debian.org>
Cc: 566004@bugs.debian.org
Subject: Re: kgb-bot Init script does not restart the daemon process on 'restart' command
Date: Mon, 25 Jan 2010 07:57:28 +0200
[Message part 1 (text/plain, inline)]
-=| Evgeni Golov, Sat, Jan 23, 2010 at 05:55:09PM +0100 |=-
> a short look at debian/kgb-bot.init, we should just rename:
> 1. restart -> soft-restart
> 2. force-restart -> restart
> and all should be fine, right?
> Or just drop the current restart and do step 2.

force-restart is not a standard init.d script option, but we may keep 
it regardless. 1+2 sounds good to me.

Since noone objected for whole two days :D, I am going to upload a new 
version with this change.

Thank you Evgeni for chiming in.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>:
Bug#566004; Package kgb-bot. (Mon, 25 Jan 2010 16:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>. (Mon, 25 Jan 2010 16:27:02 GMT) Full text and rfc822 format available.

Message #18 received at 566004@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Damyan Ivanov <dmn@debian.org>, Evgeni Golov <evgeni@debian.org>, 566004@bugs.debian.org
Subject: Re: [kgb-maintainers] Bug#566004: kgb-bot Init script does not restart the daemon process on 'restart' command
Date: Mon, 25 Jan 2010 17:24:42 +0100
[Message part 1 (text/plain, inline)]
On Mon, 25 Jan 2010 07:57:28 +0200, Damyan Ivanov wrote:

> Since noone objected for whole two days :D, I am going to upload a new 
> version with this change.

Hm, something's fishy with the init script. Some obversations:

- "reload" -> bot stops ?!
- "start" -> yeah, back up :)
- "stop" -> yup, stops
- start again
- "restart" -> bot stops ?!
- start again
- "force-restart" -> restarts
- "force-reload -> bot stops ?! (as expected)

I guess the start-stop-daemon --stop --signal {1,3} in
do_re{load,start} does not behave as expected ...

Cheers,
gregor

-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x00F3CFE4, 0x8649AA06
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: STS: I denk, wenn i denk
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>:
Bug#566004; Package kgb-bot. (Mon, 25 Jan 2010 17:42:06 GMT) Full text and rfc822 format available.

Message #21 received at 566004@bugs.debian.org (full text, mbox):

From: Damyan Ivanov <dmn@debian.org>
To: 566004@bugs.debian.org
Subject: Re: [kgb-maintainers] Bug#566004: kgb-bot Init script does not restart the daemon process on 'restart' command
Date: Mon, 25 Jan 2010 19:41:35 +0200
[Message part 1 (text/plain, inline)]
-=| gregor herrmann, Mon, Jan 25, 2010 at 05:24:42PM +0100 |=-
> Hm, something's fishy with the init script. Some obversations:
> 
> - "reload" -> bot stops ?!
> - "start" -> yeah, back up :)
> - "stop" -> yup, stops
> - start again
> - "restart" -> bot stops ?!
> - start again
> - "force-restart" -> restarts
> - "force-reload -> bot stops ?! (as expected)
> 
> I guess the start-stop-daemon --stop --signal {1,3} in
> do_re{load,start} does not behave as expected ...

This is with 1.01-2, right?

in -2 the actions have moved:

old      -->    new
restart         soft-restart
force-restart   restart

So the restart action should work. Strange that 'reload' fails for 
you. It works here (i.e. the process is running, no reconnects to IRC 
and it responds).
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>:
Bug#566004; Package kgb-bot. (Mon, 25 Jan 2010 19:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>. (Mon, 25 Jan 2010 19:36:04 GMT) Full text and rfc822 format available.

Message #26 received at 566004@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Damyan Ivanov <dmn@debian.org>, 566004@bugs.debian.org
Subject: Re: [kgb-maintainers] Bug#566004: Bug#566004: kgb-bot Init script does not restart the daemon process on 'restart' command
Date: Mon, 25 Jan 2010 20:32:58 +0100
[Message part 1 (text/plain, inline)]
On Mon, 25 Jan 2010 19:41:35 +0200, Damyan Ivanov wrote:

> > I guess the start-stop-daemon --stop --signal {1,3} in
> > do_re{load,start} does not behave as expected ...
> This is with 1.01-2, right?

With -1 actually but I didn't see changes in the init script between
-1 and -2.
 
> in -2 the actions have moved:

-3 I guess?
 
> old      -->    new
> restart         soft-restart
> force-restart   restart

Sounds good for the restart :)
 
> So the restart action should work. Strange that 'reload' fails for 
> you. It works here (i.e. the process is running, no reconnects to IRC 
> and it responds).

I can try again when -3 hits the mirrors.

Cheers,
gregor

-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x00F3CFE4, 0x8649AA06
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: Alanis Morissette: I Was Hoping
[signature.asc (application/pgp-signature, inline)]

Reply sent to Damyan Ivanov <dmn@debian.org>:
You have taken responsibility. (Wed, 27 Jan 2010 16:57:12 GMT) Full text and rfc822 format available.

Notification sent to Damyan Ivanov <dmn@debian.org>:
Bug acknowledged by developer. (Wed, 27 Jan 2010 16:57:12 GMT) Full text and rfc822 format available.

Message #31 received at 566004-close@bugs.debian.org (full text, mbox):

From: Damyan Ivanov <dmn@debian.org>
To: 566004-close@bugs.debian.org
Subject: Bug#566004: fixed in kgb-bot 1.01-3
Date: Wed, 27 Jan 2010 16:54:40 +0000
Source: kgb-bot
Source-Version: 1.01-3

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

kgb-bot_1.01-3.diff.gz
  to main/k/kgb-bot/kgb-bot_1.01-3.diff.gz
kgb-bot_1.01-3.dsc
  to main/k/kgb-bot/kgb-bot_1.01-3.dsc
kgb-bot_1.01-3_all.deb
  to main/k/kgb-bot/kgb-bot_1.01-3_all.deb
kgb-client-git_1.01-3_all.deb
  to main/k/kgb-bot/kgb-client-git_1.01-3_all.deb
kgb-client_1.01-3_all.deb
  to main/k/kgb-bot/kgb-client_1.01-3_all.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 566004@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Damyan Ivanov <dmn@debian.org> (supplier of updated kgb-bot 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.8
Date: Mon, 25 Jan 2010 18:40:15 +0200
Source: kgb-bot
Binary: kgb-bot kgb-client kgb-client-git
Architecture: source all
Version: 1.01-3
Distribution: unstable
Urgency: medium
Maintainer: Debian KGB Maintainers <kgb-maintainers@lists.alioth.debian.org>
Changed-By: Damyan Ivanov <dmn@debian.org>
Description: 
 kgb-bot    - IRC collaboration bot
 kgb-client - client for KGB (IRC collaboration bot)
 kgb-client-git - client for KGB (IRC collaboration bot) - Git support
Closes: 566004
Changes: 
 kgb-bot (1.01-3) unstable; urgency=medium
 .
   * Make 'restart' init.d script action stop and re-start the daemon as
     directed by the policy. Closes: #566004. Thanks to Evgeni Golov.
Checksums-Sha1: 
 f970f3be245403f3f3bad38bc4d264e77a212d65 1633 kgb-bot_1.01-3.dsc
 3aef30e22c9da152261dba94c448128331641e0b 6436 kgb-bot_1.01-3.diff.gz
 33b167bf53e2c14bc982a29a5722a44beb3ef2a7 20532 kgb-bot_1.01-3_all.deb
 90fc278fc2d653eaf73e9742972145ae3f213cdf 35850 kgb-client_1.01-3_all.deb
 7629a6c92dee6c9fe1b072bcaf3e12dd0358ae78 15370 kgb-client-git_1.01-3_all.deb
Checksums-Sha256: 
 53b5a95092bdf7f828855a3f327950e9976969068f79bee34a62134539530906 1633 kgb-bot_1.01-3.dsc
 9d5e0366e6b868327cdcf72142ea52bad5ba709efa52b212acfd2f695489d4e8 6436 kgb-bot_1.01-3.diff.gz
 e7cecafc2f4689af35d67158da078ba20bbf6823f635e1862ccdd77331b6b62f 20532 kgb-bot_1.01-3_all.deb
 725ec81768e9b1b12bab7a12d8cc185206a249a8f0cbe6a934028b6079843cf7 35850 kgb-client_1.01-3_all.deb
 084a3365b6129d0980fc6c5e8528ea3ee9b47ff14e994f4e37c373202a362424 15370 kgb-client-git_1.01-3_all.deb
Files: 
 6549c63215771ae7e0a47706664555bd 1633 devel optional kgb-bot_1.01-3.dsc
 78e99c4bcec02cdb8ad9011aeb69b2cc 6436 devel optional kgb-bot_1.01-3.diff.gz
 51d86846717bf202575af3904c86c854 20532 devel optional kgb-bot_1.01-3_all.deb
 d5362d7d1cd05ac910f143779201243c 35850 devel optional kgb-client_1.01-3_all.deb
 2c2738df962e56d8aab27446149ad9ab 15370 devel optional kgb-client-git_1.01-3_all.deb

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

iEYEARECAAYFAktdyo8ACgkQHqjlqpcl9ju2pwCfQT7gLCIycRY2K9Vr7rUxq+sz
TQIAn3k7+M8Su3NfUcf3h4R5LTOOfrOV
=X8uE
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 02 Mar 2010 07:27:31 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 13:36:58 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.