com.atlassian.utils.process.ProcessException: java.lang.RuntimeException: Failed to copy stream from ssh client to git process

Atlassian JIRA | Adam Ahmed [Atlassian] | 3 years ago
  1. 0

    This handler is called to interface with an ExternalProcess. ExternalProcess allows .cancel()ing the process, which will interrupt each of the threads that are running the input, output, and error handlers. Currently GitSshInputHandler throws a RuntimeException on any IOException. It is passed an org.apache.sshd.common.channel.ChannelPipedInputStream and calls read() on it. If the SSH was interrupted, it throws an InterruptedIOException which causes the RuntimeException to be thrown. This case should be handled more graceful (it is currently adding noise to debugging a support case). It causes log output like: {code} 2013-08-30 19:23:21,930 DEBUG [ssh-scm-request-handler] ... SSH - git-upload-pack '/project/repo.git' c.a.s.i.s.git.ssh.GitSshExitHandler Exception from process was: com.atlassian.utils.process.ProcessException: java.lang.RuntimeException: Failed to copy stream from ssh client to git process at com.atlassian.utils.process.ExternalProcessImpl.handleHandlerError(ExternalProcessImpl.java:288) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.utils.process.ExternalProcessImpl.access$300(ExternalProcessImpl.java:18) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.utils.process.ExternalProcessImpl$1.doTask(ExternalProcessImpl.java:308) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.utils.process.LatchedRunnable.run(LatchedRunnable.java:36) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.stash.internal.concurrent.StateTransferringExecutor$StateTransferringRunnable.run(StateTransferringExecutor.java:68) ~[stash-platform-2.7.0.jar:na] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) ~[na:1.6.0_22] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ~[na:1.6.0_22] at java.lang.Thread.run(Thread.java:662) ~[na:1.6.0_22] Caused by: java.lang.RuntimeException: Failed to copy stream from ssh client to git process at com.atlassian.stash.internal.scm.git.ssh.GitSshInputHandler.process(GitSshInputHandler.java:39) ~[na:na] at com.atlassian.utils.process.PluggableProcessHandler.provideInput(PluggableProcessHandler.java:135) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.utils.process.ExternalProcessImpl$1.doTask(ExternalProcessImpl.java:302) ~[atlassian-processutils-1.5.10.jar:na] ... 5 common frames omitted Caused by: java.io.InterruptedIOException: null at org.apache.sshd.common.channel.ChannelPipedInputStream.read(ChannelPipedInputStream.java:87) ~[na:na] at java.io.InputStream.read(InputStream.java:85) ~[na:1.6.0_22] at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:77) ~[commons-io-2.4.jar:2.4] at com.atlassian.stash.internal.scm.git.uploadpack.UploadPackAnalyzingInputStream.read(UploadPackAnalyzingInputStream.java:40) ~[na:na] at com.atlassian.stash.internal.scm.git.ssh.GitSshInputHandler.process(GitSshInputHandler.java:31) ~[na:na] ... 7 common frames omitted Caused by: java.lang.InterruptedException: null at java.lang.Object.wait(Native Method) ~[na:1.6.0_22] at java.lang.Object.wait(Object.java:485) ~[na:1.6.0_22] at org.apache.sshd.common.channel.ChannelPipedInputStream.read(ChannelPipedInputStream.java:85) ~[na:na] ... 11 common frames omitted {code}

    Atlassian JIRA | 3 years ago | Adam Ahmed [Atlassian]
    com.atlassian.utils.process.ProcessException: java.lang.RuntimeException: Failed to copy stream from ssh client to git process
  2. 0

    This handler is called to interface with an ExternalProcess. ExternalProcess allows .cancel()ing the process, which will interrupt each of the threads that are running the input, output, and error handlers. Currently GitSshInputHandler throws a RuntimeException on any IOException. It is passed an org.apache.sshd.common.channel.ChannelPipedInputStream and calls read() on it. If the SSH was interrupted, it throws an InterruptedIOException which causes the RuntimeException to be thrown. This case should be handled more graceful (it is currently adding noise to debugging a support case). It causes log output like: {code} 2013-08-30 19:23:21,930 DEBUG [ssh-scm-request-handler] ... SSH - git-upload-pack '/project/repo.git' c.a.s.i.s.git.ssh.GitSshExitHandler Exception from process was: com.atlassian.utils.process.ProcessException: java.lang.RuntimeException: Failed to copy stream from ssh client to git process at com.atlassian.utils.process.ExternalProcessImpl.handleHandlerError(ExternalProcessImpl.java:288) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.utils.process.ExternalProcessImpl.access$300(ExternalProcessImpl.java:18) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.utils.process.ExternalProcessImpl$1.doTask(ExternalProcessImpl.java:308) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.utils.process.LatchedRunnable.run(LatchedRunnable.java:36) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.stash.internal.concurrent.StateTransferringExecutor$StateTransferringRunnable.run(StateTransferringExecutor.java:68) ~[stash-platform-2.7.0.jar:na] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) ~[na:1.6.0_22] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ~[na:1.6.0_22] at java.lang.Thread.run(Thread.java:662) ~[na:1.6.0_22] Caused by: java.lang.RuntimeException: Failed to copy stream from ssh client to git process at com.atlassian.stash.internal.scm.git.ssh.GitSshInputHandler.process(GitSshInputHandler.java:39) ~[na:na] at com.atlassian.utils.process.PluggableProcessHandler.provideInput(PluggableProcessHandler.java:135) ~[atlassian-processutils-1.5.10.jar:na] at com.atlassian.utils.process.ExternalProcessImpl$1.doTask(ExternalProcessImpl.java:302) ~[atlassian-processutils-1.5.10.jar:na] ... 5 common frames omitted Caused by: java.io.InterruptedIOException: null at org.apache.sshd.common.channel.ChannelPipedInputStream.read(ChannelPipedInputStream.java:87) ~[na:na] at java.io.InputStream.read(InputStream.java:85) ~[na:1.6.0_22] at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:77) ~[commons-io-2.4.jar:2.4] at com.atlassian.stash.internal.scm.git.uploadpack.UploadPackAnalyzingInputStream.read(UploadPackAnalyzingInputStream.java:40) ~[na:na] at com.atlassian.stash.internal.scm.git.ssh.GitSshInputHandler.process(GitSshInputHandler.java:31) ~[na:na] ... 7 common frames omitted Caused by: java.lang.InterruptedException: null at java.lang.Object.wait(Native Method) ~[na:1.6.0_22] at java.lang.Object.wait(Object.java:485) ~[na:1.6.0_22] at org.apache.sshd.common.channel.ChannelPipedInputStream.read(ChannelPipedInputStream.java:85) ~[na:na] ... 11 common frames omitted {code}

    Atlassian JIRA | 3 years ago | Adam Ahmed [Atlassian]
    com.atlassian.utils.process.ProcessException: java.lang.RuntimeException: Failed to copy stream from ssh client to git process
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Internal server error during git-upload-pack

    Google Groups | 6 years ago | Ping Yin
    com.google.gerrit.sshd.BaseCommand$Failure: fatal: client IO read/write timeout
  5. 0

    Storm [ERROR] Async loop died

    Stack Overflow | 1 year ago | Technocrat
    java.lang.RuntimeException: java.lang.InterruptedException

  1. treefolk 1 times, last 2 weeks ago
  2. danleyb2Interintel 1 times, last 2 weeks ago
  3. filpgame 1 times, last 2 months ago
  4. Nikolay Rybak 4 times, last 4 months ago
  5. Handemelindo 1 times, last 4 months ago
6 more registered users
18 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.InterruptedException

    null

    at java.lang.Object.wait()
  2. Java RT
    Object.wait
    1. java.lang.Object.wait(Native Method)[na:1.6.0_22]
    2. java.lang.Object.wait(Object.java:485)[na:1.6.0_22]
    2 frames
  3. Apache Mina SSHD :: Core
    ChannelPipedInputStream.read
    1. org.apache.sshd.common.channel.ChannelPipedInputStream.read(ChannelPipedInputStream.java:85)[na:na]
    1 frame
  4. Java RT
    InputStream.read
    1. java.io.InputStream.read(InputStream.java:85)[na:1.6.0_22]
    1 frame
  5. Commons IO
    ProxyInputStream.read
    1. org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:77)[commons-io-2.4.jar:2.4]
    1 frame
  6. com.atlassian.stash
    GitSshInputHandler.process
    1. com.atlassian.stash.internal.scm.git.uploadpack.UploadPackAnalyzingInputStream.read(UploadPackAnalyzingInputStream.java:40)[na:na]
    2. com.atlassian.stash.internal.scm.git.ssh.GitSshInputHandler.process(GitSshInputHandler.java:31)[na:na]
    2 frames
  7. com.atlassian.utils
    LatchedRunnable.run
    1. com.atlassian.utils.process.PluggableProcessHandler.provideInput(PluggableProcessHandler.java:135)[atlassian-processutils-1.5.10.jar:na]
    2. com.atlassian.utils.process.ExternalProcessImpl$1.doTask(ExternalProcessImpl.java:302)[atlassian-processutils-1.5.10.jar:na]
    3. com.atlassian.utils.process.LatchedRunnable.run(LatchedRunnable.java:36)[atlassian-processutils-1.5.10.jar:na]
    3 frames
  8. com.atlassian.stash
    StateTransferringExecutor$StateTransferringRunnable.run
    1. com.atlassian.stash.internal.concurrent.StateTransferringExecutor$StateTransferringRunnable.run(StateTransferringExecutor.java:68)[stash-platform-2.7.0.jar:na]
    1 frame
  9. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[na:1.6.0_22]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[na:1.6.0_22]
    3. java.lang.Thread.run(Thread.java:662)[na:1.6.0_22]
    3 frames