-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
None
-
$ for version in 8 11 16; do JAVA_CMD=/usr/local/openjdk$version/bin/java $JAVA_CMD -version while read -r address; do echo "Running Java $version with '$address'"; timeout 2 $JAVA_CMD -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$address done < input done openjdk version "1.8.0_282" OpenJDK Runtime Environment (build 1.8.0_282-b08) OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode) Running Java 8 with 'localhost' Listening for transport dt_socket at address: 13635 Running Java 8 with 'localhost:0' Listening for transport dt_socket at address: 41635 Running Java 8 with 'localhost:8888' Listening for transport dt_socket at address: 8888 Running Java 8 with 'bsd1srv' Listening for transport dt_socket at address: 63975 Running Java 8 with 'bsd1srv:0' Listening for transport dt_socket at address: 45432 Running Java 8 with 'bsd1srv:8888' Listening for transport dt_socket at address: 8888 Running Java 8 with '*' Listening for transport dt_socket at address: 44412 Running Java 8 with '*:0' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] Running Java 8 with '*:8888' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] Running Java 8 with '0.0.0.0' Listening for transport dt_socket at address: 21478 Running Java 8 with '0.0.0.0:0' Listening for transport dt_socket at address: 39684 Running Java 8 with '0.0.0.0:8888' Listening for transport dt_socket at address: 8888 Running Java 8 with '[::]' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] Running Java 8 with '[::]:0' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] Running Java 8 with '[::]:8888' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment (build 11.0.10+9-1) OpenJDK 64-Bit Server VM (build 11.0.10+9-1, mixed mode) Running Java 11 with 'localhost' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with 'localhost:0' Listening for transport dt_socket at address: 65024 Running Java 11 with 'localhost:8888' Listening for transport dt_socket at address: 8888 Running Java 11 with 'bsd1srv' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with 'bsd1srv:0' Listening for transport dt_socket at address: 27928 Running Java 11 with 'bsd1srv:8888' Listening for transport dt_socket at address: 8888 Running Java 11 with '*' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with '*:0' Listening for transport dt_socket at address: 11505 Running Java 11 with '*:8888' Listening for transport dt_socket at address: 8888 Running Java 11 with '0.0.0.0' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with '0.0.0.0:0' Listening for transport dt_socket at address: 48263 Running Java 11 with '0.0.0.0:8888' Listening for transport dt_socket at address: 8888 Running Java 11 with '[::]' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with '[::]:0' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with '[::]:8888' ERROR: transport error 103: invalid port number specified 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:735] openjdk version "16" 2021-03-16 OpenJDK Runtime Environment (build 16+36-1) OpenJDK 64-Bit Server VM (build 16+36-1, mixed mode, sharing) Running Java 16 with 'localhost' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with 'localhost:0' Listening for transport dt_socket at address: 32353 Running Java 16 with 'localhost:8888' Listening for transport dt_socket at address: 8888 Running Java 16 with 'bsd1srv' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with 'bsd1srv:0' Listening for transport dt_socket at address: 45662 Running Java 16 with 'bsd1srv:8888' Listening for transport dt_socket at address: 8888 Running Java 16 with '*' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with '*:0' Listening for transport dt_socket at address: 17607 Running Java 16 with '*:8888' Listening for transport dt_socket at address: 8888 Running Java 16 with '0.0.0.0' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with '0.0.0.0:0' Listening for transport dt_socket at address: 12854 Running Java 16 with '0.0.0.0:8888' Listening for transport dt_socket at address: 8888 Running Java 16 with '[::]' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with '[::]:0' ERROR: transport error 202: getaddrinfo: failed to parse address 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:734] Running Java 16 with '[::]:8888' ERROR: transport error 202: getaddrinfo: failed to parse address 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:734]
$ for version in 8 11 16; do JAVA_CMD=/usr/local/openjdk$version/bin/java $JAVA_CMD -version while read -r address; do echo "Running Java $version with '$address'"; timeout 2 $JAVA_CMD -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$address done < input done openjdk version "1.8.0_282" OpenJDK Runtime Environment (build 1.8.0_282-b08) OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode) Running Java 8 with 'localhost' Listening for transport dt_socket at address: 13635 Running Java 8 with 'localhost:0' Listening for transport dt_socket at address: 41635 Running Java 8 with 'localhost:8888' Listening for transport dt_socket at address: 8888 Running Java 8 with 'bsd1srv' Listening for transport dt_socket at address: 63975 Running Java 8 with 'bsd1srv:0' Listening for transport dt_socket at address: 45432 Running Java 8 with 'bsd1srv:8888' Listening for transport dt_socket at address: 8888 Running Java 8 with '*' Listening for transport dt_socket at address: 44412 Running Java 8 with '*:0' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] Running Java 8 with '*:8888' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] Running Java 8 with '0.0.0.0' Listening for transport dt_socket at address: 21478 Running Java 8 with '0.0.0.0:0' Listening for transport dt_socket at address: 39684 Running Java 8 with '0.0.0.0:8888' Listening for transport dt_socket at address: 8888 Running Java 8 with '[::]' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] Running Java 8 with '[::]:0' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] Running Java 8 with '[::]:8888' ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment (build 11.0.10+9-1) OpenJDK 64-Bit Server VM (build 11.0.10+9-1, mixed mode) Running Java 11 with 'localhost' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with 'localhost:0' Listening for transport dt_socket at address: 65024 Running Java 11 with 'localhost:8888' Listening for transport dt_socket at address: 8888 Running Java 11 with 'bsd1srv' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with 'bsd1srv:0' Listening for transport dt_socket at address: 27928 Running Java 11 with 'bsd1srv:8888' Listening for transport dt_socket at address: 8888 Running Java 11 with '*' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with '*:0' Listening for transport dt_socket at address: 11505 Running Java 11 with '*:8888' Listening for transport dt_socket at address: 8888 Running Java 11 with '0.0.0.0' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with '0.0.0.0:0' Listening for transport dt_socket at address: 48263 Running Java 11 with '0.0.0.0:8888' Listening for transport dt_socket at address: 8888 Running Java 11 with '[::]' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with '[::]:0' ERROR: transport error 103: invalid port number specified 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:735] Running Java 11 with '[::]:8888' ERROR: transport error 103: invalid port number specified 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:735] openjdk version "16" 2021-03-16 OpenJDK Runtime Environment (build 16+36-1) OpenJDK 64-Bit Server VM (build 16+36-1, mixed mode, sharing) Running Java 16 with 'localhost' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with 'localhost:0' Listening for transport dt_socket at address: 32353 Running Java 16 with 'localhost:8888' Listening for transport dt_socket at address: 8888 Running Java 16 with 'bsd1srv' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with 'bsd1srv:0' Listening for transport dt_socket at address: 45662 Running Java 16 with 'bsd1srv:8888' Listening for transport dt_socket at address: 8888 Running Java 16 with '*' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with '*:0' Listening for transport dt_socket at address: 17607 Running Java 16 with '*:8888' Listening for transport dt_socket at address: 8888 Running Java 16 with '0.0.0.0' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with '0.0.0.0:0' Listening for transport dt_socket at address: 12854 Running Java 16 with '0.0.0.0:8888' Listening for transport dt_socket at address: 8888 Running Java 16 with '[::]' ERROR: transport error 103: invalid port number specified 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:734] Running Java 16 with '[::]:0' ERROR: transport error 202: getaddrinfo: failed to parse address 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:734] Running Java 16 with '[::]:8888' ERROR: transport error 202: getaddrinfo: failed to parse address 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:734]
When calling
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$address
there seems to be a regression regarding the value of address. Most succeed with Java 8, but fail for the same address value for Java 11 and 16.
There are basically two issues:
- parsing is bad and inconsistent across versions
- Output does not correspond to the input.
Root cause seems to be in https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/fa3ecefdd6eb14a910ae75b7c0aefb1cf8eedcce/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketTransportService.java#L218-L239
HttpComponents Core had the same issue and solved it in https://github.com/apache/httpcomponents-core/pull/279
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$address
there seems to be a regression regarding the value of address. Most succeed with Java 8, but fail for the same address value for Java 11 and 16.
There are basically two issues:
- parsing is bad and inconsistent across versions
- Output does not correspond to the input.
Root cause seems to be in https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/fa3ecefdd6eb14a910ae75b7c0aefb1cf8eedcce/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketTransportService.java#L218-L239
HttpComponents Core had the same issue and solved it in https://github.com/apache/httpcomponents-core/pull/279