dspam won't start: /var/run/dspam missing in tmpfs

Bug #158252 reported by Swâmi Petaramesh
8
Affects Status Importance Assigned to Milestone
dspam (Ubuntu)
Fix Released
Medium
Unassigned
Dapper
Invalid
Medium
Unassigned
Edgy
Invalid
Medium
Unassigned
Feisty
Fix Released
Medium
Unassigned
Gutsy
Fix Released
Medium
Unassigned
Hardy
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: dspam

Now that /var/run is tmpfs mounted, the dspam daemon won't start due to /var/run/dspam missing.

It should be created by dspam startup initscript.

TEST CASE:
$ mount | grep /var/run
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
$ sudo aptitude install dspam
$ sudo vi /etc/default/dspam # set START=yes
$ sudo /etc/init.d/dspam start # Observe notification of starting
$ sudo /etc/init.d/dspam stop # Observe notification of stopping
$ sudo reboot
$ sudo /etc/init.d/dspam start # Observe notification of starting
$ sudo /etc/init.d/dspam stop # Observe notification that it was not running

With the updated dspam, dspam should start & stop cleanly before and after reboot.

Daniel Hahler (blueyed)
Changed in dspam:
status: New → Confirmed
Revision history for this message
KarlGoetz (kgoetz) wrote :

dAniel -
Thanks for the diff, even just pulling out the +test -d $(dirname $PIDFILE) || mkdir -p -m 755 $(dirname $PIDFILE)` section has saved me quite some worries!
karl.

Revision history for this message
Swâmi Petaramesh (swami-petaramesh) wrote :

I used the following at the beginning of dspam initscript :

[ -d /var/run/dspam ] || { mkdir /var/run/dspam; chown dspam: /var/run/dspam; }

(Did the same for the "sympa" initscript)

I believe the "chown" can be useful in letting the daemon act on its pidfile once started, isn't it ? If seen some daemons who are unhappy if their /var/run/something directory doesn't belong to them...

Revision history for this message
KarlGoetz (kgoetz) wrote : Re: [Bug 158252] Re: dspam won't start: /var/run/dspam missing in tmpfs

On Wed, 2007-10-31 at 07:05 +0000, Swâmi Petaramesh wrote:
> I used the following at the beginning of dspam initscript :
>
> [ -d /var/run/dspam ] || { mkdir /var/run/dspam; chown dspam:
> /var/run/dspam; }
>
> (Did the same for the "sympa" initscript)
>
> I believe the "chown" can be useful in letting the daemon act on its
> pidfile once started, isn't it ? If seen some daemons who are unhappy if
> their /var/run/something directory doesn't belong to them...
>

I used [1], as per the diff.
I havent put data through dspam yet, but having the pid owned (or at the
very least writable) always helps. on my system the directory was chgrp
dspam - i asume the init script was run as dspam or something?

kk

[1] (now with less extra bits as i try to make my thoughts clear!)
test -d $(dirname $PIDFILE) || mkdir -p -m 755 $(dirname $PIDFILE)

Daniel Hahler (blueyed)
Changed in dspam:
assignee: nobody → blueyed
status: Confirmed → In Progress
Revision history for this message
Daniel Hahler (blueyed) wrote :

The postinst of dspam installs the directory (through dh_installdirs) and it looks like this then:
drwxr-xr-x 2 root root 40 2007-05-02 17:08 /var/run/dspam

So, my patch/debdiff above creates the directory in the same way.

After starting dspam, the following pid file gets created, with the group set to dspam (and writable for the group):
-rw-rw---- 1 root dspam 5 2007-10-31 21:12 dspam.pid

Therefor, all seems to be OK with the debdiff.

Changed in dspam:
assignee: blueyed → nobody
status: In Progress → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Looks good to me, please get it uploaded.

Emmet Hikory (persia)
Changed in dspam:
assignee: nobody → persia
status: Confirmed → In Progress
Revision history for this message
Emmet Hikory (persia) wrote :

Uploaded. Thanks.

Changed in dspam:
status: In Progress → Fix Committed
Daniel Hahler (blueyed)
Changed in dspam:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

I rejected the upload because you used the wrong bug number in the changelog. Please fix this and reupload (with the same version number). Thank you!

Please also get this fixed in Hardy.

Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :

Changed the bug number in the diffs, sorry for the oversight.

Changed in dspam:
status: Fix Committed → Confirmed
Revision history for this message
Emmet Hikory (persia) wrote :

I'm setting Hardy back to fix committed, as the code has been committed to the repository. When a new revision is uploaded with a note in the changelog explaining the error, this will change to Fix Released. The current updated hardy debdiff does not apply against the distributed sources, and so cannot be uploaded as-is.

Changed in dspam:
assignee: persia → blueyed
status: Confirmed → Fix Committed
Revision history for this message
Daniel Hahler (blueyed) wrote :

dspam (3.6.8-5ubuntu3) hardy; urgency=low

  * Close the right bug (158269 is not dspam) (LP: #158252)
  * debian/dspam.post{inst,rm}: apply same setgid permissions to
    /usr/bin/dspamc as with /usr/bin/dspam (LP: #158136)
  * debian/rules: Fix debian-rules-ignores-make-clean-error

 -- dAniel hAhler <email address hidden> Tue, 06 Nov 2007 10:29:54 +0100

Changed in dspam:
status: Fix Committed → Fix Released
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Daniel, mind testing and preparing debdiffs for the remaining supported releases too?

Emmet Hikory (persia)
Changed in dspam:
assignee: nobody → persia
status: Confirmed → In Progress
Revision history for this message
Emmet Hikory (persia) wrote :

Updated gutsy debdiff uploaded. Please proceed with SRU testing in gutsy-proposed.

Changed in dspam:
assignee: persia → blueyed
importance: Undecided → Medium
status: In Progress → Confirmed
Emmet Hikory (persia)
description: updated
Daniel Hahler (blueyed)
Changed in dspam:
assignee: nobody → blueyed
status: New → In Progress
Revision history for this message
Jonathan Riddell (jr) wrote :

gutsy-proposed upload rejected, it was not minimal changes. Make sure only debian/changelog and debian/dspam.init are in the debdiff (this upload also had changes to config.guess and config.sub).

Revision history for this message
Emmet Hikory (persia) wrote :

Reuploaded to gutsy-proposed. Removing the changes to config.guess and config.sub would mean making additional changes to debian/rules, which is not preferred.

Revision history for this message
Jonathan Riddell (jr) wrote : Re: dspam won't start: /var/run/dspam missing in tmpf

Accepted to gutsy-proposed, please test.

Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :
Changed in dspam:
assignee: blueyed → nobody
status: In Progress → Confirmed
importance: Undecided → Medium
assignee: blueyed → nobody
importance: Undecided → Medium
assignee: blueyed → nobody
Changed in dspam:
importance: Undecided → Medium
status: New → Confirmed
importance: Undecided → Medium
status: New → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
Daniel Schwitzgebel (schwitzd) wrote :

gutsy version work for me

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Gutsy version is good. Marking verification-done for now.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to -updates.

Changed in dspam:
status: Fix Committed → Fix Released
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Daniel, mind preparing a debdiff for edgy-proposed too?

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Dapper and Edgy versions are not affected since PIDFILE in init script is defined this way: PIDFILE=/var/run/$NAME.pid
PIDFILE will be created directly in /var/run and not in a subdirectory (as it happens on Feisty and newer).

Changed in dspam:
status: Confirmed → Invalid
status: Confirmed → Invalid
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Version 3.6.8-4ubuntu1.1 uploaded to feisty-proposed, now waiting for an archive admin to accept it.

Revision history for this message
Jonathan Riddell (jr) wrote :

I've rejected dspam_3.6.8-4ubuntu1.1 from feisty-proposed, it uses the same version number as in gutsy. Please re-upload with a version number that hasn't been used, e.g. 3.6.8-4ubuntu1.01

Revision history for this message
Jonathan Riddell (jr) wrote :

I'm wrong. Accepted. Please test.

Changed in dspam:
status: Confirmed → Fix Committed
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

FEISTY VERIFICATION

Using version 3.6.8-4ubuntu1:
# /etc/init.d/dspam start
Starting DSPAM Statistical anti-spam filter: dspam.
# /etc/init.d/dspam stop
Stopping DSPAM Statistical anti-spam filter: dspam (not running).
#

Using version 3.6.8-4ubuntu1.1 (from proposed):
# /etc/init.d/dspam start
Starting DSPAM Statistical anti-spam filter: dspam.
# /etc/init.d/dspam stop
Stopping DSPAM Statistical anti-spam filter: dspam.
#

It works as expected.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to feisty-updates.

Changed in dspam:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.