RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 746842 - checkpidfile does not return correctly
Summary: checkpidfile does not return correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tomcat6
Version: 6.0
Hardware: noarch
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: David Knox
QA Contact: tomcat-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-17 22:50 UTC by Michael McEniry
Modified: 2015-11-02 00:16 UTC (History)
5 users (show)

Fixed In Version: tomcat6-6.0.24-84.el6
Doc Type: Bug Fix
Doc Text:
Previously, in /etc/init.d/tomcat6, the checkpidfile function did not return correct values when the PID file and a matching /proc/${kpid} existed. This caused the status function to use pgrep to look for processes, which showed any other java processes running as the same user. A fix has been applied, and the checkpidfile function now works as expected.
Clone Of:
Environment:
Last Closed: 2015-07-22 07:27:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fix to /etc/init.d/tomcat6, checkpidfile, to return correctly (348 bytes, text/plain)
2011-10-17 22:50 UTC, Michael McEniry
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1461 0 normal SHIPPED_LIVE tomcat6 bug fix and enhancement update 2015-07-21 14:14:55 UTC

Description Michael McEniry 2011-10-17 22:50:39 UTC
Created attachment 528666 [details]
fix to /etc/init.d/tomcat6, checkpidfile, to return correctly

Description of problem:
In /etc/init.d/tomcat6, the checkpidfile function does not return correctly, when the pid file exists and the matching /proc/${kpid} exists. It sets RETVAL="0", then proceeds out of the nested "if" blocks and sets RETVAL="3". This causes the status function to use pgrep to look for processes, which shows any other java processes running as the same user.


Version-Release number of selected component (if applicable):
tomcat6-6.0.24-33.el6.noarch


How reproducible:
Always


Steps to Reproduce:
1. Create another java process (eg, a second tomcat instance) that runs as the same user and group ("tomcat" by default).
2. service tomcat6 status
  
Actual results:
tomcat6 (pid 6824,61491) is running...  [  OK  ]

Expected results:
tomcat6 (pid 6824) is running...  [  OK  ]


Additional info:
Place a "return" after setting RETVAL="0", as in attached diff.

Comment 2 RHEL Program Management 2011-10-17 23:08:37 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. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 6 errata-xmlrpc 2015-07-22 07:27:13 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.

https://rhn.redhat.com/errata/RHBA-2015-1461.html


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