Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8231915

two JDI tests interfere with each other

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b24
    • CPU:
      generic
    • OS:
      generic

      Description

      The following two tests failed in the JDK14 CI:

      com/sun/jdi/JdwpNetProps.java
      com/sun/jdi/JdwpListenTest.java

      For JdwpNetProps.java, the log snippet is:

      [debuggee] Listening for transport dt_socket at address: 56804
      Debuggee is listening on localhost:56804
      Connecting from 127.0.0.1, expected: Success
      [debuggee] Listening for transport dt_socket at address: 18330
      [debuggee] Hello, world!
      ----------System.err:(27/1677)----------
      java.lang.RuntimeException: ERROR: failed to attach
      at JdwpNetProps$ListenTest.run(JdwpNetProps.java:146)
      at JdwpNetProps.main(JdwpNetProps.java:66)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:830)
      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:493)
      at java.base/sun.nio.ch.Net.connect(Net.java:482)
      at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588)
      at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:344)
      at java.base/java.net.Socket.connect(Socket.java:585)
      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 JdwpNetProps.attach(JdwpNetProps.java:174)
      at JdwpNetProps$ListenTest.run(JdwpNetProps.java:135)
      ... 7 more

      JavaTest Message: Test threw exception: java.lang.RuntimeException: ERROR: failed to attach
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: ERROR: failed to attach
      ----------rerun:(45/6225)*----------


      For JdwpListenTest.java, the log snippet is:

      Debuggee is listening on 10.133.185.241:56804
      Connecting from 127.0.0.1, expected: FAILURE
      ----------System.err:(14/882)----------
      java.lang.RuntimeException: ERROR: attached successfully
      at JdwpListenTest.listenTest(JdwpListenTest.java:91)
      at JdwpListenTest.main(JdwpListenTest.java:63)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:830)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: ERROR: attached successfully
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: ERROR: attached successfully
      ----------rerun:(45/6235)*----------


      Test JdwpListenTest.java has a debuggee listening on
      10.133.185.241:56804 and was expecting to fail to
      attach/connect via 127.0.0.1:56804. However, it was
      able to attach/connect so the test failed.

      Test JdwpNetProps.java had a debuggee listening on
      localhost:56804 and it was expecting to attach/connect
      via 127.0.0.1:56804. However, it failed due to
      java.net.ConnectException: Connection refused.

      The debuggee from JdwpNetProps.java connected with
      the client from JdwpListenTest.java which was expecting
      to not connect (so the test failed).

      The client from JdwpNetProps.java failed to connect to
      its debuggee because the client from JdwpListenTest.java
      was already connected so that test failed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              amenkov Alex Menkov
              Reporter:
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: