Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-25657

Change detection on an SVN+SSH repository in Bamboo breaks when Apache Mina SSHD 2.10.0+ is used with SVNKit

XMLWordPrintable

      Problem

      Bamboo can't check out SVN code from an SVN+SSH repository. This behaviour may result in multiple spawned Java threads/processes and create excessive load on the system leading to out-of-memory errors.

      It reports the following stack trace.

      2024-01-18 13:42:26,332 ERROR [9-BranchDetectionBackgroundThread:pool-10-thread-3] [BambooPluginUtils] An unexpected error has occurred while detecting branches: 139626340
      com.google.common.util.concurrent.ExecutionError: java.lang.NoSuchMethodError: 'boolean org.apache.sshd.client.future.ConnectFuture.await()'
      
      ...
      Caused by: java.lang.NoSuchMethodError: 'boolean org.apache.sshd.client.future.ConnectFuture.await()'
      	at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.SshConnection.<init>(SshConnection.java:89) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.SshHost.openConnection(SshHost.java:227) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.SshHost.openSession(SshHost.java:155) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.ApacheSshSessionPool.openSession(ApacheSshSessionPool.java:100) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.ApacheSshSessionPool.openSession(ApacheSshSessionPool.java:59) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.io.svn.SVNSSHConnector.open(SVNSSHConnector.java:112) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.open(SVNConnection.java:80) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1282) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getLatestRevision(SVNRepositoryImpl.java:173) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:180) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:43) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteGetInfo.run(SvnRemoteGetInfo.java:47) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteGetInfo.run(SvnRemoteGetInfo.java:31) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294) ~[svnkit-1.10.11.jar:?]
      	at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2535) ~[svnkit-1.10.11.jar:?]
      	at com.atlassian.bamboo.repository.svn.v2.AbstractSvnExecutor.checkPathExists(AbstractSvnExecutor.java:345) ~[atlassian-bamboo-core-9.4.2.jar:?]
      

      Environment

      • Bamboo 9.4.0 and later

      Steps to Reproduce

      1. Have a previously configured SVN+SSH repository configured in Bamboo <= 9.3
      2. Upgrade to Bamboo 9.4.0+
      3. Wait for a change detection background thread to run

      It is also possible to reproduce this issue directly in the user interface while creating a new SVN+SSH repository in Bamboo 9.4.0 and later.

      Expected Results

      The application should be able to connect to the SVN repository via SSH without any errors.

      Actual Results

      Change detection on SVN+SSH repositories doesn't work.

      An error message and a stack trace are reported with:

      [9-BranchDetectionBackgroundThread:pool-10-thread-3] [BambooPluginUtils] An unexpected error has occurred while detecting branches: 1234567890
      Caused by: java.lang.NoSuchMethodError: 'boolean org.apache.sshd.client.future.ConnectFuture.await()'
      

      Workaround

      Modify the Subversion Repository settings in Bamboo and replace the SSH URL with an equivalent HTTP SVN address

      Notes

      The issue is caused by an incompatibility between two external components used by Bamboo: SVNKit and Apache Mina SSHD.

      On Apache Mina SSHD 2.9.2, the #await() method accepts empty arguments, while in Apache Mina SSHD 2.10.0 and later the same method expects an argument that is not provided by SVNKit.

            mgardias Marcin Gardias
            73868399605e Eduardo Alvarenga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: