jenkinsci / jenkinsci/subversion-plugin

[JENKINS-45496] Frequent failures to check out, with "There are unfinished transactions detected"

Open
#1,434 0 comments 0 reactions 0 assignees View on GitHub
component:subversion-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
131
Forks
275
Avg merge
12h 4m
Merged PRs (30d)
6

Description

We're using "Emulate clean checkout by first deleting unversioned/ignored files, then 'svn update'".

Something somewhere in Jenkins is not closing its file handles. We're still trying to figure out what, but as a result of that, sometimes the first checkout attempt fails with "Too many open files".

When the first attempt to check out fails, Jenkins retries. But when it retries, a bunch of files are successfully checked out, until it eventually fail for a different reason.

```
07-12 22:12:32 U dir/file1.java
07-12 22:12:32 U dir/file2.java
07-12 22:12:32 U dir/file3.java
07-12 22:12:32 U dir/file4.java
07-12 22:12:33 ERROR: Failed to update https://svn/acme/trunk/product
07-12 22:12:33 org.tmatesoft.svn.core.SVNException: svn: E200030: There are unfinished transactions detected in '/opt/jenkins/jobs/trunk-functional-matrix/workspace'
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDbRoot.ensureNoUnfinishedTransactions(SVNWCDbRoot.java:177)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.ensureNoUnfinishedTransactions(SVNWCDb.java:212)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.SVNWCContext.ensureNoUnfinishedTransactions(SVNWCContext.java:5179)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.releaseWcContext(SvnOperationFactory.java:1259)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1249)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
07-12 22:12:33 at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:158)
07-12 22:12:33 at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1000)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:976)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:952)
07-12 22:12:33 at hudson.FilePath.act(FilePath.java:998)
07-12 22:12:33 at hudson.FilePath.act(FilePath.java:976)
07-12 22:12:33 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:901)
07-12 22:12:33 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:837)
07-12 22:12:33 at hudson.scm.SCM.checkout(SCM.java:495)
07-12 22:12:33 at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
07-12 22:12:33 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
07-12 22:12:33 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
07-12 22:12:33 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
07-12 22:12:33 at hudson.model.Run.execute(Run.java:1735)
07-12 22:12:33 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:313)
07-12 22:12:33 at hudson.model.ResourceController.execute(ResourceController.java:97)
07-12 22:12:33 at hudson.model.Executor.run(Executor.java:415)
07-12 22:12:33 ERROR: Subversion update failed
07-12 22:12:33 org.tmatesoft.svn.core.SVNException: svn: E200030: There are unfinished transactions detected in '/opt/jenkins/jobs/trunk-functional-matrix/workspace'
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDbRoot.ensureNoUnfinishedTransactions(SVNWCDbRoot.java:177)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.ensureNoUnfinishedTransactions(SVNWCDb.java:212)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.SVNWCContext.ensureNoUnfinishedTransactions(SVNWCContext.java:5179)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.releaseWcContext(SvnOperationFactory.java:1259)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1249)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
07-12 22:12:33 at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:158)
07-12 22:12:33 Caused: hudson.scm.subversion.UpdaterException: failed to perform svn update
07-12 22:12:33 Caused: java.io.IOException
07-12 22:12:33 at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:212)
07-12 22:12:33 at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1000)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:976)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:952)
07-12 22:12:33 at hudson.FilePath.act(FilePath.java:998)
07-12 22:12:33 at hudson.FilePath.act(FilePath.java:976)
07-12 22:12:33 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:901)
07-12 22:12:33 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:837)
07-12 22:12:33 at hudson.scm.SCM.checkout(SCM.java:495)
07-12 22:12:33 at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
07-12 22:12:33 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
07-12 22:12:33 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
07-12 22:12:33 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
07-12 22:12:33 at hudson.model.Run.execute(Run.java:1735)
07-12 22:12:33 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:313)
07-12 22:12:33 at hudson.model.ResourceController.execute(ResourceController.java:97)
07-12 22:12:33 at hudson.model.Executor.run(Executor.java:415)
```

The assumption is that the Subversion connection is not being closed in a finally block, or something along those lines.

 

---
Originally reported by trejkaz, imported from: Frequent failures to check out, with "There are unfinished transactions detected"


  • status: Open
  • priority: Minor
  • component(s): subversion-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251212-090250

Raw content of original issue

We're using "Emulate clean checkout by first deleting unversioned/ignored files, then 'svn update'".

Something somewhere in Jenkins is not closing its file handles. We're still trying to figure out what, but as a result of that, sometimes the first checkout attempt fails with "Too many open files".

When the first attempt to check out fails, Jenkins retries. But when it retries, a bunch of files are successfully checked out, until it eventually fail for a different reason.



07-12 22:12:32 U         dir/file1.java

07-12 22:12:32 U dir/file2.java
07-12 22:12:32 U dir/file3.java
07-12 22:12:32 U dir/file4.java
07-12 22:12:33 ERROR: Failed to update https://svn/acme/trunk/product
07-12 22:12:33 org.tmatesoft.svn.core.SVNException: svn: E200030: There are unfinished transactions detected in '/opt/jenkins/jobs/trunk-functional-matrix/workspace'
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDbRoot.ensureNoUnfinishedTransactions(SVNWCDbRoot.java:177)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.ensureNoUnfinishedTransactions(SVNWCDb.java:212)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.SVNWCContext.ensureNoUnfinishedTransactions(SVNWCContext.java:5179)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.releaseWcContext(SvnOperationFactory.java:1259)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1249)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
07-12 22:12:33 at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:158)
07-12 22:12:33 at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1000)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:976)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:952)
07-12 22:12:33 at hudson.FilePath.act(FilePath.java:998)
07-12 22:12:33 at hudson.FilePath.act(FilePath.java:976)
07-12 22:12:33 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:901)
07-12 22:12:33 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:837)
07-12 22:12:33 at hudson.scm.SCM.checkout(SCM.java:495)
07-12 22:12:33 at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
07-12 22:12:33 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
07-12 22:12:33 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
07-12 22:12:33 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
07-12 22:12:33 at hudson.model.Run.execute(Run.java:1735)
07-12 22:12:33 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:313)
07-12 22:12:33 at hudson.model.ResourceController.execute(ResourceController.java:97)
07-12 22:12:33 at hudson.model.Executor.run(Executor.java:415)
07-12 22:12:33 ERROR: Subversion update failed
07-12 22:12:33 org.tmatesoft.svn.core.SVNException: svn: E200030: There are unfinished transactions detected in '/opt/jenkins/jobs/trunk-functional-matrix/workspace'
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDbRoot.ensureNoUnfinishedTransactions(SVNWCDbRoot.java:177)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.ensureNoUnfinishedTransactions(SVNWCDb.java:212)
07-12 22:12:33 at org.tmatesoft.svn.core.internal.wc17.SVNWCContext.ensureNoUnfinishedTransactions(SVNWCContext.java:5179)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.releaseWcContext(SvnOperationFactory.java:1259)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1249)
07-12 22:12:33 at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
07-12 22:12:33 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
07-12 22:12:33 at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:158)
07-12 22:12:33 Caused: hudson.scm.subversion.UpdaterException: failed to perform svn update
07-12 22:12:33 Caused: java.io.IOException
07-12 22:12:33 at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:212)
07-12 22:12:33 at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1000)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:976)
07-12 22:12:33 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:952)
07-12 22:12:33 at hudson.FilePath.act(FilePath.java:998)
07-12 22:12:33 at hudson.FilePath.act(FilePath.java:976)
07-12 22:12:33 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:901)
07-12 22:12:33 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:837)
07-12 22:12:33 at hudson.scm.SCM.checkout(SCM.java:495)
07-12 22:12:33 at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
07-12 22:12:33 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
07-12 22:12:33 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
07-12 22:12:33 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
07-12 22:12:33 at hudson.model.Run.execute(Run.java:1735)
07-12 22:12:33 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:313)
07-12 22:12:33 at hudson.model.ResourceController.execute(ResourceController.java:97)
07-12 22:12:33 at hudson.model.Executor.run(Executor.java:415)


The assumption is that the Subversion connection is not being closed in a finally block, or something along those lines.

 

environment

```
Jenkins 2.69

Subversion Plugin 2.8
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.