Build fails with repository exception: svn: E175002: No space left on device
Symptoms
A build plan fails when checking out the code from a Subversion repository.
Following is what shows up in the build logs:
simple 27-Aug-2013 09:36:22 Existing workspace found at '/import/bamboo_home/xml-data/build-dir/BBUILD-WEBTEST-JOB1'. updating...
error 27-Aug-2013 09:36:26 Error occurred while running Task 'Checkout Default Repository(1)'. This build will fail. Caused by:
error 27-Aug-2013 09:36:26 java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code for revision '21655', plan 'BBUILD-WEBTEST-JOB1': svn: E175002: No space left on device
error 27-Aug-2013 09:36:26 svn: E175002: REPORT request failed on '/itdev/web2/!svn/vcc/default'
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:220)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:188)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:69)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:69)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:206)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:111)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)
error 27-Aug-2013 09:36:26 at java.lang.Thread.run(Thread.java:662)
error 27-Aug-2013 09:36:26 Caused by: com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code for revision '21655', plan 'BBUILD-WEBTEST-JOB1': svn: E175002: No space left on device
error 27-Aug-2013 09:36:26 svn: E175002: REPORT request failed on '/itdev/web2/!svn/vcc/default'
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCode(SvnRepository.java:623)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:222)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:49)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:224)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:221)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
error 27-Aug-2013 09:36:26 ... 12 more
error 27-Aug-2013 09:36:26 Caused by: org.tmatesoft.svn.core.SVNException: svn: E175002: No space left on device
error 27-Aug-2013 09:36:26 svn: E175002: REPORT request failed on '/itdev/web2/!svn/vcc/default'
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:106)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:90)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:736)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:362)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:350)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:708)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:335)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1287)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:835)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:192)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:76)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:38)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.repository.svn.SvnRepository.update(SvnRepository.java:1318)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCodeWithException(SvnRepository.java:732)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCodeWithCleanup(SvnRepository.java:658)
error 27-Aug-2013 09:36:26 at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCode(SvnRepository.java:600)
error 27-Aug-2013 09:36:26 ... 17 more
error 27-Aug-2013 09:36:26 Caused by: java.io.IOException: No space left on device
error 27-Aug-2013 09:36:26 at java.io.FileOutputStream.writeBytes(Native Method)
error 27-Aug-2013 09:36:26 at java.io.FileOutputStream.write(FileOutputStream.java:282)
error 27-Aug-2013 09:36:26 at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
error 27-Aug-2013 09:36:26 at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.http.SpoolFile$SpoolOutputStream.write(SpoolFile.java:236)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.wc.SVNCancellableOutputStream.write(SVNCancellableOutputStream.java:44)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:767)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:801)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:218)
error 27-Aug-2013 09:36:26 at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:444)
error 27-Aug-2013 09:36:26 ... 38 more
error 27-Aug-2013 09:36:26 Failed to prepare the build 'BBUILD-WEBTEST-JOB1-22'
simple 27-Aug-2013 09:36:26 Running on server: post build plugin 'Clover Delta Calculator'
simple 27-Aug-2013 09:36:26 Running on server: post build plugin 'Build Hanging Detection Configuration'
simple 27-Aug-2013 09:36:26 Running on server: post build plugin 'NCover Results Collector'
simple 27-Aug-2013 09:36:26 Running on server: post build plugin 'Sonar Build Password Processor'
simple 27-Aug-2013 09:36:26 Running on server: post build plugin 'Maven Dependencies Postprocessor'
simple 27-Aug-2013 09:36:26 All post build plugins have finished
simple 27-Aug-2013 09:36:26 Generating build results summary...
simple 27-Aug-2013 09:36:26 Saving build results to disk...
simple 27-Aug-2013 09:36:26 Indexing build results...
simple 27-Aug-2013 09:36:26 Finished building BBUILD-WEBTEST-JOB1-22.
Cause
Bamboo uses 3rd party svnkit library to handle SVN operations. During workspace checkouts/updates it creates spool files in the directory denoted by "java.io.tmpdir" property which by default points to "/tmp". The reason for this problem is having a limited /tmp directory.
Workaround
Stop Bamboo and try to specify a different /tmp directory for Bamboo (server and/or remote agents) on the file system using this option:
-Djava.io.tmpdir="/_path_/tmp"
You will need to edit the wrapper.conf file, adding a line similar to the following, to change the directory from /tmp to another partition: (The warpper.conf file is located in <bamboo-installation-directory>/conf for the bamboo server. For agents, it's under <bamboo-agent-home>/conf).
wrapper.java.additional.4=-Djava.io.tmpdir=/opt/atlassian/tmpdir
If Bamboo is hosted on Tomcat, you can add or configure the parameters in the ./bin/setenv.sh (Or setenv.bat) file: Configuring Bamboo on start-up.
...
JAVA_OPTS="-server -XX:MaxPermSize=256m -Dbamboo.home=/path/to/bamboo-tomcat-home -Xmx512m -Djava.awt.headless=true -D<your-parameter>=<value> $JAVA_OPTS"
export JAVA_OPTS
...
For example:
...
JAVA_OPTS="-server -XX:MaxPermSize=256m -Dbamboo.home=/path/to/bamboo-tomcat-home -Xmx512m -Djava.awt.headless=true -Djava.io.tmpdir=/opt/atlassian/tmpdir $JAVA_OPTS"
export JAVA_OPTS
...