JDK-7186723 : TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
  • Type: Bug
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2012-07-25
  • Updated: 2012-10-17
  • Resolved: 2012-10-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Resolved 8Fixed
Related Reports
Relates :  
Description
_app_start() in JMXStartStopTest.sh sleeps for a second after starting a java process, then hopes that the java process has gotten far enough for jps to report its pid. This race:y behavior likely explains some test failures which report that the app hasn't been started.

Comments
start stop functionality is not available in jdk7
17-10-2012

Removed the test from ProblemList.txt as part of this changeset. These changes fix JDK-7158614 as well.
29-09-2012

SUGGESTED FIX $! doesn't work as MKS run subshell to launch java
30-08-2012

EVALUATION Test changed to be more reliable on windows and handle correctly MKS/Cygwin difference
30-08-2012

SUGGESTED FIX replace _get_pid with $! in _app_start(), and remove the sleep call, pid=$! directly after the java process is started gets that process' pid. If it was actually required to wait for the process reaching some state, then wait for that pid to appear in jps' output instead, but for a far longer period than 1 second.
25-07-2012