Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16484

Possible ConstraintViolationException when accessing the admin

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 11.5-rc-1
    • Fix Version/s: None
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      It's rare and was hit at least by org.xwiki.test.ui.extension.ExtensionIT.

      2019-06-18 12:21:51,166 [Exec Stream Pumper] - 2019-06-18 12:21:51,165 [http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?section=XWiki.Extensions&search=&repo=installed] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Error: -104, SQLState: 23505  
      2019-06-18 12:21:51,166 [Exec Stream Pumper] - 2019-06-18 12:21:51,165 [http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?section=XWiki.Extensions&search=&repo=installed] ERROR o.h.e.j.s.SqlExceptionHelper   - integrity constraint violation: unique constraint or index violation; SYS_PK_10260 table: XWIKILOCK  
      2019-06-18 12:21:51,482 [Exec Stream Pumper] - 2019-06-18 12:21:51,468 [http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?section=XWiki.Extensions&search=&repo=installed] ERROR c.x.x.w.AdminAction            - Exception while setting up lock  
      2019-06-18 12:21:51,482 [Exec Stream Pumper] - com.xpn.xwiki.XWikiException: Error number 13006 in 3: Exception while locking document for lock [userName = [XWiki.superadmin], docId = [6152552094868048244], date = [Tue Jun 18 12:21:51 CEST 2019]] 
      2019-06-18 12:21:51,483 [Exec Stream Pumper] - Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement 
      2019-06-18 12:21:51,483 [Exec Stream Pumper] - Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement 
      2019-06-18 12:21:51,483 [Exec Stream Pumper] - Caused by: java.sql.SQLIntegrityConstraintViolationException: integrity constraint violation: unique constraint or index violation; SYS_PK_10260 table: XWIKILOCK 
      2019-06-18 12:21:51,483 [Exec Stream Pumper] - Caused by: org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation; SYS_PK_10260 table: XWIKILOCK 
      

       

      Looks like in some condition AdminAction will try to save a lock while it's already there.

       

      The two possibilities I can think of are:

      • two new admin access at the exact same time but I don't see how it's possible with this test
      • or loadLock (which is used by AdminAction to check if there is already a lock) not working but we would have this log a lot more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tmortagne Thomas Mortagne
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: