Search code examples
svnantsvnant

SvnAnt hangs committing renamed SVN folder


I'm working with Jenkins to perform builds and run my Ant code.

Jenkins handles the checkout of SVN files to my workspace. I use SvnAnt to commit changes to the files. In this case I'm committing new FLA files when needed. This works for all of my builds but one, the main difference in this build is that in the source SVN files there was a committed typo in one of the folders that is checked out, the user SVN Renamed the folder and the checked out content on the build node was removed. When this build is modified (needing to add new FLA files) the build gets all the way to the commit section and hangs.

The code for this is as follows:

<!-- load the svn task -->
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />

<target name="commitFLA">
    <echo>=== COMMIT FLA FILES TO THE ${dita.map.filename.root} MODULE FOLDER ===</echo>
    <svn username="${username}" password="${password}">
        <add dir="${workspace}\${dita.map.filename.root}\" force="true" />
        <commit dir="${workspace}\${dita.map.filename.root}" message="Added FLA Template Files for the ${dita.map.filename.root} Module" />
    </svn>
</target>

Below is what Jenkins shows:

commitFLA:
 [echo] === COMMIT FLA FILES TO THE TTWCS_Sys_Admin MODULE FOLDER ===
  [svn] <Add> started ...
  [svn] <Add> finished.
  [svn] <Commit> started ..

Now if I have all the files committed already and no changes are made in the build job it works fine:

commitFLA:
 [echo] === COMMIT FLA FILES TO THE TTWCS_Sys_Admin MODULE FOLDER ===
  [svn] <Add> started ...
  [svn] <Add> finished.
  [svn] <Commit> started ...
  [svn] <Commit> finished.

At this point I'm at a loss on what do to. I need to know if there is a log output I can have it put out so I know what the issue is. This code is used across multiple build jobs that all work fine except for this one and a handful of others that are not related specifically to this issue but use a similar commit code structure. I'm hoping that fixing this one can lead to fixes for the others.

Edit: Adding Stacktraces from JSTACK as requested by Chad Nouis

2016-01-07 11:39:02 
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode): 

"Timer-0" #27 daemon prio=5 os_prio=0 tid=0x00000000546c3800 nid=0x5120 in Object.wait() [0x0000000056e1e000] 
   java.lang.Thread.State: TIMED_WAITING (on object monitor) 
    at java.lang.Object.wait(Native Method) 
    at java.util.TimerThread.mainLoop(Unknown Source) 
    - locked <0x00000000daf5c040> (a java.util.TaskQueue) 
    at java.util.TimerThread.run(Unknown Source) 

"Thread-11" #25 daemon prio=5 os_prio=0 tid=0x0000000053d87000 nid=0x4d88 in Object.wait() [0x0000000056cdf000] 
   java.lang.Thread.State: WAITING (on object monitor) 
    at java.lang.Object.wait(Native Method) 
    at java.lang.ref.ReferenceQueue.remove(Unknown Source) 
    - locked <0x00000000daf5c1d0> (a java.lang.ref.ReferenceQueue$Lock) 
    at java.lang.ref.ReferenceQueue.remove(Unknown Source) 
    at org.tmatesoft.svn.core.javahl.SVNClientImplTracker.run(SVNClientImplTracker.java:53) 
    at java.lang.Thread.run(Unknown Source) 

"Service Thread" #8 daemon prio=9 os_prio=0 tid=0x0000000052325800 nid=0x5080 runnable [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 

"C1 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000052320800 nid=0x4544 waiting on condition [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x00000000522c7000 nid=0x4e58 waiting on condition [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x00000000522c2800 nid=0x5178 waiting on condition [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x00000000522c1000 nid=0x5114 runnable [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000001e99000 nid=0x53a4 in Object.wait() [0x000000005285f000] 
   java.lang.Thread.State: WAITING (on object monitor) 
    at java.lang.Object.wait(Native Method) 
    at java.lang.ref.ReferenceQueue.remove(Unknown Source) 
    - locked <0x00000000d5577718> (a java.lang.ref.ReferenceQueue$Lock) 
    at java.lang.ref.ReferenceQueue.remove(Unknown Source) 
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) 

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x0000000001e97800 nid=0x526c in Object.wait() [0x00000000526de000] 
   java.lang.Thread.State: WAITING (on object monitor) 
    at java.lang.Object.wait(Native Method) 
    at java.lang.Object.wait(Unknown Source) 
    at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) 
    - locked <0x00000000d55778d0> (a java.lang.ref.Reference$Lock) 

"main" #1 prio=5 os_prio=0 tid=0x00000000003af000 nid=0x50c4 runnable [0x00000000020fd000] 
   java.lang.Thread.State: RUNNABLE 
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) 
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) 
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) 
    - locked <0x00000000c45b9478> (a java.net.DualStackPlainSocketImpl) 
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) 
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source) 
    at java.net.PlainSocketImpl.connect(Unknown Source) 
    at java.net.SocksSocketImpl.connect(Unknown Source) 
    at java.net.Socket.connect(Unknown Source) 
    at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) 
    at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createSSLSocket(SVNSocketFactory.java:65) 
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:167) 
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:304) 
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:257) 
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:245) 
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:454) 
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:97) 
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:643) 
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryRoot(DAVRepository.java:128) 
    at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:996) 
    at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:891) 
    at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:823) 
    at org.tmatesoft.svn.core.javahl.SVNClientImpl.commit(SVNClientImpl.java:665) 
    at org.tmatesoft.svn.core.javahl.SVNClientImpl.commit(SVNClientImpl.java:648) 
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.commit(AbstractJhlClientAdapter.java:310) 
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.commit(AbstractJhlClientAdapter.java:284) 
    at org.tigris.subversion.svnant.commands.Commit.svnCommitDir(Unknown Source) 
    at org.tigris.subversion.svnant.commands.Commit.execute(Unknown Source) 
    at org.tigris.subversion.svnant.commands.SvnCommand.executeCommand(Unknown Source) 
    at org.tigris.subversion.svnant.SvnTask.execute(Unknown Source) 
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) 
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
    at org.apache.tools.ant.Task.perform(Task.java:348) 
    at org.apache.tools.ant.Target.execute(Target.java:390) 
    at org.apache.tools.ant.Target.performTasks(Target.java:411) 
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) 
    at org.apache.tools.ant.Project.executeTarget(Project.java:1366) 
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 
    at org.apache.tools.ant.Project.executeTargets(Project.java:1249) 
    at org.apache.tools.ant.Main.runBuild(Main.java:801) 
    at org.apache.tools.ant.Main.startAnt(Main.java:218) 
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) 
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) 

"VM Thread" os_prio=2 tid=0x0000000001e91800 nid=0x4fb0 runnable  

"VM Periodic Task Thread" os_prio=2 tid=0x000000005232a800 nid=0x5330 waiting on condition  

JNI global references: 99

Solution

  • I have discovered the fix for this issue. The problem was that the checkout version of SVN (from the Jenkins plugin) was too low for a commit back into our jenkins server. If I used SVNAnt to checkout the repository that I wanted to commit changes to, then I could use SVNAnt to Add/Commit new files to SVN with no issues.