Bug 770605 - /sbin/pidof fails to find running processes
Summary: /sbin/pidof fails to find running processes
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: sysvinit
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukáš Nykrýn
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-27 23:41 UTC by Michal Jaegermann
Modified: 2014-02-05 22:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-05 22:44:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Jaegermann 2011-12-27 23:41:14 UTC
Description of problem:

Look at this:

# pgrep spamd
1438
1480
1481
# /sbin/pidof spamd ; echo $?
1 

Unfortunately /usr/share/spamassassin/sa-update.cron includes the following:

for daemon in spamd amavisd; do
    /sbin/pidof $daemon >& /dev/null
    [ $? -eq 0 ] && SAUPDATE=yes
done

Running spamd is not detected and the whole script does not run even if otherwise configured to do so.  As a result after an upgrade to Fedora 16
sa-update stopped to run

Version-Release number of selected component (if applicable):
sysvinit-2.88-5.dsf.fc16

How reproducible:
Always with running spamd


Additional info:
No idea which processes are also affected and why.  I run few tests and so far spamd was the only instance of missed process I found.

Comment 1 Michal Jaegermann 2011-12-27 23:46:19 UTC
Related bug 755644 was filed on 2011-11-21.

Comment 2 Petr Lautrbach 2012-01-02 15:55:39 UTC
Something has changed between F15 and F16:

[root@f15-devel ~]# ps ax | grep /usr/bin/spamd
 1225 ?        Ss     0:01 /usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid

[root@f15-devel ~]# cat /proc/1225/stat
1225 (spamd) S 1 1225 1225 0 -1 4202816 13822 0 11 0 ...
      ^^^^^

[root@f16-devel ~]# ps ax | grep /usr/bin/spamd
  927 ?        Ss     0:01 /usr/bin/spamd -d -c -m5 -H

[root@f16-devel ~]# cat /proc/927/stat
927 (/usr/bin/spamd ) S 1 927 927 0 -1 4202816 13254 0 12 0 ...
     ^^^^^^^^^^^^^^^

My guess is that it's related to perl-5.14 [1] together with argv[0] issue described in bug #755644

[1] http://search.cpan.org/~jesse/perl-5.14.0/pod/perldelta.pod#Assignment_to_$0_sets_the_legacy_process_name_with_prctl()_on_Linux

Comment 3 Michal Jaegermann 2012-01-02 16:19:26 UTC
(In reply to comment #2)

> My guess is that it's related to perl-5.14 [1] together with argv[0] issue
> described in bug #755644

Quite possible; OTOH pidof fails to find a running /usr/bin/spamd either.

As I noted in bug #755644 using pgrep in place of pidof looks like a workaround.

Comment 4 Petr Lautrbach 2012-01-03 12:25:44 UTC
> Quite possible; OTOH pidof fails to find a running /usr/bin/spamd either.

perl-5.14 sets spamd's stat name to "/usr/bin/spamd " - $0 string truncated at 16 bytes. pidof tries to compare "/usr/bin/spamd" and "/usr/bin/spamd " which doesn't match.

Comment 5 Fedora End Of Life 2013-01-16 17:02:01 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Fedora End Of Life 2013-02-26 15:05:43 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 Michal Jaegermann 2013-02-27 02:44:18 UTC
(In reply to comment #6)
> Fedora 16 changed to end-of-life (EOL) status on 2013-02-12.

Regardless of this the bug is still there.  With sysvinit-2.88-9.dsf.fc18

$ /sbin/pidof spamd

returns nothing despite that 'pgrep spamd' shows multiple spamd processes running.

Comment 8 Fedora Admin XMLRPC Client 2013-03-01 14:37:10 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Fedora End Of Life 2013-12-21 14:59:15 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2014-02-05 22:44:02 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.