Bug 529632 - [PATCH] "service crond status" return invalid status
Summary: [PATCH] "service crond status" return invalid status
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: vixie-cron
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Marcela Mašláňová
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-19 08:54 UTC by HONDA Hirofumi
Modified: 2012-02-21 03:13 UTC (History)
4 users (show)

Fixed In Version: vixie-cron-4.1-78.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 03:13:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to fix this problem (230 bytes, patch)
2009-10-19 08:54 UTC, HONDA Hirofumi
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0304 0 normal SHIPPED_LIVE Low: vixie-cron security, bug fix, and enhancement update 2012-02-21 07:24:41 UTC

Description HONDA Hirofumi 2009-10-19 08:54:17 UTC
Created attachment 365217 [details]
Patch to fix this problem

Description of problem:

When parent crond is stopped and child crond (executing program) is running,
"service crond status" reports "crond (pid  XXX) is running...".

Version-Release number of selected component (if applicable):

vixie-cron-4.1-76.el5

How reproducible:

When parent crond is stopped and child crond (executing program) is running.

Steps to Reproduce:
1. Configure crontab

crontab -e:
*/2 * * * * /bin/bash /tmp/test.sh

/tmp/test.sh:
#!/bin/bash
sleep 120 &

2. Stop crond when "bash <defunct>" exist

# ps -e --forest
...
10812 ?        00:00:00 crond
10821 ?        00:00:00  \_ crond
10822 ?        00:00:00      \_ bash <defunct>
10823 ?        00:00:00 sleep
# service crond stop
Stopping crond:                                            [  OK  ]

3. Check status when "bash <defunct>" exist

# ps -e --forest
...
10821 ?        00:00:00 crond
10822 ?        00:00:00  \_ bash <defunct>
10823 ?        00:00:00 sleep
# service crond status
crond (pid 10821) is running...
  
Actual results:

# service crond status
crond (pid 10821) is running...

Expected results:

# service crond status
crond is stopped

Additional info:

Patch to /etc/init.d/crond attached which fixes this in my testing.

Comment 1 Marcela Mašláňová 2009-10-19 10:31:14 UTC
I've added your commit into the upstream repository
http://git.fedorahosted.org/git/cronie.git?p=cronie.git;a=commitdiff;h=1a732d69938788dde2f1a8bf3ae1b9dc48d10c99

This fix will be available in next major update (RHEL-6). Would you mind if I close it as NEXTRELEASE?

Comment 6 RHEL Program Management 2010-08-09 18:19:06 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 8 RHEL Program Management 2011-01-11 20:18:11 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 9 RHEL Program Management 2011-01-12 15:18:16 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 10 RHEL Program Management 2011-05-31 13:18:10 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 14 errata-xmlrpc 2012-02-21 03:13:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0304.html


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