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

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

    XMLWordPrintable

Details

    Backports

      Description

        ---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: 500, 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.
        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

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

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

        ---Enter the method createSocket
        ===Leave the method: createSocket
        ----------System.err:(15/985)----------
        java.lang.RuntimeException: Possible deadlock!
        at MultiThreadDeadLockTest.main(MultiThreadDeadLockTest.java:126)
        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:566)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
        at java.base/java.lang.Thread.run(Thread.java:832)

        JavaTest Message: Test threw exception: java.lang.RuntimeException: Possible deadlock!
        JavaTest Message: shutting down test

        STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Possible deadlock!
        Jun 18, 2018 4:45:16 PM com.sun.jmx.remote.internal.ClientCommunicatorAdmin restart
        WARNING: Failed to restart: java.rmi.NoSuchObjectException: no such object in table

        Attachments

          Issue Links

            Activity

              People

                dtitov Daniil Titov (Inactive)
                ljiang Leo Jiang (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: