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

DEADLOCK IN SSLSOCKETIMPL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • None
    • security-libs

      SSL socket connected between two java processes on multi-core servers, in
      which the client side is constantly sending data. Architecture on the client
      side is such that there are separate threads reading and writing to the same
      socket. If the server side of the connection drops, the client side
      deadlocks most (not all - it is obviously a race) of the time. From looking
      at the thread dump it appears that if the client is performing a send during
      the time the connection is dropping the deadlock occurs.

      The deadlock appears to be between Threads 3902 which is doing an
      AppInputStream read which immediately encounters an exception in
      SSLSocketImpl which results in the SSLSocketImpl object being locked,
      followed by an attempt to lock ReentrantLock$NonfairSync@41f8f72f.
      The other thread id in question is 22, which is doing a send via an
      AppOutputStream which ultimately ends up locking
      ReentrantLock$NonfairSync@41f8f72f. and then trying to grab the lock on
      the SSLSocketImpl object... i.e. the reverse order. A close does happen
      to be going on at the same time, but that thread (64) is simply blocked
      on the SSLSocketImpl object as well... i.e. it did not grab any locks of
      interest.

      The problem did not
      exist in 1.6 update 33, but got introduced between updates 34 and 37...
      and the problem still exists in update 45.

      system configuration
      ====================
      Attaching to process ID 2997, please wait...
      Debugger attached successfully.
      Server compiler detected.
      JVM version is 20.45-b01
      Java System Properties:

      platform = linux
      db.userdata.file = /var/mcp/run/MCP_18.0/AM1_0/data/.dbuserdata
      foundation.debug.port = 12300
      user.timezone = Europe/Moscow
      ne.mgmt.basePort = 12300
      ne.name = AM1
      db.host = 192.168.209.212
      ne.instance.id = 0

      VM Flags:

      -XX:NewSize=8m -XX:MaxNewSize=8m -XX:+UseParNewGC -XX:MaxTenuringThreshold=0
      -Xms88m -Xmx88m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=68
      -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseMembar -XX:+PrintClassHistogram
      -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF8
      -DpropFile=../data/neprops.tx

            xuelei Xuelei Fan
            mbankal Mala Bankal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: