Bug 746842

Summary: checkpidfile does not return correctly
Product: Red Hat Enterprise Linux 6 Reporter: Michael McEniry <michael.mceniry>
Component: tomcat6Assignee: David Knox <dknox>
Status: CLOSED ERRATA QA Contact: tomcat-qe
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0CC: fgoldefu, jclere, jdennis, jpechane, tlavigne
Target Milestone: rc   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 07:27:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fix to /etc/init.d/tomcat6, checkpidfile, to return correctly none

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