sailfin
  1. sailfin
  2. SAILFIN-1950

Deadlock in b2bua tests for sipsession and dialog fragments

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: milestone 1
    • Component/s: sip_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,950

      Description

      While running b2bua tests under load, we see thread deadlocks (see attachment).
      It's a race condition, so will only happen sporadically.

      What appears to be happening is that one thread is getting the ACK from the UAC
      and has locked the SAS and then goes to lock the Dialog Life Cycle. Meanwhile,
      another thread is getting a 180 OK from the UAS (because we handle things out of
      order....), and it locks the Dialog Life Cycle first and then tries to lock the SAS.

      As a result, the life cycle object remains locked forever, and the dialog
      cleaner can no longer run. This in turn prevents SAS from being cleaned up
      properly, and the instances gets an OutOfMemoryException.

        Activity

        Hide
        Scott Oaks added a comment -

        Created an attachment (id=1100)
        Deadlocked threads

        Show
        Scott Oaks added a comment - Created an attachment (id=1100) Deadlocked threads
        Hide
        Scott Oaks added a comment -

        This particular deadlock is actually in the container code. In general, all
        container code needs to follow locking protocol for the related sip objects:
        lock the SAS, then the SS, then the DF.

        Fix obtained from Joel.

        Checking in sip-stack/src/java/com/ericsson/ssa/sip/dialog/DialogLifeCycle.java;
        /cvs/sailfin/sip-stack/src/java/com/ericsson/ssa/sip/dialog/DialogLifeCycle.java,v
        <-- DialogLifeCycle.java
        new revision: 1.19; previous revision: 1.18
        done

        Show
        Scott Oaks added a comment - This particular deadlock is actually in the container code. In general, all container code needs to follow locking protocol for the related sip objects: lock the SAS, then the SS, then the DF. Fix obtained from Joel. Checking in sip-stack/src/java/com/ericsson/ssa/sip/dialog/DialogLifeCycle.java; /cvs/sailfin/sip-stack/src/java/com/ericsson/ssa/sip/dialog/DialogLifeCycle.java,v <-- DialogLifeCycle.java new revision: 1.19; previous revision: 1.18 done

          People

          • Assignee:
            Scott Oaks
            Reporter:
            Scott Oaks
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: