JDK-8168517 : java/lang/ProcessBuilder/Basic.java failed with "java.lang.AssertionError: Some tests failed"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-10-24
  • Updated: 2020-10-12
  • Resolved: 2016-10-31
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 8 JDK 9 Other
8u270Fixed 9 b143Fixed openjdk8u272Fixed
Description
java/lang/ProcessBuilder/Basic.java failed with "java.lang.AssertionError: Some tests failed"

----------System.out:(21/1393)*----------
Testing ASCII environment values
Testing Latin1 environment values
Testing Unicode environment values
Testing directory .
Testing directory ..
Testing directory /
Testing directory /bin
cmdp
cmdp 0: /scratch/mesos/slaves/e053834b-c836-437c-a964-ec7a9c5adf82-S0/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8c135646-7639-4890-8b98-92b5eefb6299/runs/44a4af5b-97b0-49b4-9a18-ef4849d353a6/product/bin/java
cmdp 1: -XX:+DisplayVMOutputToStderr
cmdp 2: -classpath
cmdp 3: /scratch/mesos/slaves/e053834b-c836-437c-a964-ec7a9c5adf82-S0/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8c135646-7639-4890-8b98-92b5eefb6299/runs/44a4af5b-97b0-49b4-9a18-ef4849d353a6/testoutput/jtreg/JTwork/classes/5/java/lang/ProcessBuilder:/scratch/mesos/slaves/e053834b-c836-437c-a964-ec7a9c5adf82-S0/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8c135646-7639-4890-8b98-92b5eefb6299/runs/44a4af5b-97b0-49b4-9a18-ef4849d353a6/srcBundle/jdk/test/java/lang/ProcessBuilder:/scratch/sparky/jib-data/install/java/re/jtreg/4.2/promoted/all/b03/bundles/jtreg_bin-4.2.zip/jtreg/lib/javatest.jar:/scratch/sparky/jib-data/install/java/re/jtreg/4.2/promoted/all/b03/bundles/jtreg_bin-4.2.zip/jtreg/lib/jtreg.jar
cmdp 4: Basic$JavaChild
cmdp 5: System.getenv()
envp
envp 0: LC_ALL=C\u0000\u0000
envp 1: FO\u0000=B\u0000R
 waitFor process: delta: 81135

Passed = 9164, failed = 1

----------System.err:(23/1583)----------
java.lang.IllegalThreadStateException: process hasn't exited
	at java.lang.ProcessImpl.exitValue(java.base@9-internal/ProcessImpl.java:525)
	at Basic.realMain(Basic.java:2412)
	at Basic.main(Basic.java:2709)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:537)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
	at java.lang.Thread.run(java.base@9-internal/Thread.java:844)
java.lang.AssertionError: Some tests failed
	at Basic.main(Basic.java:2711)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:537)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
	at java.lang.Thread.run(java.base@9-internal/Thread.java:844)

JavaTest Message: Test threw exception: java.lang.AssertionError: Some tests failed
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.AssertionError: Some tests failed
Comments
Adding comment on behalf of Jonathan Dowland who is not an OpenJDK Author (yet): Fix Request (OpenJDK 8u): Please approve backporting this to jdk8u. This is a test-only change, for parity with Oracle 8uXXX. The patch applies clean to jdk8-dev/jdk. The test passes for me prior and after applying this patch.
22-07-2020

Actual error: ----------System.err:(23/1583)---------- java.lang.IllegalThreadStateException: process hasn't exited at java.lang.ProcessImpl.exitValue(java.base@9-internal/ProcessImpl.java:525) at Basic.realMain(Basic.java:2412) at Basic.main(Basic.java:2709) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:537) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-internal/Thread.java:844) So waitFor(8) has timed out and we proceeded to call exitValue() while the process is still alive.
28-10-2016

It appears that the system was overloaded with a load average of 14. Processes: 203 total, 7 running, 7 stuck, 189 sleeping, 1824 threads 2016/10/21 11:30:17 Load Avg: 14.02, 10.94, 6.92 CPU usage: 69.62% user, 17.72% sys, 12.65% idle The test could be modified to be more lenient on process termination. (Currently expects a process to be destroyed in 8 seconds). It would have failed with a different exception if it takes longer than 7 seconds.
26-10-2016