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

Page move action causes database deadlock and data corruption

XMLWordPrintable

      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
        2. pagemove.log
          211 kB
        3. Page Not Found.png
          13 kB
        4. Screen Shot 2015-09-29 at 12.22.49.png
          31 kB

              psemeniuk Petro Semeniuk (Inactive)
              psemeniuk Petro Semeniuk (Inactive)
              Votes:
              51 Vote for this issue
              Watchers:
              68 Start watching this issue

                Created:
                Updated:
                Resolved: