Bug #1848: Net::SSH hangs
http://redmine.ruby-lang.org/issues/show/1848
e$B5/I<<Te(B: Shyouhei U.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$B%+%F%4%je(B: core, Target version: Ruby 1.8.7
ruby -v: 1.8.7-p135 and later
Revision r21165
e$B0J9_!“e(BNet::SSHe$B$r;H$&>l9ge(B(e$B6qBNE*$K$$$&$He(BCapistrano)e$B$G!”%9%l%C%I@Z$jBX$($,$&$^$/$$$+$J$$$H$$$&Js9p$r<u$1$^$7$?e(B
e$B$^$?J9$-$G$b$&$7$o$1$J$$e(B
https://capistrano.lighthouseapp.com/projects/8716/tickets/79
e$B$3$N$X$s$,4X78$7$F$$$k$+$b!#$7$F$J$$$+$b!#e(B
e$B:F8=J}K!e(B
[“localhost”,“localhost”].map {|h| Thread.new{Net::SSH.start(h,
“foo”)}}.each {|t| t.join}
proposed patch against 1.8.7
— eval.c (revision 24335)
+++ eval.c (working copy)
@@ -11228,7 +11228,7 @@
break;
}
if ((th->status == THREAD_RUNNABLE || th == th_found) &&
th->stk_ptr) {
-
if (!next || next->priority < th->priority) {
-
if (!next || next->priority <= th->priority) { th_found->status = THREAD_RUNNABLE; th_found->wait_for = 0;