Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71761

pipeline-maven-plugin causing error for database has been closed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins 2.417
      Pipeline Maven Integration Plugin 1314.v09626b_14362f

      We have been randomly receiving errors similar to the following:

      2023-08-03 10:08:21.293 |  Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 212bd301-becb-4518-aa58-d721265b3223
      2023-08-03 10:08:21.293 |  org.jenkinsci.plugins.pipeline.maven.MavenPipelineException: 1 exceptions occured within the publishers of the withMaven pipeline step:
      2023-08-03 10:08:21.293 |  - Pipeline Graph Publisher faced exception while : org.h2.jdbc.JdbcSQLNonTransientConnectionException: The database has been closed [90098-199]
      2023-08-03 10:08:21.293 |  	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:175)
      2023-08-03 10:08:21.293 |  	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution2$WithMavenStepExecutionCallBack.finished(WithMavenStepExecution2.java:1114)
      2023-08-03 10:08:21.293 |  	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onSuccess$0(GeneralNonBlockingStepExecution.java:140)
      2023-08-03 10:08:21.293 |  	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
      2023-08-03 10:08:21.293 |  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
      2023-08-03 10:08:21.293 |  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      2023-08-03 10:08:21.293 |  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      2023-08-03 10:08:21.293 |  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      2023-08-03 10:08:21.293 |  	at java.base/java.lang.Thread.run(Thread.java:833)

      Seeing additional information in the jenkins.err.log of the following:

      2023-08-02 14:01:57.110+0000 [id=669828]	WARNING	jenkins.util.Listeners#lambda$notify$0org.h2.jdbc.JdbcSQLNonTransientConnectionException: The database has been closed [90098-199]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:617)
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
      at org.h2.message.DbException.get(DbException.java:194)
      at org.h2.engine.Session.getTransaction(Session.java:1709)
      at org.h2.engine.Session.getStatementSavepoint(Session.java:1720)
      at org.h2.engine.Session.setSavepoint(Session.java:868)
      at org.h2.command.Command.executeUpdate(Command.java:259)
      at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:200)
      at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:154)
      at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
      at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.recordBuildUpstreamCause(AbstractPipelineMavenPluginDao.java:221)
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDaoDecorator.recordBuildUpstreamCause(AbstractPipelineMavenPluginDaoDecorator.java:38)
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDaoDecorator.recordBuildUpstreamCause(AbstractPipelineMavenPluginDaoDecorator.java:38)
      at org.jenkinsci.plugins.pipeline.maven.dao.MonitoringPipelineMavenPluginDaoDecorator.lambda$recordBuildUpstreamCause$3(MonitoringPipelineMavenPluginDaoDecorator.java:56)
      at org.jenkinsci.plugins.pipeline.maven.dao.MonitoringPipelineMavenPluginDaoDecorator.executeMonitored(MonitoringPipelineMavenPluginDaoDecorator.java:155)
      at org.jenkinsci.plugins.pipeline.maven.dao.MonitoringPipelineMavenPluginDaoDecorator.recordBuildUpstreamCause(MonitoringPipelineMavenPluginDaoDecorator.java:56)
      at org.jenkinsci.plugins.pipeline.maven.listeners.DatabaseSyncRunListener.onInitialize(DatabaseSyncRunListener.java:37)	
      at hudson.model.listeners.RunListener.lambda$fireInitialize$1(RunListener.java:218)
      at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
      at jenkins.util.Listeners.notify(Listeners.java:67)
      at hudson.model.listeners.RunListener.fireInitialize(RunListener.java:216)
      at hudson.model.Run.onStartBuilding(Run.java:2041)
      at hudson.model.Run.execute(Run.java:1865)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
      at hudson.model.ResourceController.execute(ResourceController.java:101)
      at hudson.model.Executor.run(Executor.java:442)	Suppressed: org.h2.jdbc.JdbcSQLNonTransientConnectionException: The database has been closed [90098-199]	
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:617)
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
      at org.h2.message.DbException.get(DbException.java:194)
      at org.h2.engine.Session.getTransaction(Session.java:1709)
      at org.h2.engine.Session.getStatementSavepoint(Session.java:1720)
      at org.h2.engine.Session.setSavepoint(Session.java:868)
      at org.h2.command.Command.executeUpdate(Command.java:259)
      at org.h2.jdbc.JdbcConnection.rollbackInternal(JdbcConnection.java:1603)
      at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:563)	
      at com.zaxxer.hikari.pool.ProxyConnection.close(ProxyConnection.java:257)
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.recordBuildUpstreamCause(AbstractPipelineMavenPluginDao.java:210)... 15 more 
      Caused by: java.lang.IllegalStateException: File corrupted in chunk 172074, expected page length 4..384, got -2096864158 [1.4.199/6]
      at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883)
      at org.h2.mvstore.MVStore.readBufferForPage(MVStore.java:1055)
      at org.h2.mvstore.MVStore$ChunkIdsCollector.visit(MVStore.java:1606)
      at org.h2.mvstore.MVStore$ChunkIdsCollector.visit(MVStore.java:1571)
      at org.h2.mvstore.MVStore$ChunkIdsCollector.visit(MVStore.java:1603)
      at org.h2.mvstore.MVStore$ChunkIdsCollector.visit(MVStore.java:1571)
      at org.h2.mvstore.MVStore$ChunkIdsCollector.visit(MVStore.java:1603)
      at org.h2.mvstore.MVStore.inspectVersion(MVStore.java:1513)
      at org.h2.mvstore.MVStore.collectReferencedChunks(MVStore.java:1458)
      at org.h2.mvstore.MVStore.freeUnusedChunks(MVStore.java:1407)
      at org.h2.mvstore.MVStore.freeUnusedIfNeeded(MVStore.java:1400)
      at org.h2.mvstore.MVStore.storeNow(MVStore.java:1208)
      at org.h2.mvstore.MVStore.store(MVStore.java:1190)
      at org.h2.mvstore.MVStore.tryCommit(MVStore.java:1135)
      at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2763)
      at org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:3123)Caused by: [CIRCULAR REFERENCE: java.lang.IllegalStateException: File corrupted in chunk 172074, expected page length 4..384, got -2096864158 [1.4.199/6]]Caused: org.jenkinsci.plugins.pipeline.maven.util.RuntimeSqlException
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.recordBuildUpstreamCause(AbstractPipelineMavenPluginDao.java:229)
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDaoDecorator.recordBuildUpstreamCause(AbstractPipelineMavenPluginDaoDecorator.java:38)
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDaoDecorator.recordBuildUpstreamCause(AbstractPipelineMavenPluginDaoDecorator.java:38)
      at org.jenkinsci.plugins.pipeline.maven.dao.MonitoringPipelineMavenPluginDaoDecorator.lambda$recordBuildUpstreamCause$3(MonitoringPipelineMavenPluginDaoDecorator.java:56)
      at org.jenkinsci.plugins.pipeline.maven.dao.MonitoringPipelineMavenPluginDaoDecorator.executeMonitored(MonitoringPipelineMavenPluginDaoDecorator.java:155)
      at org.jenkinsci.plugins.pipeline.maven.dao.MonitoringPipelineMavenPluginDaoDecorator.recordBuildUpstreamCause(MonitoringPipelineMavenPluginDaoDecorator.java:56)
      at org.jenkinsci.plugins.pipeline.maven.listeners.DatabaseSyncRunListener.onInitialize(DatabaseSyncRunListener.java:37)
      at hudson.model.listeners.RunListener.lambda$fireInitialize$1(RunListener.java:218)
      at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
      at jenkins.util.Listeners.notify(Listeners.java:67)
      at hudson.model.listeners.RunListener.fireInitialize(RunListener.java:216)
      at hudson.model.Run.onStartBuilding(Run.java:2041)
      at hudson.model.Run.execute(Run.java:1865)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
      at hudson.model.ResourceController.execute(ResourceController.java:101)
      at hudson.model.Executor.run(Executor.java:442)

      The errors seemed to start to spike around updating from Jenkins 2.395 -> 2.410 and continue in 2.417 (latest).

      At the same time of updating to 2.410 the pipeline-maven-plugin was updated from 1279.v5d711113020f -> 1298.v43b_82f220a_e9 and even updated to 1314.v09626b_14362f (latest).

      We have 4 different Jenkins Server (all independent of each other) all configured the same, however, only 1 instance is randomly seeing these errors.  All instances are updated to the latest weekly version as well as latest version of all plugins (as of 8/3/2023).  

            Unassigned Unassigned
            bcoveny Bruce Coveny
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: