Caused by: org.tmatesoft.svn.core.SVNException: svn: E155004: There are unfinished work items in ZP-MB-JOB1'; run 'svn cleanup' first

Hi Team,

we running with the below error for a long time, we are using bamboo as a CI tool and the svn checkout task failing intermittently and i have also informed to the bamboo support team and i did not get a proper solution so i wanted reach directly to you about the issue

bamboo uses svnkit-1.10.3.jar and svn checkout failing intermittently with the below-mentioned error, please advise ASAP

error 15-Jul-2022 06:57:19 Caused by: org.tmatesoft.svn.core.SVNException: svn: E155004: There are unfinished work items in ‘/sc/bamboo/bamboo-agent-home/xml-data/build-dir/ZP-MB-JOB1’; run ‘svn cleanup’ first.

Thanks,
Manju NS

Hello,

it’s difficult to tell why this happens, based on that information. Probably, the issue is in the way SVNKit is used. I wrote 2 articles about SVNKit resources disposal and SVNKit resources reusability. In some cases, if you reuse a resource that shouldn’t be reused or do not dispose a resource that must be disposed, you get an error like this one.

Also the problem can be caused by some another error happened while some operation with the working copy. .svn/wc.db database contain a table for future operations (called “work items”). Before performing operations over files, SVN and SVNKit fill this table first as a plan of filesystem operations to run (e.g. “move file”, “rename file”, etc.). Then at the end of each command they run the operations from that table and remove finished operations. So after each operation the table should become empty.

If something wrong (e.g. an exception) happens in the middle of the operation, the operation might stop, leaving the table with some unfinished filesystem operations – work items. If one subsequently runs “svn cleanup” command, the command runs the pending operations from that table and clears the table.

So the core reason could be some crash happened in the middle of some operation that left this table with future operations non-empty. This is all I can say given the information provided.