JDK-8225474 : JDI connector accept fails "Address already in use" with concurrent listeners
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 11,12,13
  • Priority: P4
  • Status: Closed
  • Resolution: Incomplete
  • Submitted: 2019-06-07
  • Updated: 2023-08-16
  • Resolved: 2023-08-16
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.
Other
tbdResolved
Related Reports
Blocks :  
Relates :  
Description
JDI debugger connector listener accept intermittently fails when concurrent listeners are created:

java.net.BindException: Address already in use
	at java.base/sun.nio.ch.Net.bind0(Native Method)
	at java.base/sun.nio.ch.Net.bind(Net.java:465)
	at java.base/sun.nio.ch.Net.bind(Net.java:457)
	at java.base/sun.nio.ch.NioSocketImpl.bind(NioSocketImpl.java:643)
	at java.base/java.net.ServerSocket.bind(ServerSocket.java:359)
	at java.base/java.net.ServerSocket.bind(ServerSocket.java:313)
	at jdk.jdi/com.sun.tools.jdi.SocketTransportService.startListening(SocketTransportService.java:300)
	at jdk.jdi/com.sun.tools.jdi.SocketTransportService.startListening(SocketTransportService.java:310)
	at jdk.jdi/com.sun.tools.jdi.GenericListeningConnector.startListening(GenericListeningConnector.java:117)
	at jdk.jdi/com.sun.tools.jdi.SocketListeningConnector.startListening(SocketListeningConnector.java:86)
	at jdk.jdi/com.sun.tools.jdi.GenericListeningConnector.accept(GenericListeningConnector.java:163)
	at JdwpConcurrentAttachTest.lambda$attachTest$0(JdwpConcurrentAttachTest.java:122)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:830)

Issue found during AdoptOpenJDK system test executions, ref: https://github.com/AdoptOpenJDK/openjdk-systemtest/issues/63



Comments
Closing as incomplete. There is are no instructions for reproducing the issue. Would be great if the mentioned JdwpConcurrentAttachTest could be provided.
16-08-2023

Moved to tbd, JDI connector by design at the moment is not thread safe.
10-06-2020

Needs looking at by a JDI SME, and evaluating what it would take to make JDI Connectors fully thread-safe, and whether we need/want to...?
17-06-2019

Fix potentially might also fix: https://bugs.openjdk.java.net/browse/JDK-8213714
07-06-2019