SSH connection can fail unpredictably
-------------------------------------
Key: JRUBY-5769
URL: http://jira.codehaus.org/browse/JRUBY-5769
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.6.1, JRuby 1.6
Reporter: Hiro Asari
Assignee: Thomas E Enebo
It is reported in http://www.ruby-forum.com/topic/1441300 that Net::SSH
connections can fail unpredictably.
When it fails, exceptions caught can vary:
{noformat}
Error: OpenSSL::Cipher::CipherError: Input length not multiple of 16 bytes
Error: Net::SSH::Disconnect: disconnected: Packet corrupt (2)
Error: Net::SSH::Disconnect: connection closed by remote host
{noformat}
A stack trace might look like:
{noformat}
OpenSSL::Cipher::CipherError: Input length not multiple of 16 bytes
getStackTrace at java/lang/Thread.java:1479
getBacktraceData at org/jruby/runtime/backtrace/TraceType.java:47
getBacktrace at org/jruby/runtime/backtrace/TraceType.java:25
prepareBacktrace at org/jruby/RubyException.java:160
preRaise at org/jruby/exceptions/RaiseException.java:182
preRaise at org/jruby/exceptions/RaiseException.java:174
<init> at org/jruby/exceptions/RaiseException.java:110
newError at org/jruby/ext/openssl/Utils.java:79
newCipherError at org/jruby/ext/openssl/Cipher.java:754
_final at org/jruby/ext/openssl/Cipher.java:717
call at org/jruby/ext/openssl/Cipher$i$0$0$_final_DBG.gen:65535
call at org/jruby/runtime/callsite/CachingCallSite.java:103
final_cipher at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/state.rb:85
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:122
call at org/jruby/internal/runtime/methods/DefaultMethod.java:166
call at org/jruby/runtime/callsite/CachingCallSite.java:103
enqueue_packet at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/packet_stream.rb:142
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:158
call at org/jruby/internal/runtime/methods/DefaultMethod.java:182
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:282
call at org/jruby/runtime/callsite/CachingCallSite.java:139
send_packet at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/packet_stream.rb:111
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:158
call at org/jruby/internal/runtime/methods/DefaultMethod.java:182
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:282
call at org/jruby/runtime/callsite/CachingCallSite.java:139
send_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:217
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:158
call at org/jruby/internal/runtime/methods/DefaultMethod.java:182
call at org/jruby/runtime/callsite/CachingCallSite.java:137
authenticate at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/authentication/session.rb:56
__file__ at org/jruby/ast/executable/AbstractScript.java:49
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:230
call at org/jruby/internal/runtime/methods/DefaultMethod.java:214
call at org/jruby/runtime/callsite/CachingCallSite.java:205
start at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh.rb:187
__file__ at org/jruby/ast/executable/AbstractScript.java:49
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:248
call at org/jruby/internal/runtime/methods/DefaultMethod.java:222
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:214
callIter at org/jruby/runtime/callsite/CachingCallSite.java:225
(root) at ssh_test2.rb:17
call at ssh_test2#block_2$RUBY$__file__:65535
yield at org/jruby/runtime/CompiledBlock.java:133
call at org/jruby/runtime/BlockBody.java:73
call at org/jruby/runtime/Block.java:89
call at org/jruby/RubyProc.java:268
call at org/jruby/RubyProc.java:232
run at org/jruby/internal/runtime/RubyRunnable.java:95
run at java/lang/Thread.java:662
{noformat}
{noformat}
Net::SSH::Disconnect: disconnected: Packet corrupt (2)
getStackTrace at java/lang/Thread.java:1479
getBacktraceData at org/jruby/runtime/backtrace/TraceType.java:47
getBacktrace at org/jruby/runtime/backtrace/TraceType.java:25
prepareBacktrace at org/jruby/RubyException.java:160
preRaise at org/jruby/exceptions/RaiseException.java:182
preRaise at org/jruby/exceptions/RaiseException.java:174
<init> at org/jruby/exceptions/RaiseException.java:120
<init> at org/jruby/exceptions/RaiseException.java:72
raise at org/jruby/RubyKernel.java:986
call at org/jruby/RubyKernel$s$0$3$raise_DBG.gen:65535
call at org/jruby/internal/runtime/methods/DynamicMethod.java:217
call at org/jruby/internal/runtime/methods/DynamicMethod.java:213
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:302
call at org/jruby/runtime/callsite/CachingCallSite.java:173
poll_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:174
call at
rubyjit$poll_message_384D9860D0D9CA15CE917B283FFBBAD18DDC57A9#block_0$RUBY$__file__:65535
yield at org/jruby/runtime/CompiledBlock.java:112
yield at org/jruby/runtime/CompiledBlock.java:95
yieldSpecific at org/jruby/runtime/CompiledBlock.java:75
yieldSpecific at org/jruby/runtime/Block.java:99
loop at org/jruby/RubyKernel.java:1417
call at org/jruby/RubyKernel$s$0$0$loop_DBG.gen:65535
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:112
callIter at org/jruby/runtime/callsite/CachingCallSite.java:123
poll_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:164
__file__ at org/jruby/ast/executable/AbstractScript.java:41
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:158
call at org/jruby/internal/runtime/methods/DefaultMethod.java:182
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:282
call at org/jruby/runtime/callsite/CachingCallSite.java:139
next_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:149
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:122
call at org/jruby/internal/runtime/methods/DefaultMethod.java:166
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:262
call at org/jruby/runtime/callsite/CachingCallSite.java:105
interpret at org/jruby/ast/CallNoArgNode.java:62
interpret at org/jruby/ast/LocalAsgnNode.java:123
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:147
call at org/jruby/internal/runtime/methods/DefaultMethod.java:163
call at org/jruby/runtime/callsite/CachingCallSite.java:103
interpret at org/jruby/ast/VCallNode.java:85
interpret at org/jruby/ast/ToAryNode.java:69
interpret at org/jruby/ast/MultipleAsgnNode.java:127
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:147
call at org/jruby/internal/runtime/methods/DefaultMethod.java:163
call at org/jruby/runtime/callsite/CachingCallSite.java:103
interpret at org/jruby/ast/VCallNode.java:85
interpret at org/jruby/ast/InstAsgnNode.java:95
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:298
call at org/jruby/internal/runtime/methods/DefaultMethod.java:219
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:214
call at org/jruby/runtime/callsite/CachingCallSite.java:220
newInstance at org/jruby/RubyClass.java:813
call at org/jruby/RubyClass$i$newInstance_DBG.gen:65535
call at org/jruby/internal/runtime/methods/JavaMethod.java:300
call at org/jruby/runtime/callsite/CachingCallSite.java:205
interpret at org/jruby/ast/CallThreeArgNode.java:61
interpret at org/jruby/ast/LocalAsgnNode.java:123
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:147
call at org/jruby/internal/runtime/methods/DefaultMethod.java:163
call at org/jruby/runtime/callsite/CachingCallSite.java:103
interpret at org/jruby/ast/VCallNode.java:85
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:147
call at org/jruby/internal/runtime/methods/DefaultMethod.java:163
call at org/jruby/runtime/callsite/CachingCallSite.java:103
interpret at org/jruby/ast/FCallNoArgNode.java:31
interpret at org/jruby/ast/IfNode.java:117
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:147
call at org/jruby/internal/runtime/methods/DefaultMethod.java:163
call at org/jruby/runtime/callsite/CachingCallSite.java:103
interpret at org/jruby/ast/VCallNode.java:85
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/IfNode.java:117
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:190
call at org/jruby/internal/runtime/methods/DefaultMethod.java:179
call at org/jruby/runtime/callsite/CachingCallSite.java:137
poll_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:186
call at
rubyjit$poll_message_384D9860D0D9CA15CE917B283FFBBAD18DDC57A9#block_0$RUBY$__file__:65535
yield at org/jruby/runtime/CompiledBlock.java:112
yield at org/jruby/runtime/CompiledBlock.java:95
yieldSpecific at org/jruby/runtime/CompiledBlock.java:75
yieldSpecific at org/jruby/runtime/Block.java:99
loop at org/jruby/RubyKernel.java:1417
call at org/jruby/RubyKernel$s$0$0$loop_DBG.gen:65535
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:112
callIter at org/jruby/runtime/callsite/CachingCallSite.java:123
poll_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:164
__file__ at org/jruby/ast/executable/AbstractScript.java:45
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:194
call at org/jruby/internal/runtime/methods/DefaultMethod.java:198
call at org/jruby/runtime/callsite/CachingCallSite.java:171
interpret at org/jruby/ast/FCallTwoArgNode.java:38
interpret at org/jruby/ast/DAsgnNode.java:110
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_BLOCK at org/jruby/evaluator/ASTInterpreter.java:111
evalBlockBody at org/jruby/runtime/InterpretedBlock.java:374
yield at org/jruby/runtime/InterpretedBlock.java:295
yieldSpecific at org/jruby/runtime/InterpretedBlock.java:229
yieldSpecific at org/jruby/runtime/Block.java:99
loop at org/jruby/RubyKernel.java:1417
call at org/jruby/RubyKernel$s$0$0$loop_DBG.gen:65535
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:272
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:114
callIter at org/jruby/runtime/callsite/CachingCallSite.java:123
interpret at org/jruby/ast/FCallNoArgBlockNode.java:32
interpret at org/jruby/ast/NewlineNode.java:103
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:169
call at org/jruby/internal/runtime/methods/DefaultMethod.java:171
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:272
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:114
callIter at org/jruby/runtime/callsite/CachingCallSite.java:123
interpret at org/jruby/ast/FCallNoArgBlockNode.java:32
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:255
call at org/jruby/internal/runtime/methods/DefaultMethod.java:203
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:312
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:182
call at org/jruby/runtime/callsite/CachingCallSite.java:186
newInstance at org/jruby/RubyClass.java:806
call at org/jruby/RubyClass$i$newInstance_DBG.gen:65535
call at org/jruby/internal/runtime/methods/JavaMethod.java:283
call at org/jruby/runtime/callsite/CachingCallSite.java:171
interpret at org/jruby/ast/CallTwoArgNode.java:59
interpret at org/jruby/ast/LocalAsgnNode.java:123
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:298
call at org/jruby/internal/runtime/methods/DefaultMethod.java:219
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:214
callIter at org/jruby/runtime/callsite/CachingCallSite.java:225
(root) at ssh_test2.rb:17
call at ssh_test2#block_1$RUBY$__file__:65535
yield at org/jruby/runtime/CompiledBlock.java:133
call at org/jruby/runtime/BlockBody.java:73
call at org/jruby/runtime/Block.java:89
call at org/jruby/RubyProc.java:268
call at org/jruby/RubyProc.java:232
run at org/jruby/internal/runtime/RubyRunnable.java:95
run at java/lang/Thread.java:662
{noformat}
{noformat}
Net::SSH::Disconnect: connection closed by remote host
getStackTrace at java/lang/Thread.java:1479
getBacktraceData at org/jruby/runtime/backtrace/TraceType.java:47
getBacktrace at org/jruby/runtime/backtrace/TraceType.java:25
prepareBacktrace at org/jruby/RubyException.java:160
preRaise at org/jruby/exceptions/RaiseException.java:182
preRaise at org/jruby/exceptions/RaiseException.java:174
<init> at org/jruby/exceptions/RaiseException.java:120
<init> at org/jruby/exceptions/RaiseException.java:72
raise at org/jruby/RubyKernel.java:986
call at org/jruby/RubyKernel$s$0$3$raise_DBG.gen:65535
call at org/jruby/internal/runtime/methods/DynamicMethod.java:217
call at org/jruby/internal/runtime/methods/DynamicMethod.java:213
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:302
call at org/jruby/runtime/callsite/CachingCallSite.java:173
next_packet at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/packet_stream.rb:99
call at
rubyjit$next_packet_DF7C829021C9082FE5ADA2D4ECAF4EE03B709461#block_0$RUBY$__file__:65535
yield at org/jruby/runtime/CompiledBlock.java:112
yield at org/jruby/runtime/CompiledBlock.java:95
yieldSpecific at org/jruby/runtime/CompiledBlock.java:75
yieldSpecific at org/jruby/runtime/Block.java:99
loop at org/jruby/RubyKernel.java:1417
call at org/jruby/RubyKernel$s$0$0$loop_DBG.gen:65535
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:272
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:114
callIter at org/jruby/runtime/callsite/CachingCallSite.java:123
next_packet at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/packet_stream.rb:89
__file__ at org/jruby/ast/executable/AbstractScript.java:41
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:158
call at org/jruby/internal/runtime/methods/DefaultMethod.java:182
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:282
call at org/jruby/runtime/callsite/CachingCallSite.java:139
poll_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:169
call at
rubyjit$poll_message_384D9860D0D9CA15CE917B283FFBBAD18DDC57A9#block_0$RUBY$__file__:65535
yield at org/jruby/runtime/CompiledBlock.java:112
yield at org/jruby/runtime/CompiledBlock.java:95
yieldSpecific at org/jruby/runtime/CompiledBlock.java:75
yieldSpecific at org/jruby/runtime/Block.java:99
loop at org/jruby/RubyKernel.java:1417
call at org/jruby/RubyKernel$s$0$0$loop_DBG.gen:65535
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:112
callIter at org/jruby/runtime/callsite/CachingCallSite.java:123
poll_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:164
__file__ at org/jruby/ast/executable/AbstractScript.java:41
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:158
call at org/jruby/internal/runtime/methods/DefaultMethod.java:182
call at org/jruby/runtime/callsite/CachingCallSite.java:137
next_message at
/home/hiro/gems/jruby/1.8/gems/net-ssh-2.1.4/lib/net/ssh/transport/session.rb:149
call at
org/jruby/internal/runtime/methods/TraceableJittedMethod.java:122
call at org/jruby/internal/runtime/methods/DefaultMethod.java:166
call at org/jruby/runtime/callsite/CachingCallSite.java:103
interpret at org/jruby/ast/CallNoArgNode.java:62
interpret at org/jruby/ast/DAsgnNode.java:110
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_BLOCK at org/jruby/evaluator/ASTInterpreter.java:111
evalBlockBody at org/jruby/runtime/InterpretedBlock.java:374
yield at org/jruby/runtime/InterpretedBlock.java:295
yieldSpecific at org/jruby/runtime/InterpretedBlock.java:229
yieldSpecific at org/jruby/runtime/Block.java:99
loop at org/jruby/RubyKernel.java:1417
call at org/jruby/RubyKernel$s$0$0$loop_DBG.gen:65535
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:112
callIter at org/jruby/runtime/callsite/CachingCallSite.java:123
interpret at org/jruby/ast/FCallNoArgBlockNode.java:32
interpret at org/jruby/ast/NewlineNode.java:103
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:147
call at org/jruby/internal/runtime/methods/DefaultMethod.java:163
call at org/jruby/runtime/callsite/CachingCallSite.java:103
interpret at org/jruby/ast/VCallNode.java:85
interpret at org/jruby/ast/LocalAsgnNode.java:123
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:190
call at org/jruby/internal/runtime/methods/DefaultMethod.java:179
call at org/jruby/runtime/callsite/CachingCallSite.java:137
interpret at org/jruby/ast/FCallOneArgNode.java:36
interpret at org/jruby/ast/LocalAsgnNode.java:123
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
interpret at org/jruby/ast/EnsureNode.java:96
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:276
call at org/jruby/internal/runtime/methods/DefaultMethod.java:211
call at org/jruby/runtime/callsite/CachingCallSite.java:205
interpret at org/jruby/ast/CallThreeArgNode.java:61
interpret at org/jruby/ast/IfNode.java:111
interpret at org/jruby/ast/NewlineNode.java:103
interpret at org/jruby/ast/BlockNode.java:71
INTERPRET_METHOD at org/jruby/evaluator/ASTInterpreter.java:74
call at
org/jruby/internal/runtime/methods/InterpretedMethod.java:298
call at org/jruby/internal/runtime/methods/DefaultMethod.java:219
callBlock at org/jruby/runtime/callsite/CachingCallSite.java:214
callIter at org/jruby/runtime/callsite/CachingCallSite.java:225
(root) at ssh_test2.rb:17
call at ssh_test2#block_1$RUBY$__file__:65535
yield at org/jruby/runtime/CompiledBlock.java:133
call at org/jruby/runtime/BlockBody.java:73
call at org/jruby/runtime/Block.java:89
call at org/jruby/RubyProc.java:268
call at org/jruby/RubyProc.java:232
run at org/jruby/internal/runtime/RubyRunnable.java:95
run at java/lang/Thread.java:662
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email