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

JMX MultiThreadDeadLockTest.java fails with "Listener not found"

XMLWordPrintable

      The following test failed in the JDK20 CI:

      javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java

      Here's a snippet from the log file:

      #section:main
      ----------messages:(7/308)----------
      command: main MultiThreadDeadLockTest
      reason: User specified action: run main MultiThreadDeadLockTest
      started: Wed Oct 26 02:49:29 UTC 2022
      Mode: othervm
      Additional options from @modules: --add-modules java.management,java.management.rmi
      finished: Wed Oct 26 02:49:36 UTC 2022
      elapsed time (seconds): 6.966
      ----------configuration:(3/63)----------
      Boot Layer
        add modules: java.management java.management.rmi

      ----------System.out:(46/1904)----------
      Create the MBean server
      Initialize environment map
      Specify a client socket factory to control socket creation.
      Specify a server idle timeout to make a server close an idle connection.
      Disable client heartbeat.
      Create an RMI server
      Create jmx client on service:jmx:rmi://ubuntu-22-04-x64-19801/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHciAAtVbmljYXN0UmVmMgEADjEwMC43My4yMDEuMjMxAACvd3NyAChNdWx0aVRocmVhZERlYWRMb2NrVGVzdCRSTUlDbGllbnRGYWN0b3J5rInsFbB/cr0CAAB4cHcXTybQypxA/JG4+V20AAABhBIx4UeAAQB4

      ---Enter the method createSocket
      ===Leave the method: createSocket

      ---Enter the method createSocket
      ===Leave the method: createSocket
      Register the mbean: default:name=toto
      Add listener to toto MBean
      send notif, listener will block the fetcher

      ---Enter the method sendNotif
      ===Leave the method: sendNotif

      ---Enter the method handleNotification
      Sleep 3 times of server idle timeout: 2000, the sever should close the idle connection.
      start the user thread to call mbean method, it will get IOexception and start the reconnection, the socket factory will block the socket creation.

      ---Enter the method createSocket
      Free the listener, the fetcher will get IO and makes a deadlock if the bug is not fixed.
      ===Leave the method: handleNotification

      ---Enter the method createSocket
      Allow to create new socket for the reconnection
      Check whether the user thread gets free to call the mbean.
      ===Leave the method: createSocket
      ===Leave the method: createSocket

      ---Enter the method createSocket
      ===Leave the method: createSocket

      ---Enter the method createSocket
      ===Leave the method: createSocket

      ---Enter the method createSocket
      ===Leave the method: createSocket

      ---Enter the method allowReturn
      ===Leave the method: allowReturn
      Remove the listener.
      ----------System.err:(13/937)----------
      javax.management.ListenerNotFoundException: Listener not found
      at java.management/com.sun.jmx.remote.internal.ClientNotifForwarder.getListenerId(ClientNotifForwarder.java:231)
      at java.management.rmi/javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.removeNotificationListener(RMIConnector.java:1301)
      at MultiThreadDeadLockTest.main(MultiThreadDeadLockTest.java:133)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
      at java.base/java.lang.Thread.run(Thread.java:1591)

      JavaTest Message: Test threw exception: javax.management.ListenerNotFoundException: Listener not found
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: javax.management.ListenerNotFoundException: Listener not found
      ----------rerun:(36/6087)*----------

            Unassigned Unassigned
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: