Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-10063

Deadlock during repository deletion on Oracle RDBMS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 5.5.0
    • 4.14.5
    • None

    Description

      This bug report describes a possible deadlock that may occur during repository deletion. This is likely specific to the Oracle RDBMS which has more specific risks around locks and unindexed foreign keys[1]

      The thread stacks on the system that exhibited this problem showed many threads trying to acquire a DB connection, while 77 of the 80 DB connections were blocked executing statements. The threads holding connections were:

      75 in HibernateWatcherDao.findByWatchableAndUser(HibernateWatcherDao.java:69)
      

      The above were probably victims and not involved in the deadlock. But they explain why all DB connections are exhausted.

      Then the two that are likely involved in the deadlock:

      1 in DriftCommentUpdateProcessor.process(DriftCommentUpdateProcessor.java:190)
      
      1 in HibernatePullRequestDao.deleteByToRepository(HibernatePullRequestDao.java:174)
      

      [1] https://docs.oracle.com/cd/E11882_01/server.112/e40540/consist.htm#CNCPT1339

      Attachments

        Issue Links

          Activity

            People

              dkjellin Daniel
              behumphreys Ben Humphreys
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: