JDK-8225370 : compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java fails with Socket closed
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 13,14,15,16,17,18,19,20
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • CPU: x86_64
  • Submitted: 2019-06-05
  • Updated: 2022-06-29
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 20
20Unresolved
Related Reports
Relates :  
Sub Tasks
JDK-8225568 :  
Description
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
java.lang.Error: Failed to write data: Socket closed
	at compiler.compilercontrol.share.scenario.Executor.connectTestVM(Executor.java:153)
	at compiler.compilercontrol.share.scenario.Executor.lambda$execute$0(Executor.java:100)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.net.SocketException: Socket closed
	at java.base/sun.nio.ch.NioSocketImpl.endAccept(NioSocketImpl.java:689)
	at java.base/sun.nio.ch.NioSocketImpl.accept(NioSocketImpl.java:762)
	at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:623)
	at java.base/java.net.ServerSocket.platformImplAccept(ServerSocket.java:589)
	at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:565)
	at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:522)
	at java.base/java.net.ServerSocket.accept(ServerSocket.java:497)
	at compiler.compilercontrol.share.scenario.Executor.connectTestVM(Executor.java:132)
	... 2 more
STATUS:Failed.`main' threw exception: java.lang.Error: Failed to write data: Socket closed
 stdout: [Could not add 50 more directives. Currently 1/50 directives.
Could not load file: directives.json
];
 stderr: [Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
]
 exitValue = 1

Comments
Deferring to JDK 19 because JDK 18 is now in the RC phase (https://openjdk.java.net/jeps/3#rc).
11-02-2022

[~goetz], I haven't looked at the code of these tests nor the feature code recently, so my next comment is about how it was when 8140405 was filed. the test observed that a method didn't become compilable after the test removed the directives related to the method. the behavior depends on if JVM tried to compile the method (presumably b/c of Xcomp) or not before the test tries. it had nothing to do w/ compiler directive limits. IIRC, there was a patch for compilercontrol tests which forced them to always spawn JVMs w/ -Xmixed, so the original problem described in 8140405 might go away.
12-11-2019

[~goetz] Since we're now in RC of JDK 13, this is no longer a candidate for fixing. Please update it.
15-08-2019

Hi, I don't really understand the bug description in JDK-8140405. To me, it reads like a hypothesis about the cause of a failure. I don't see that it describes the problem Pavel saw. I assume the probelm he observed was that methods were compiled although the test wanted to exclude them from compilation. Actually, the test presented too big compiler directives files to the VM, which would be ignored by the VM, so you could see the methods getting compiled. JDK-8222103 assures that the compiler directives files don't exceed CompilerDirectivesLimit. So I think this fix also adresses the issue of 8140405, but as I don't really understand the text there, I don't want to insist on this. I don't think JDK-8222103 has any other relation to this bug here than that it enabled the test. Please note CompilerDirectivesLimit was only introduced by JDK-8144246 after ClearDirectivesFileStackTest had been excluded by JDK-8140669.
06-06-2019

The test had been excluded for years based on JDK-8140405 (still open), but was re-enabled with the fix for JDK-8222103. So we have no experience with this test being run recently. The new failure mode is not related to that in JDK-8140405.
06-06-2019

Failure for compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java (8 failures in our tier testing for different targets from 05Jun2019) Exception: java.lang.Error: Failed to write data: Socket closed Exception: java.net.SocketException: Socket closed Seems started after JDK-8222103 fix changeset - 'compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest may exceed VM limit' Hi [~goetz], Please note assigning this 8225370 as a testbug to you for now, as this seems related/triggered by JDK-8222103 fix changeset. Request your help to please check this one. Please unassign yourself if unrelated or if I missed something. Thanks.
06-06-2019