Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31768

Fix TestDocumentRoutingServiceImport#testImportRouteModelUseKeyValueStore random failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 2023.0, 2021.35
    • Component/s: Tests, Workflow

      Description

      Seen in https://jenkins.platform.dev.nuxeo.com/blue/rest/organizations/jenkins/pipelines/nuxeo/pipelines/lts/pipelines/nuxeo/branches/PR-1054/runs/1/nodes/268/steps/353/log/?start=0

      It is a Postgres concurrent delete error?

      Caused by: org.postgresql.util.PSQLException: ERROR: deadlock detected
      [2023-03-16T12:09:41.766Z]   Detail: Process 26905 waits for ShareLock on transaction 228276; blocked by process 26908.
      [2023-03-16T12:09:41.766Z] Process 26908 waits for ShareLock on transaction 228275; blocked by process 26905.
      [2023-03-16T12:09:41.766Z]   Hint: See server log for query details.
      [2023-03-16T12:09:41.766Z]   Where: while deleting tuple (0,31) in relation "fulltext"
      [2023-03-16T12:09:41.766Z] SQL statement "DELETE FROM ONLY "public"."fulltext" WHERE $1::pg_catalog.text OPERATOR(pg_catalog.=) "id"::pg_catalog.text"
      

      Full stack:

      [2023-03-16T12:09:41.765Z]   * service:org.nuxeo.ecm.platform.routing.FileManagerService.contrib references missing [target=org.nuxeo.ecm.platform.filemanager.service.FileManagerService;point=plugins]
      [2023-03-16T12:09:41.765Z] ======================================================================
      [2023-03-16T12:09:41.765Z] [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.199 s <<< FAILURE! - in org.nuxeo.ecm.platform.routing.test.TestDocumentRoutingServiceImport
      [2023-03-16T12:09:41.765Z] [ERROR] testImportRouteModelUseKeyValueStore(org.nuxeo.ecm.platform.routing.test.TestDocumentRoutingServiceImport)  Time elapsed: 6.076 s  <<< ERROR!
      [2023-03-16T12:09:41.765Z] org.nuxeo.ecm.core.api.ConcurrentUpdateException: Failed to remove document c28aba9e-6dde-4a11-9d76-e7c7fdbe9fe8, Concurrent update
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.checkConcurrentUpdate(JDBCConnection.java:172)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.deleteRowsDirect(JDBCRowMapper.java:821)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.remove(JDBCRowMapper.java:1262)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.remove(SoftRefCachingRowMapper.java:453)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.PersistenceContext.removeNode(PersistenceContext.java:1001)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.SessionImpl.removeNode(SessionImpl.java:919)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.remove(SQLSession.java:598)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.remove(SQLDocumentLive.java:169)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.remove(SQLDocumentLive.java:175)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.api.AbstractSession.removeNotifyOneDoc(AbstractSession.java:1536)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.api.AbstractSession.removeDocument(AbstractSession.java:1507)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.core.api.AbstractSession.removeDocument(AbstractSession.java:1497)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.platform.routing.core.persistence.RouteModelsZipImporter.createOrUpdate(RouteModelsZipImporter.java:92)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.platform.filemanager.service.FileManagerService.createOrUpdateDocument(FileManagerService.java:362)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl.importRouteModel(DocumentRoutingServiceImpl.java:693)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl.importAllRouteModels(DocumentRoutingServiceImpl.java:675)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.ecm.platform.routing.test.TestDocumentRoutingServiceImport.testImportRouteModelUseKeyValueStore(TestDocumentRoutingServiceImport.java:251)
      [2023-03-16T12:09:41.765Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [2023-03-16T12:09:41.765Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [2023-03-16T12:09:41.765Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [2023-03-16T12:09:41.765Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      [2023-03-16T12:09:41.765Z] 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      [2023-03-16T12:09:41.765Z] 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeMethodRunStatement.evaluate(FeaturesRunner.java:457)
      [2023-03-16T12:09:41.765Z] 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeSetupStatement.evaluate(FeaturesRunner.java:471)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner.evaluateRunnable(FeaturesRunner.java:328)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterMethodRunStatement.evaluate(FeaturesRunner.java:493)
      [2023-03-16T12:09:41.765Z] 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner.evaluateRunnable(FeaturesRunner.java:328)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterTeardownStatement.evaluate(FeaturesRunner.java:506)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:576)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.RuntimeDeployment$DeploymentStatement.evaluate(RuntimeDeployment.java:303)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterClassStatement.evaluate(FeaturesRunner.java:404)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:576)
      [2023-03-16T12:09:41.765Z] 	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeClassStatement.evaluate(FeaturesRunner.java:387)
      [2023-03-16T12:09:41.765Z] 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.Suite.runChild(Suite.java:128)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.Suite.runChild(Suite.java:27)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      [2023-03-16T12:09:41.765Z] 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      [2023-03-16T12:09:41.766Z] 	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      [2023-03-16T12:09:41.766Z] 	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      [2023-03-16T12:09:41.766Z] 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      [2023-03-16T12:09:41.766Z] Caused by: org.postgresql.util.PSQLException: ERROR: deadlock detected
      [2023-03-16T12:09:41.766Z]   Detail: Process 26905 waits for ShareLock on transaction 228276; blocked by process 26908.
      [2023-03-16T12:09:41.766Z] Process 26908 waits for ShareLock on transaction 228275; blocked by process 26905.
      [2023-03-16T12:09:41.766Z]   Hint: See server log for query details.
      [2023-03-16T12:09:41.766Z]   Where: while deleting tuple (0,31) in relation "fulltext"
      [2023-03-16T12:09:41.766Z] SQL statement "DELETE FROM ONLY "public"."fulltext" WHERE $1::pg_catalog.text OPERATOR(pg_catalog.=) "id"::pg_catalog.text"
      [2023-03-16T12:09:41.766Z] 	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
      [2023-03-16T12:09:41.766Z] 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
      [2023-03-16T12:09:41.766Z] 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
      [2023-03-16T12:09:41.766Z] 	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
      [2023-03-16T12:09:41.766Z] 	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
      [2023-03-16T12:09:41.766Z] 	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:167)
      [2023-03-16T12:09:41.766Z] 	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:135)
      [2023-03-16T12:09:41.766Z] 	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
      [2023-03-16T12:09:41.766Z] 	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
      [2023-03-16T12:09:41.766Z] 	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.deleteRowsDirect(JDBCRowMapper.java:817)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: