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

Fix spurious exception from h2 when interrupting a thread

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.10
    • Component/s: Runtime

      Description

      When a thread is being interrupted (during hot-reload), it may raise the following exception which causes an ERROR in the logs. The ERROR is unwanted and should be hidden.

      2017-10-06 18:45:09,452 ERROR [Nuxeo-Work-fulltextUpdater-1:3925565099461424.1973718396] [org.apache.geronimo.transaction.manager.RollbackTask] Unexpected exception committing org.apache.geronimo.connector.outbound.LocalXAResource@6dd4cb8b; continuing to commit other RMs
      javax.transaction.xa.XAException
      	at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:88)
      	at org.apache.geronimo.transaction.manager.RollbackTask.run(RollbackTask.java:63)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:584)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:491)
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:265)
      	at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.rollback(NuxeoContainer.java:556)
      	at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:386)
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:402)
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:338)
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.resource.spi.LocalTransactionException: Unable to rollback
      	at org.nuxeo.runtime.datasource.PooledDataSourceFactory$JdbcConnectionFactory$1ManagedJDBCConnection.localTransactionRollback(PooledDataSourceFactory.java:281)
      	at org.tranql.connector.AbstractManagedConnection$LocalTransactionImpl.rollback(AbstractManagedConnection.java:203)
      	at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:86)
      	... 12 more
      Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: Writing to cache:nio:/opt/jenkins/workspace/TestAndPush/ondemand-testandpush-fguillaume/nuxeo-distribution/nuxeo-server-hotreload-tests/target/tomcat/nxserver/data/h2/nuxeo.mv.db failed; length 61440 at 8908800 [1.4.177/2]"; SQL statement:
      ROLLBACK [50000-177]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
      	at org.h2.message.DbException.get(DbException.java:167)
      	at org.h2.message.DbException.convert(DbException.java:294)
      	at org.h2.command.Command.executeUpdate(Command.java:262)
      	at org.h2.jdbc.JdbcConnection.rollbackInternal(JdbcConnection.java:1500)
      	at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:488)
      	at org.nuxeo.runtime.datasource.PooledDataSourceFactory$JdbcConnectionFactory$1ManagedJDBCConnection.localTransactionRollback(PooledDataSourceFactory.java:279)
      	... 14 more
      Caused by: java.lang.IllegalStateException: Writing to cache:nio:/opt/jenkins/workspace/TestAndPush/ondemand-testandpush-fguillaume/nuxeo-distribution/nuxeo-server-hotreload-tests/target/tomcat/nxserver/data/h2/nuxeo.mv.db failed; length 61440 at 8908800 [1.4.177/2]
      	at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:757)
      	at org.h2.mvstore.DataUtils.writeFully(DataUtils.java:450)
      	at org.h2.mvstore.FileStore.writeFully(FileStore.java:114)
      	at org.h2.mvstore.MVStore.write(MVStore.java:729)
      	at org.h2.mvstore.MVStore.storeNow(MVStore.java:1050)
      	at org.h2.mvstore.MVStore.commitAndSave(MVStore.java:893)
      	at org.h2.mvstore.MVStore.commit(MVStore.java:854)
      	at org.h2.mvstore.db.MVTableEngine$Store.flush(MVTableEngine.java:199)
      	at org.h2.engine.Database.flush(Database.java:1966)
      	at org.h2.engine.Session.endTransaction(Session.java:545)
      	at org.h2.engine.Session.rollback(Session.java:582)
      	at org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:50)
      	at org.h2.command.CommandContainer.update(CommandContainer.java:79)
      	at org.h2.command.Command.executeUpdate(Command.java:254)
      	... 17 more
      Caused by: java.nio.channels.ClosedByInterruptException
      	at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
      	at sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:783)
      	at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:764)
      	at org.h2.store.fs.FileNio.write(FilePathNio.java:80)
      	at org.h2.mvstore.cache.FilePathCache$FileCache.write(FilePathCache.java:124)
      	at org.h2.mvstore.DataUtils.writeFully(DataUtils.java:446)
      	... 29 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h