Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3440

Deadlock on LOCAL_REVISION table in clustering environment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.4.3
    • 2.5.3
    • clustering
    • None
    • Env.1: 4x Linux server CentOS 5 MSSQL 2008 database (production system)
      Env.2: 2x Linux Ubuntu 10.04 server tested with PostgreSQL 9.1, H2, MSSQL 2008 and mySQL 5.5 (lab system)

    Description

      When inserting a lot of nodes concurrently (100/200 threads) the system hangs generating a deadlock on the LOCAL_REVISION table.
      There is a thread that starts a transaction but the transaction remains open, while another thread tries to acquire the lock on the table.
      This actually happen even if there is only a server up but configured in cluster mode.
      I found that in AbstractJournal, we try to write the LOCAL_REVISION even if we don't sync any record because they're generated by the same journal of the thread running.

      Removing this unnecessary (to me ) write to the LOCAL_REVISION table, remove the deadlock.

      Attachments

        1. catalina.out
          2.48 MB
          Luca Tagliani
        2. catalina.out
          2.81 MB
          Luca Tagliani
        3. fixAlwaysBatchMode.patch
          1 kB
          Bart van der Schans
        4. fixNoLockOnLocalRevisionsWIP.java
          4 kB
          Bart van der Schans
        5. JCR-3440.patch
          2 kB
          Luca Tagliani
        6. report.html
          5 kB
          Luca Tagliani
        7. threadDump-JCR-3440.txt
          186 kB
          Luca Tagliani

        Issue Links

          Activity

            People

              schans Bart van der Schans
              luca.tagliani Luca Tagliani
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: