Deadlock during repository deletion on Oracle RDBMS

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 5.5.0
    • Affects Version/s: 4.14.5
    • Component/s: None
    • Severity 2 - Major
    • 14

      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

            Assignee:
            Daniel (Inactive)
            Reporter:
            Ben Humphreys
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: