Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-5789

Deadlock during BuildNumber generation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 2.6 rc1, 2.6
    • 2.6 M6
    • Builds
    • None

    Description

      Some Background
      This issue is for deadlocks in a specific code path - BuildNumber generation.

      Problems:
      1. We unnecessary create 2 transactions one when DefaultPlanManager.generateBuildNumber is called and then another one within the first transaction when PlanHibernateDao.generateBuildNumberNewTx. In situation when many threads enter the first transaction and wait for the connection for the second(inner) transaction we get a deadlock.
      2. To ensure the uniqueness of build number we need to use synchronization inside java code. However right now we synchronize from within transaction which is wrong. It can lead to the situation when one thread changed value and exited the synchronized block however has not yet committed the value. Another thread that entered the synchronized block will see a stale value.

      Attachments

        Activity

          People

            akazatchkov Anatoli
            akazatchkov Anatoli
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: