Details
-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
None
-
None
Description
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:
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
Attachments
Issue Links
- relates to
-
BSERV-3822 GitSshInputHandler should expect to be interrupted during close()
- Closed