JDK-8317804 : com/sun/jdi/JdwpAllowTest.java fails on Alpine 3.17 / 3.18
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 17,21,22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux_alpine
  • CPU: generic
  • Submitted: 2023-10-10
  • Updated: 2024-01-17
  • Resolved: 2024-01-11
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 21 JDK 22 JDK 23
21.0.3Fixed 22.0.1Fixed 23 b05Fixed
Related Reports
Relates :  
Relates :  
Description
We run into the following failure :

Starting PositiveMaskTest(0:0:0:0:0:0:0:1)
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:589)
	at java.base/sun.nio.ch.Net.connect(Net.java:578)
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:583)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base/java.net.Socket.connect(Socket.java:751)
	at java.base/java.net.Socket.connect(Socket.java:686)
	at java.base/java.net.Socket.<init>(Socket.java:555)
	at java.base/java.net.Socket.<init>(Socket.java:324)
	at JdwpAllowTest.handshake(JdwpAllowTest.java:54)
	at JdwpAllowTest.positiveTest(JdwpAllowTest.java:107)
	at JdwpAllowTest.main(JdwpAllowTest.java:244)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1583)
java.lang.RuntimeException: PositiveMaskTest(0:0:0:0:0:0:0:1) FAILED
	at JdwpAllowTest.positiveTest(JdwpAllowTest.java:112)
	at JdwpAllowTest.main(JdwpAllowTest.java:244)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Can we check for Alpine and avoid this part of the test ?

Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/2132 Date: 2024-01-16 10:06:39 +0000
16-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u-dev/pull/176 Date: 2024-01-16 09:03:39 +0000
16-01-2024

jdk21u-dev backport request I would like to have the patch in jdk21u-dev as well, because the issue is present there too. The patch applies cleanly and is low-to-medium risk.
16-01-2024

jdk22u backport request I would like to have the patch in jdk22u as well, because the issue is present there too. The patch applies cleanly and is low-to-medium risk.
11-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk22u/pull/18 Date: 2024-01-11 13:39:08 +0000
11-01-2024

Changeset: b530c028 Author: Alex Menkov <amenkov@openjdk.org> Date: 2024-01-11 00:36:16 +0000 URL: https://git.openjdk.org/jdk/commit/b530c0281b5082994065b10addeb8366ffa58e2f
11-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17334 Date: 2024-01-10 01:53:02 +0000
10-01-2024

[~mbaesken] Sorry, was on vacation. Going to create a PR after sanity testing
09-01-2024

Hi [~amenkov], do you plan to post a PR based on the current findings ? Or do you prefer when I create a PR ?
28-12-2023

and btw. with your apline_test_diff.patch , it works now too (but just the simple diff above is sufficient too) .
21-12-2023

> JdwpAllowTest.java was updated couple days ago, please update your repo before applying the patch (it makes the test output clearer) Hi [~amenkov], great news - when going to current jdk-head from today (21st December), AND applying the previously recommended isEqualIPv6Addr - patch (see diff below), the test passes on Alpine . diff --git a/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c b/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c index d494a7ecb2c..c68ac6fddb5 100644 --- a/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c +++ b/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c @@ -752,7 +752,8 @@ socketTransport_startListening(jdwpTransportEnv* env, const char* address, if (isEqualIPv6Addr(listenAddr, mappedAny)) { for (ai = addrInfo; ai != NULL; ai = ai->ai_next) { - if (isEqualIPv6Addr(listenAddr, in6addr_any)) { + //if (isEqualIPv6Addr(listenAddr, in6addr_any)) { + if (isEqualIPv6Addr(ai, in6addr_any)) { listenAddr = ai; break; }
21-12-2023

> socketTransport_accept we call dbgsysAccept and there accept is not succeeding but hangs/blocks on Alpine. That's expected. JDWP agent start listening and then create a separate thread with blocking 'accept' call (it waits until debugger connects to the listening socket). 'isPeerAllowed' logic is executed after debugger successfully connected, we can't get debugger address without accepting the connection first. "Connection refused" error means that debugger cannot connect to the JDWP agent, so 'accept' does not return.
21-12-2023

> I repeated it and today no timeout (not sure why it happened yesterday) but an error : [~mbaesken] The log is exactly the same as the original one. I created test patch to get detailed information about how the workaround works (attached alpine_test_diff.patch) Could you please apply it and run the test. JdwpAllowTest.java was updated couple days ago, please update your repo before applying the patch (it makes the test output clearer) I also developed debug version of parseAddress() to emulate apline getaddrinfo() results (you can see it commented in the patch). With unfixed workaround the test fails with the same "Connection refused" on all other platforms, with fixed workaround the test passes, test log shows that the workaround works as expected.
21-12-2023

Btw. what I noticed when comparing traces of the test on Linux Alpine mit other Linux distros with glibc (e.g. SUSE) where the test succeeds, it seems that in socketTransport_accept we call dbgsysAccept and there accept is not succeeding but hangs/blocks on Alpine. While it is fine on the other Linux (SUSE). That looks like a big difference in the test run. we do not even reach the point later in the coding in socketTransport_accept (isPeerAllowed) where peers checking takes place.
20-12-2023

I repeated it and today no timeout (not sure why it happened yesterday) but an error : ----------System.err:(69/2567)---------- localhost address: 127.0.0.1 Starting DefaultTest DefaultTest PASSED Starting ExplicitDefaultTest ExplicitDefaultTest PASSED Starting AllowTest AllowTest PASSED Starting MultiAllowTest MultiAllowTest PASSED Starting DenyTest DenyTest: returned a negative code as expected: -1 DenyTest PASSED Starting MultiDenyTest MultiDenyTest: caught expected IOException MultiDenyTest PASSED Starting EmptyAllowOptionTest EmptyAllowOptionTest: caught expected IOException EmptyAllowOptionTest PASSED Starting ExplicitMultiDefault1Test ExplicitMultiDefault1Test: caught expected IOException ExplicitMultiDefault1Test PASSED Starting ExplicitMultiDefault2Test ExplicitMultiDefault2Test: caught expected IOException ExplicitMultiDefault2Test PASSED Starting PositiveMaskTest(127.0.0.1) PositiveMaskTest(127.0.0.1) PASSED Starting NegativeMaskTest(127.0.0.1) NegativeMaskTest(127.0.0.1) PASSED Starting PositiveMaskTest(0:0:0:0:0:0:0:1) 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:589) at java.base/sun.nio.ch.Net.connect(Net.java:578) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:583) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:752) at java.base/java.net.Socket.connect(Socket.java:687) at java.base/java.net.Socket.<init>(Socket.java:556) at java.base/java.net.Socket.<init>(Socket.java:325) at JdwpAllowTest.handshake(JdwpAllowTest.java:54) at JdwpAllowTest.positiveTest(JdwpAllowTest.java:107) at JdwpAllowTest.main(JdwpAllowTest.java:244) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333) at java.base/java.lang.Thread.run(Thread.java:1570) java.lang.RuntimeException: PositiveMaskTest(0:0:0:0:0:0:0:1) FAILED at JdwpAllowTest.positiveTest(JdwpAllowTest.java:112) at JdwpAllowTest.main(JdwpAllowTest.java:244) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333) at java.base/java.lang.Thread.run(Thread.java:1570) JavaTest Message: Test threw exception: java.lang.RuntimeException JavaTest Message: shutting down test ----------System.out:(117/14740)---------- Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '89569b35-a6da-4c57-9a3e-f4f5c8691b69.lck'] LingeredApp startup took 15109ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 35843 Listening for transport dt_socket at address: 51237 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=*' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '4a6c3d67-f579-4156-839c-da1890857fab.lck'] LingeredApp startup took 15019ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 47905 Listening for transport dt_socket at address: 57087 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '0c849d81-c001-48aa-a24d-e498ea36cbf6.lck'] LingeredApp startup took 15028ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 50409 Listening for transport dt_socket at address: 46497 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1+10.0.0.0/8+172.16.0.0/12+192.168.0.0/24' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' 'fe749d62-4544-4a43-b2e5-631a5b3f51c0.lck'] LingeredApp startup took 15015ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 58453 Listening for transport dt_socket at address: 57661 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=0.0.0.0' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '5040ba74-27de-4bc2-80a2-1333edd2489d.lck'] LingeredApp startup took 15018ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 43617 ]; LingeredApp stderr: [Debugger failed to attach: ERROR: Peer not allowed to connect: <bad address> ] LingeredApp exitValue = 0 Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1;192.168.0.0/24' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '560d9f1b-f28e-4208-9d57-ae342cd16c2c.lck'] LingeredApp failed to start or failed to crash. isAlive=false: java.io.IOException: App exited unexpectedly with 2 LingeredApp stdout: []; LingeredApp stderr: [Error in allow option: '127.0.0.1;192.168.0.0' ERROR: transport error 103: invalid IP address in allow option ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:687] ] LingeredApp exitValue = 2 LingeredApp startup took 1037ms Check for hs_err_pid/core/mdmp files: None. Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' 'f0fd5386-343e-4dfc-82d7-c25ddc1dcf5d.lck'] LingeredApp failed to start or failed to crash. isAlive=false: java.io.IOException: App exited unexpectedly with 1 LingeredApp stdout: []; LingeredApp stderr: [ERROR: JDWP option syntax error: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow= ] LingeredApp exitValue = 1 LingeredApp startup took 1023ms Check for hs_err_pid/core/mdmp files: None. Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=*+127.0.0.1' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' 'f8d329ca-b3ea-4354-a173-7aac6a35ec62.lck'] LingeredApp failed to start or failed to crash. isAlive=false: java.io.IOException: App exited unexpectedly with 2 LingeredApp stdout: []; LingeredApp stderr: [Error in allow option: '*+127.0.0.1' ERROR: transport error 103: allow option '*' cannot be expanded ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:687] ] LingeredApp exitValue = 2 LingeredApp startup took 1020ms Check for hs_err_pid/core/mdmp files: None. Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1+*' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '0f1581bb-0123-4bcb-acf9-638036a1b749.lck'] LingeredApp failed to start or failed to crash. isAlive=false: java.io.IOException: App exited unexpectedly with 2 LingeredApp stdout: []; LingeredApp stderr: [Error in allow option: '*' ERROR: transport error 103: invalid IP address in allow option ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:687] ] LingeredApp exitValue = 2 LingeredApp startup took 1011ms Check for hs_err_pid/core/mdmp files: None. Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.64.0.0/8' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '822be8d4-ccb7-4e09-8591-cb0b94d1055e.lck'] LingeredApp startup took 15017ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 38825 Listening for transport dt_socket at address: 51135 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.64.0.0/9' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '0ef01c14-f5aa-4b11-a9c2-62514a835728.lck'] LingeredApp startup took 15015ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 33067 Listening for transport dt_socket at address: 49813 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/testuser/open_jdk/myjdk/build_alpine/images/jdk/bin/java' '-ea' '-esa' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.util.prefs.userRoot=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-Djava.io.tmpdir=/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/tmp' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=0:0:0:0:0:8000:0:0/79' '-cp' '/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/com/sun/jdi/JdwpAllowTest.d:/testuser/open_jdk/myjdk/build_alpine/jtregbasejdk/workdir/classes/0/test/lib' 'jdk.test.lib.apps.LingeredApp' '1ba1c0c5-ed38-4632-873a-37acd08d60ca.lck'] LingeredApp startup took 15027ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 44943 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: PositiveMaskTest(0:0:0:0:0:0:0:1) FAILED test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: PositiveMaskTest(0:0:0:0:0:0:0:1) FAILED
14-12-2023

[~mbaesken] What test case it's timed out? (the last stdout and stderr records in the test log) And does JdwpListenTest also times out with the patch?
14-12-2023

With the little patch above, we now run into a timeout on Alpine 18 : TEST: com/sun/jdi/JdwpAllowTest.java TEST RESULT: Error. Agent error: java.lang.Exception: Agent 1 timed out with a timeout of 600 seconds; check console log for any additional details
13-12-2023

[~mbaesken] > Hi [~amenkov] , should I test this ? yes please > Or are additional adjustments needed ? No,the rest of workaround code looks good
13-12-2023

Hi [~amenkov] , should I test this ? >condition "isEqualIPv6Addr(listenAddr, in6addr_any)" is incorrect >it should be "isEqualIPv6Addr(ai, in6addr_any)" Or are additional adjustments needed ?
12-12-2023

> [~mbaesken] Alpine is not our supported platform, and we don't have it in our CI. Both JdwpAllowTest and JdwpListenTest works fine on Oracle Linux (and I saw no error reports for other distros). Hi Alex, yes it works here on SUSE, RedHat and Ubuntu too. just not on all Alpine Linux.
12-12-2023

[~mbaesken] The issue was assigned to me for evaluation. Would you like to take this bug as you have a test environment for it?
12-12-2023

Looks like I found the problem in the workaround for JDK-8250630: if (isEqualIPv6Addr(listenAddr, mappedAny)) { for (ai = addrInfo; ai != NULL; ai = ai->ai_next) { if (isEqualIPv6Addr(listenAddr, in6addr_any)) { listenAddr = ai; break; } } } condition "isEqualIPv6Addr(listenAddr, in6addr_any)" is incorrect it should be "isEqualIPv6Addr(ai, in6addr_any)" But I don't understand how it worked on Alpine 3.17
11-12-2023

[~mbaesken] Alpine is not our supported platform, and we don't have it in our CI. Both JdwpAllowTest and JdwpListenTest works fine on Oracle Linux (and I saw no error reports for other distros).
11-12-2023

> I've update addr_info to use exactly the same args + added address comparison logic from workaround works (see addr_info2.c attached). Could you please run it and share the results. Hi [~amenkov], I had to add '#include <netdb.h>' to compile it on my Alpne 3.18. The output it : ./addr_info2 family: AF_UNSPEC, flags: AI_PASSIVE res = 0 AF_INET IPv4 addr '0.0.0.0' AF_INET6 IPv6 addr '::', mappedAny: 0, in6addr_any: 1 family: AF_INET, flags: AI_PASSIVE res = 0 AF_INET IPv4 addr '0.0.0.0' family: AF_INET6, flags: AI_PASSIVE res = 0 AF_INET6 IPv6 addr '::', mappedAny: 0, in6addr_any: 1 family: AF_INET6, flags: AI_PASSIVE | AI_V4MAPPED | AI_ALL res = 0 AF_INET6 IPv6 addr '::ffff:0.0.0.0', mappedAny: 1, in6addr_any: 0 AF_INET6 IPv6 addr '::', mappedAny: 0, in6addr_any: 1 machine details : ------------------------------ more /etc/os-release NAME="Alpine Linux" ID=alpine VERSION_ID=3.18.2 PRETTY_NAME="Alpine Linux v3.18" HOME_URL="https://alpinelinux.org/" BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
11-12-2023

> We have no issues with JdwpAllowTest.java/JdwpListenTest.java in the Oracle CI Hi [~amenkov], regarding your CI, are you talking about Alpine too (or other Linux distros) ? What version of Alpine are you testing on ?
11-12-2023

Hi [~mbaesken]. The output for 3.17 and 3.18 are the same. And it's unclear why the workaround does not work on 3.18 JDWP agent uses almost the same getaddrinfo arguments in the test scenario. I've update addr_info to use exactly the same args + added address comparison logic from workaround works (see addr_info2.c attached). Could you please run it and share the results. We have no issues with JdwpAllowTest.java/JdwpListenTest.java in the Oracle CI
09-12-2023

Hi [~amenkov] have you had time to look at the output above ? Btw. is com/sun/jdi/JdwpAllowTest.java also failing in the internal (CI?) tests at Oracle ?
04-12-2023

Hi [~amenkov], On Alpine 3.17 I get : ./addr_info family: AF_UNSPEC, flags: AI_PASSIVE AF_INET IPv4 addr '0.0.0.0' AF_INET6 IPv6 addr '::' family: AF_INET, flags: AI_PASSIVE AF_INET IPv4 addr '0.0.0.0' family: AF_INET6, flags: AI_PASSIVE AF_INET6 IPv6 addr '::' family: AF_INET6, flags: AI_PASSIVE | AI_V4MAPPED | AI_ALL AF_INET6 IPv6 addr '::ffff:0.0.0.0' AF_INET6 IPv6 addr '::' On Alpine 3.18 it seems to be the same : ./addr_info family: AF_UNSPEC, flags: AI_PASSIVE AF_INET IPv4 addr '0.0.0.0' AF_INET6 IPv6 addr '::' family: AF_INET, flags: AI_PASSIVE AF_INET IPv4 addr '0.0.0.0' family: AF_INET6, flags: AI_PASSIVE AF_INET6 IPv6 addr '::' family: AF_INET6, flags: AI_PASSIVE | AI_V4MAPPED | AI_ALL AF_INET6 IPv6 addr '::ffff:0.0.0.0' AF_INET6 IPv6 addr '::'
19-10-2023

[~mbaesken] I suppose JdwpListenTest fails on "Test: listen at *, attaching to 0:0:0:0:0:0:0:1%1" case, and this is the same issue. Looks like workaround introduced by JDK-8250630 does not work on the system. Could you run addr_info.c (attached to JDK-8250630) on the system and provide the output?
18-10-2023

Hi [~amenkov], JdwpListenTest fails too on the Alpine machines where JdwpAllowTest fails. But I thought it might be easier to look at just one test in the JBS bug; but probably it is the same or similar issue for both tests. Failure of JdwpListenTest (stderr) : java.lang.RuntimeException: ERROR: failed to attach at JdwpListenTest.listenTest(JdwpListenTest.java:106) at JdwpListenTest.main(JdwpListenTest.java:81) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:840) 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:593) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at jdk.jdi/com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:261) at jdk.jdi/com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:119) at jdk.jdi/com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:83) at JdwpListenTest.attach(JdwpListenTest.java:125) at JdwpListenTest.listenTest(JdwpListenTest.java:99) ... 7 more
18-10-2023

[~mbaesken] Thank you for the info. i suppose there are some other differences in behavior on Alpine Linux (and maybe some were introduced with recent updates). A strange thing to me is we have 2 tests - JdwpAllowTest and JdwpListenTest They both have test cases with scenario when debugee listens on "*" (all network interfaces) and the test connect to the debugee from both IPv4 and IPv6 local addresses. I'd expect they both pass or both fail in this scenario, but JDK-8250630 reported only JdwpListenTest failures, and this issue says only about JdwpAllowTest. Could you please confirm JdwpListenTest passes on the same test system
18-10-2023

Hi Alex, I see JdwpAllowTest failures on Alpine from June 2023, so it is probably not directly a regression from recent fix for JDK-8313804 because this came in much later (2023-09-25 09:45). Maybe we need some kind of "extension" to JDK-8250630 ? Or do you have some configuration option in mind that we could set on the Alpine machines to get around those failures ? JDK-8250630 mentions different behavior of getaddrinfo on Alpine vs. e.g. Ubuntu : getaddrinfo(3) on Alpine Linux returns IPv4 address mapped to IPv6 first; ... getaddrinfo(3) on Ubuntu returns only IPv6 address
16-10-2023

This looks similar to JDK-8250630 (it was the same "connection refused" error on Alpine Linux when debug agent listens on all interfaces and client connects from IPv6 address) It may be regression from recent fix for JDK-8313804
13-10-2023

> is the host IPv6 only or it has both IPv4 and IPv6? The Alpine machines have both IPv4 and IPv6 (when disabling IPV6 the test passes but this is probably obvious). output is as follows : ----------System.err:(69/2567)---------- localhost address: 127.0.0.1 Starting DefaultTest DefaultTest PASSED Starting ExplicitDefaultTest ExplicitDefaultTest PASSED Starting AllowTest AllowTest PASSED Starting MultiAllowTest MultiAllowTest PASSED Starting DenyTest DenyTest: returned a negative code as expected: -1 DenyTest PASSED Starting MultiDenyTest MultiDenyTest: caught expected IOException MultiDenyTest PASSED Starting EmptyAllowOptionTest EmptyAllowOptionTest: caught expected IOException EmptyAllowOptionTest PASSED Starting ExplicitMultiDefault1Test ExplicitMultiDefault1Test: caught expected IOException ExplicitMultiDefault1Test PASSED Starting ExplicitMultiDefault2Test ExplicitMultiDefault2Test: caught expected IOException ExplicitMultiDefault2Test PASSED Starting PositiveMaskTest(127.0.0.1) PositiveMaskTest(127.0.0.1) PASSED Starting NegativeMaskTest(127.0.0.1) NegativeMaskTest(127.0.0.1) PASSED Starting PositiveMaskTest(0:0:0:0:0:0:0:1) 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:589) at java.base/sun.nio.ch.Net.connect(Net.java:578) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:583) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:751) at java.base/java.net.Socket.connect(Socket.java:686) at java.base/java.net.Socket.<init>(Socket.java:555) at java.base/java.net.Socket.<init>(Socket.java:324) at JdwpAllowTest.handshake(JdwpAllowTest.java:54) at JdwpAllowTest.positiveTest(JdwpAllowTest.java:107) at JdwpAllowTest.main(JdwpAllowTest.java:244) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333) at java.base/java.lang.Thread.run(Thread.java:1583) java.lang.RuntimeException: PositiveMaskTest(0:0:0:0:0:0:0:1) FAILED at JdwpAllowTest.positiveTest(JdwpAllowTest.java:112) at JdwpAllowTest.main(JdwpAllowTest.java:244) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333) at java.base/java.lang.Thread.run(Thread.java:1583) JavaTest Message: Test threw exception: java.lang.RuntimeException JavaTest Message: shutting down test ----------System.out:(117/13862)---------- Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' '533f92b6-8b71-45d0-9a7b-3005275a7ece.lck'] LingeredApp startup took 1066ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 40993 Listening for transport dt_socket at address: 35845 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=*' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' '8099992e-8b61-439b-b90d-bfd691a783a1.lck'] LingeredApp startup took 1016ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 58317 Listening for transport dt_socket at address: 58109 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' '7a77e42d-fc64-457d-93d3-90eef7f6d16e.lck'] LingeredApp startup took 1003ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 52015 Listening for transport dt_socket at address: 47769 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1+10.0.0.0/8+172.16.0.0/12+192.168.0.0/24' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' '3ac51bb7-e162-4a6b-9922-802945d583f7.lck'] LingeredApp startup took 1004ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 46943 Listening for transport dt_socket at address: 58567 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=0.0.0.0' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' 'd9ad6110-f516-4f7b-be73-1c0af4502dfc.lck'] LingeredApp startup took 1021ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 39533 ]; LingeredApp stderr: [Debugger failed to attach: ERROR: Peer not allowed to connect: <bad address> ] LingeredApp exitValue = 0 Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1;192.168.0.0/24' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' 'fd18cd46-6f14-48d4-8251-c2f1090c5dc1.lck'] LingeredApp failed to start or failed to crash. isAlive=false: java.io.IOException: App exited unexpectedly with 2 LingeredApp stdout: []; LingeredApp stderr: [Error in allow option: '127.0.0.1;192.168.0.0' ERROR: transport error 103: invalid IP address in allow option ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [/wrk/openjdk/nb/linuxmuslx86_64/jdk21u/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:687] ] LingeredApp exitValue = 2 LingeredApp startup took 1035ms Check for hs_err_pid/core/mdmp files: None. Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' '58fb6e1b-1f3e-42b5-8e4d-31a1ee775f16.lck'] LingeredApp failed to start or failed to crash. isAlive=false: java.io.IOException: App exited unexpectedly with 1 LingeredApp stdout: []; LingeredApp stderr: [ERROR: JDWP option syntax error: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow= ] LingeredApp exitValue = 1 LingeredApp startup took 1007ms Check for hs_err_pid/core/mdmp files: None. Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=*+127.0.0.1' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' '1235da95-62f2-458f-9907-3877dbcaef41.lck'] LingeredApp failed to start or failed to crash. isAlive=false: java.io.IOException: App exited unexpectedly with 2 LingeredApp stdout: []; LingeredApp stderr: [Error in allow option: '*+127.0.0.1' ERROR: transport error 103: allow option '*' cannot be expanded ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [/wrk/openjdk/nb/linuxmuslx86_64/jdk21u/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:687] ] LingeredApp exitValue = 2 LingeredApp startup took 1010ms Check for hs_err_pid/core/mdmp files: None. Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.0.1+*' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' 'bbe3e53f-14a7-4a51-9716-de7d2d56d9b9.lck'] LingeredApp failed to start or failed to crash. isAlive=false: java.io.IOException: App exited unexpectedly with 2 LingeredApp stdout: []; LingeredApp stderr: [Error in allow option: '*' ERROR: transport error 103: invalid IP address in allow option ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [/wrk/openjdk/nb/linuxmuslx86_64/jdk21u/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:687] ] LingeredApp exitValue = 2 LingeredApp startup took 1016ms Check for hs_err_pid/core/mdmp files: None. Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.64.0/16' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' 'd033d0f8-d1f9-4baf-bdcb-34153a92d48d.lck'] LingeredApp startup took 1020ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 44659 Listening for transport dt_socket at address: 53967 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=127.0.64.0/17' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' '17998e12-af4c-4187-9ef4-5af9a5e1e6b1.lck'] LingeredApp startup took 1011ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 47253 Listening for transport dt_socket at address: 36725 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 Command line: ['/priv/linuxmuslx86_64/jvm21/bin/java' '-Xmx768m' '-Djava.awt.headless=true' '-Djava.util.prefs.userRoot=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Djava.io.tmpdir=/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/tmp' '-Dtest.getfreeport.max.tries=40' '-ea' '-esa' '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0,allow=0:0:40:0:0:0:0:0/40' '-cp' '/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/com/sun/jdi/JdwpAllowTest.d:/priv/linuxmuslx86_64/jtreg_jdk_tier3_work/JTwork/classes/3/test/lib' 'jdk.test.lib.apps.LingeredApp' 'cafb9bdb-5fbd-4629-94f5-f3506acde1f2.lck'] LingeredApp startup took 1050ms Check for hs_err_pid/core/mdmp files: None. LingeredApp stdout: [Listening for transport dt_socket at address: 46447 ]; LingeredApp stderr: [] LingeredApp exitValue = 0 result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: PositiveMaskTest(0:0:0:0:0:0:0:1) FAILED test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: PositiveMaskTest(0:0:0:0:0:0:0:1) FAILED
13-10-2023

I think that it's wrong way to skip testing on the certain platform. From the log provided I see that test fails on IPv6 loopback (::1) And "Connection refused" means nobody listens on the port. [~mbaesken] could you please provide the rest of the log - is the host IPv6 only or it has both IPv4 and IPv6?
12-10-2023

Hi [~cjplummer] I am not sure if it is "invalid" ; it could be also an issue/problem with the recent Alpine versions. Would be good to know if someone else sees this too with Alpine 3.17 / 3.18 .
12-10-2023

> Can we check for Alpine and avoid this part of the test ? [~mbaesken] Are you suggesting that this part of the test is invalid for Alpine?
12-10-2023