JDK-8270326 : [MacOSX-AARCH64] serviceability/sa/sadebugd/DebugdConnectTest.java fails with java.rmi.ConnectException
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 17,18
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-07-12
  • Updated: 2024-06-24
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8271512 :  
Description
Note to reproduce this issue, first JDK-8270199 has to be fixed. Otherwise the test is skipped.

 stdout: [Attaching to remote server test@localhost, please wait...
];
 stderr: [Error attaching to remote server: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: 
	java.net.ConnectException: Connection refused
sun.jvm.hotspot.debugger.DebuggerException: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: 
	java.net.ConnectException: Connection refused
	at jdk.hotspot.agent/sun.jvm.hotspot.RMIHelper.lookup(RMIHelper.java:121)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.connectRemoteDebugger(HotSpotAgent.java:503)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:404)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:336)
	at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:184)
	at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:214)
	at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134)
	at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.runWithArgs(JStack.java:90)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJSTACK(SALauncher.java:302)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:500)
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: 
	java.net.ConnectException: Connection refused
	at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:626)
	at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
	at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:204)
	at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:344)
	at java.rmi/sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:116)
	at java.rmi/java.rmi.Naming.lookup(Naming.java:101)
	at jdk.hotspot.agent/sun.jvm.hotspot.RMIHelper.lookup(RMIHelper.java:119)
	... 9 more
Caused by: java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.connect0(Native Method)
	at java.base/sun.nio.ch.Net.connect(Net.java:579)
	at java.base/sun.nio.ch.Net.connect(Net.java:568)
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base/java.net.Socket.connect(Socket.java:633)
	at java.base/java.net.Socket.connect(Socket.java:583)
	at java.base/java.net.Socket.<init>(Socket.java:507)
	at java.base/java.net.Socket.<init>(Socket.java:287)
	at java.rmi/sun.rmi.transport.tcp.TCPDirectSocketFactory.createSocket(TCPDirectSocketFactory.java:40)
	at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:620)
	... 15 more

]
Comments
Now failing on macosx-x64 for this reason also. Probably originally only saw it on aarch64 due to the OSX version, and now upgrades are causing it to reproduce on x64 also. As noted earlier, this bug is hiding JDK-8239062.
08-02-2022

This test also fails on macosx-x64, but for a different reason. See JDK-8239062. Likely we will run into that same problem once this one is fixed.
12-07-2021

Possibly this is a host configuration issue, but it seems we would have RMI test failures if that were the case.
12-07-2021