JDK-8308466 : com/sun/jdi/BadHandshakeTest.java timed out
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 21,22
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows
  • CPU: x86_64
  • Submitted: 2023-05-20
  • Updated: 2025-10-02
  • Resolved: 2025-10-02
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
Relates :  
Relates :  
Description
The following test timed out in the JDK21 CI:

com/sun/jdi/BadHandshakeTest.java

Here's a snippet from the log file:

#section:driver
----------messages:(10/315)----------
command: driver BadHandshakeTest
reason: User specified action: run driver BadHandshakeTest 
started: Sat May 20 07:45:52 UTC 2023
Mode: agentvm
Agent id: 11
Timeout refired 480 times
Timeout information:
--- Timeout information end.
finished: Sat May 20 07:59:29 UTC 2023
elapsed time (seconds): 817.072
----------configuration:(14/1323)*----------

<snip>

----------System.out:(2/1135)*----------
Starting debuggee...
Command line: [c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-21+24-2030\\windows-x64-debug.jdk\\jdk-21\\fastdebug\\bin\\java.exe -cp C:\\sb\\prod\\1684568585\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_jdi\\classes\\4\\com\\sun\\jdi\\BadHandshakeTest.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-21+24-2030\\src.full\\open\\test\\jdk\\com\\sun\\jdi;C:\\sb\\prod\\1684568585\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_jdi\\classes\\4\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.2\\1\\bundles\\jtreg-7.2+1.zip\\jtreg\\lib\\jtreg.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.2\\1\\bundles\\jtreg-7.2+1.zip\\jtreg\\lib\\junit-platform-console-standalone-1.9.2.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.2\\1\\bundles\\jtreg-7.2+1.zip\\jtreg\\lib\\testng-7.3.0.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.2\\1\\bundles\\jtreg-7.2+1.zip\\jtreg\\lib\\jcommander-1.78.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7.2\\1\\bundles\\jtreg-7.2+1.zip\\jtreg\\lib\\guice-4.2.3.jar -Xmx768m -XX:MaxRAMPercentage=4.16
result: Error. Agent error: java.lang.Exception: Agent 11 timed out with a timeout of 480 seconds; check console log for any additional details
Comments
Here is a slightly different failure mode: [debuggee] Listening for transport dt_socket at address: 51628 Debuggee started. Debuggee port: 51628 testcase 1... testcase 2... retry: 0 ----------System.err:(2/176)---------- [debuggee] Debugger failed to attach: handshake failed - received >Here's a poke < - expected >JDWP-Handshake< [debuggee] Debugger failed to attach: timeout during handshake
26-09-2023

I was wondering why this connection issue only seems to happen with this particular JDI test. One thing different about it is that it intentionally tries to disrupt the connection. It was the test written for the following bug fix: JDK-6339385 - JVM crash when JDWP port is "pinged" or "scanned" (handshake fails) However, I'm not so sure this intentional handshake disruption is the problem here. On a passed run the test log looks like: Starting debuggee... Command line: <snip> [debuggee] Listening for transport dt_socket at address: 63389 Debuggee started. Debuggee port: 63389 testcase 1... testcase 2... retry: 0 final attach... retry: 0 On the failed runs all we have is: Starting debuggee... Command line: <snip> result: Error. Agent error: java.lang.Exception: Agent 7 timed out with a timeout of 480 seconds; check console log for any additional details So I think the problems are starting before we even get to the point of trying to disrupt the handshake.
22-08-2023