JDK-8056143 : interrupted java/lang/management/MemoryMXBean/LowMemoryTest.java leaves running process
  • Type: Bug
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • Submitted: 2014-08-27
  • Updated: 2017-08-31
  • Resolved: 2014-10-22
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 9
9 b37Fixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8057160 :  
Description
java/lang/management/MemoryMXBean/LowMemoryTest.java failed: java.lang.IllegalThreadStateException: process has not exited
and it leaves running process on Windows after test complete.

STDERR:
java.lang.IllegalThreadStateException: process has not exited
	at java.lang.ProcessImpl.exitValue(ProcessImpl.java:443)
	at jdk.testlibrary.OutputAnalyzer.<init>(OutputAnalyzer.java:54)
	at jdk.testlibrary.ProcessTools.executeProcess(ProcessTools.java:359)
	at jdk.testlibrary.ProcessTools.executeProcess(ProcessTools.java:375)
	at RunUtil.runTest(RunUtil.java:77)
	at RunUtil.runTestClearGcOpts(RunUtil.java:42)
	at LowMemoryTest.main(LowMemoryTest.java:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:484)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.lang.IllegalThreadStateException
JavaTest Message: shutting down test


TEST RESULT: Error. Timeout
Comments
Might have something to do with the fact that when p.waitFor() is interrupted (eg. due to timeout) the process 'p' is not destroyed before calling p.exitValue()
26-09-2014

Maybe not related to the windows failure, but here are some information regarding the test. The test was recently changed with JDK-8035939. In that bug the test ended up allocating objects in the young gen instead of the old gen and we never filled up the old gen. I added a limit to make sure we allocate large enough objects, to make sure they end up in the old gen. Unfortunately, the fix in JDK-8035939 wasn't good enough and we can still end up allocating too small objects if the max heap size is too low. I'm going to change the test to always allocate objects that are of fixed size, and add a check that we don't try to run this test with too small old gen size.
04-09-2014