Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 529632 - [PATCH] "service crond status" return invalid status
[PATCH] "service crond status" return invalid status
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: vixie-cron (Show other bugs)
5.4
All Linux
low Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
qe-baseos-daemons
: EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-19 04:54 EDT by HONDA Hirofumi
Modified: 2012-02-20 22:13 EST (History)
4 users (show)

See Also:
Fixed In Version: vixie-cron-4.1-78.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-20 22:13:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0304 normal SHIPPED_LIVE Low: vixie-cron security, bug fix, and enhancement update 2012-02-21 02:24:41 EST

  None (edit)
Description HONDA Hirofumi 2009-10-19 04:54:17 EDT
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 06:31:14 EDT
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 Product and Program Management 2010-08-09 14:19:06 EDT
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 Product and Program Management 2011-01-11 15:18:11 EST
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 Product and Program Management 2011-01-12 10:18:16 EST
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 Product and Program Management 2011-05-31 09:18:10 EDT
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-20 22:13:28 EST
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.