JDK-6977426 : sun/tools tests can intermittently fail to find app's Java pid
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 7,7u25,8,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2010-08-16
  • Updated: 2024-02-15
  • Resolved: 2014-12-19
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 JDK 9
7u171Fixed 8u162Fixed 9 b47Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
The following SDK/JDK sun/tools tests intermittently fail:

    sun/tools/common/CommonTests.sh
    sun/tools/jmap/Basic.sh
    sun/tools/jstack/Basic.sh

Here is the URL for the failing config in the 2010.08.13 nightly:

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2010-08-13/RT_Baseline/javase/windows-amd64/server/comp/windows-amd64_javase_server_comp_JT_JDK_sun_tools/analysis.html

The failure mode looks like:

INFO: waiting for XXXApplication to initialize...
INFO: MKS shell pid=143500; Java pid=
INFO: killing 143500
----------System.err:(1/39)----------
ERROR: could not find app's Java pid.
result: Failed. Execution failed: exit code 2


test result: Failed. Execution failed: exit code 2


The CommonTests.jtr file shows the following environment info:

----------System.out:(36/1622)----------
INFO: JAVA=C:/local/common/jdk/baseline/windows-amd64/bin/java
INFO: 'C:/local/common/jdk/baseline/windows-amd64/bin/java' is executable.
INFO: JHAT=C:/local/common/jdk/baseline/windows-amd64/bin/jhat
INFO: 'C:/local/common/jdk/baseline/windows-amd64/bin/jhat' is executable.
INFO: JINFO=C:/local/common/jdk/baseline/windows-amd64/bin/jinfo
INFO: 'C:/local/common/jdk/baseline/windows-amd64/bin/jinfo' is executable.
INFO: JMAP=C:/local/common/jdk/baseline/windows-amd64/bin/jmap
INFO: 'C:/local/common/jdk/baseline/windows-amd64/bin/jmap' is executable.
INFO: JPS=C:/local/common/jdk/baseline/windows-amd64/bin/jps
INFO: 'C:/local/common/jdk/baseline/windows-amd64/bin/jps' is executable.
INFO: JSTACK=C:/local/common/jdk/baseline/windows-amd64/bin/jstack
INFO: 'C:/local/common/jdk/baseline/windows-amd64/bin/jstack' is executable.
INFO: flag isCygwin=false
INFO: flag isMKS=false
INFO: flag isLinux=false
INFO: flag isSolaris=false
INFO: flag isUnknownOS=false
INFO: flag isWindows=true
INFO: PATTERN_EOL=0000000000 [ 
 ] hotspot.log $ 
 
 0000000007
INFO: PATTERN_EOL works for regular line with grep.
INFO: PATTERN_EOL works for CR line with grep.
INFO: PATTERN_EOL works for regular line with sed.
INFO: PATTERN_EOL works for CR line with sed.
INFO: PATTERN_WS=0000000000 [ 	 ] 
 
 0000000006
INFO: PATTERN_WS works for blanks with grep.
INFO: PATTERN_WS works for tabs with grep.
INFO: PATTERN_WS works for blanks with sed.
INFO: PATTERN_WS works for tabs with sed.
INFO: waiting for SleeperApplication to initialize...
INFO: MKS shell pid=143500; Java pid=
INFO: killing 143500


The only strange thing is that isWindows is true, but neither
isCygwin or isMKS is true. The startApplication() function isn't
issuing enough debug information to figure out why the app's
Java pid couldn't be found.
The Win-AMD64 Server VM -Xcomp config failed these tests in the
2010.08.13 nightly. The Win-AMD64 Server VM -Xmixed config did
not fail these tests in the 2010.08.13 nightly.

In the 2010.08.14 nightly, the Win-AMD64 Server VM -Xmixed config
failed these tests and one additional test:

    sun/tools/jinfo/Basic.sh

Here is the URL for that config:

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2010-08-14/RT_Baseline/javase/windows-amd64/server/mixed/windows-amd64_javase_server_mixed_JT_JDK_sun_tools/analysis.html

In the 2010.08.14 nightly, the Win-AMD64 Server VM -Xcomp config
did not complete.
Here is an instance of this failure mode in the Win32 Server VM -Xmixed
config:

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2010-08-16/RT_Baseline/javase/windows-i586/server/mixed/windows-i586_javase_server_mixed_JT_JDK_sun_tools/analysis.html

And an instance in the Win32 Server VM -Xcomp config:

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2010-08-16/RT_Baseline/javase/windows-i586/server/comp/windows-i586_javase_server_comp_JT_JDK_sun_tools/analysis.html

The interesting thing here is that the test machine's platform
is really Win-ADM64:

Platform: windows-amd64 VM Arch: windows-i586
Machine: VM-X4100-07 Info: Windows_NT VM-X4100-07 6 00 8664

and

Platform: windows-amd64 VM Arch: windows-i586
Machine: VM-X4100-07 Info: Windows_NT VM-X4100-07 6 00 8664
This bug can also affect the following SDK/JDK Logging tests:

    java/util/logging/AnonLoggerWeakRefLeak.sh
    java/util/logging/LoggerWeakRefLeak.sh

Here is the URL for a failure instance in the 2010.08.19 nightly:

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2010-08-19/RT_Baseline/javase/windows-amd64/server/mixed/windows-amd64_javase_server_mixed_JT_JDK_java_util_logging/analysis.html

Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/beb1329b3c21 User: lana Date: 2015-01-21 21:54:51 +0000
21-01-2015

The fix above has taken care of java/util/logging/AnonLoggerWeakRefLeak.sh, java/util/logging/LoggerWeakRefLeak.sh and sun/tools/common/CommonTest.sh. The rest of the tests mentioned in this bug has been fixed in bugs linked to this one.
19-12-2014

URL: http://hg.openjdk.java.net/jdk9/hs-rt/jdk/rev/beb1329b3c21 User: ykantser Date: 2014-12-19 14:03:43 +0000
19-12-2014

Failed in RT_Baseline 2014-11-04. I wonder if this is yet another case of "cygwin's ps may sometimes miss processes": JDK-8038963. #section:shell ----------messages:(3/152)---------- command: shell AnonLoggerWeakRefLeak.sh reason: User specified action: run shell/timeout=240 AnonLoggerWeakRefLeak.sh elapsed time (seconds): 4.478 ----------System.out:(5/184)---------- INFO: waiting for AnonLoggerWeakRefLeak to initialize... INFO: waited 1 second(s) ... INFO: waited 2 second(s) ... INFO: Cygwin pid=18996 maps to Windows pid= INFO: killing 18996 ----------System.err:(2/322)---------- ERROR: could not find app's Java pid. C:/local/aurora/sandbox/sca/vmsqe/testbase/jtreg/nightly/rt_baseline/JT_JDK/test/java/util/logging/../../../sun/tools/common/ApplicationSetup.sh: line 192: 18996 Killed ${JAVA} -XX:+UsePerfData -classpath "${TESTCLASSPATH:-${TESTCLASSES}}" "$@" > "$appOutput" 2>&1
05-11-2014

Affected tests: RULE sun/tools/jcmd/jcmd-big-script.sh ExitCode 2 RULE sun/tools/jcmd/jcmd-pid.sh ExitCode 2
11-09-2014