Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-35040

Page move action causes database deadlock and data corruption

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Related
      https://jira.atlassian.com/browse/CONF-24883 (similar issue)
      https://jira.atlassian.com/browse/CONF-34870 (slow page move increases window of deadlock)

      Suggested fix(es)

      • Have single (cluster wide) queue for page move operation
      • Hold (cluster) composite lock (parentID:childId), or do two locks in natural ordering (parentId -< childId).

      Side effect of this bug

      • Page Tree cycling eternally and causes OOM in under few minutes.
      • breadcrumbs hits stackoverflow
      • other plugins (indexing?) are not guaranteed to handle cyclic graphs in confluence.

      Symptoms:
      nginx:

      172.24.12.144 - - [23/Sep/2014:01:40:43 +0000] "GET /pages/movepage.action?pageId=2302876189&position=append&targetId=2298943959&atl_token=1a8fab263d4644b9373a3453c9bceea99fdd9166&_=1411436432399 HTTP/1.0" 200 271 "https://extranet.atlassian.com/pages/reorderpages.action?key=ST" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
      172.24.12.144 - - [23/Sep/2014:01:40:44 +0000] "GET /pages/movepage.action?pageId=2302876189&position=above&targetId=2298943959&atl_token=1a8fab263d4644b9373a3453c9bceea99fdd9166&_=1411436436617 HTTP/1.0" 200 271 "https://extranet.atlassian.com/pages/reorderpages.action?key=ST" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
      172.24.12.144 - - [23/Sep/2014:01:40:45 +0000] "GET /pages/movepage.action?pageId=2298943959&position=append&targetId=2302876189&atl_token=1a8fab263d4644b9373a3453c9bceea99fdd9166&_=1411436439759 HTTP/1.0" 200 265 "https://extranet.atlassian.com/pages/reorderpages.action?key=ST" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
      172.24.12.144 - - [23/Sep/2014:01:41:04 +0000] "GET /pages/movepage.action?pageId=2301533426&position=below&targetId=2302876189&atl_token=1a8fab263d4644b9373a3453c9bceea99fdd9166&_=1411436461303 HTTP/1.0" 200 297 "https://extranet.atlassian.com/pages/reorderpages.action?key=ST" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
      172.24.12.144 - - [23/Sep/2014:01:41:06 +0000] "GET /pages/movepage.action?pageId=2301533426&position=above&targetId=2298943959&atl_token=1a8fab263d4644b9373a3453c9bceea99fdd9166&_=1411436465795 HTTP/1.0" 200 297 "https://extranet.atlassian.com/pages/reorderpages.action?key=ST" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
      

      App log(full version attached):

      2014-09-22 20:40:44,397 ERROR [catalina-exec-10] [sf.hibernate.util.JDBCExceptionReporter] logExceptions ERROR: deadlock detected
        Detail: Process 29730 waits for ShareLock on transaction 2482659; blocked by process 14749.
      Process 14749 waits for ShareLock on transaction 2482650; blocked by process 29730.
        Hint: See server log for query details.
      

        1. atlassian-confluence.log.1.gz
          1.47 MB
          Petro Semeniuk
        2. pagemove.log
          211 kB
          Petro Semeniuk
        3. Page Not Found.png
          13 kB
          Jens Kasperek (Bosch GmbH)
        4. Screen Shot 2015-09-29 at 12.22.49.png
          31 kB
          Alain Forrester

            [CONFSERVER-35040] Page move action causes database deadlock and data corruption

            Tam Tran made changes -
            Remote Link New: This issue links to "Page (Extranet)" [ 712342 ]
            Kurt Klinner made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 423185 ]
            R.S. made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 423185 ]
            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2900539 ] New: CONFSERVER Bug Workflow v4 [ 2995271 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2795775 ] New: JAC Bug Workflow v3 [ 2900539 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2737909 ] New: JAC Bug Workflow v2 [ 2795775 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2401307 ] New: JAC Bug Workflow [ 2737909 ]
            Alex Yakovlev (Inactive) made changes -
            Labels Original: affects-cloud affects-server bug-hunt bugfix critical loyalty page-ordering pse-request refactorings New: affects-cloud affects-server bug-hunt critical loyalty page-ordering pse-request refactorings
            Alex Yakovlev (Inactive) made changes -
            Labels Original: affects-cloud affects-server bug-hunt bugfix critical page-ordering pse-request refactorings New: affects-cloud affects-server bug-hunt bugfix critical loyalty page-ordering pse-request refactorings
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 2301413 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2401307 ]

              psemeniuk Petro Semeniuk (Inactive)
              psemeniuk Petro Semeniuk (Inactive)
              Affected customers:
              51 This affects my team
              Watchers:
              67 Start watching this issue

                Created:
                Updated:
                Resolved: