Issue #5130 has been updated by Jeremy Evans.


Here's gdb output from attaching to a process (OpenBSD-current, not 4.9), and using ruby instead of miniruby:

$ ruby19 -e 'Thread.new{Thread.pass}'
$ gdb ruby19 17940
(gdb) bt
#0  0x0000000205b31da7 in pthread_cond_broadcast (cond=0x20b4bb040) at /usr/src/lib/libpthread/uthread/uthread_cond.c:655
#1  0x0000000204bb3709 in native_cond_broadcast () from /usr/local/lib/libruby19.so.1.91
#2  0x0000000204bb4424 in rb_thread_schedule_limits () from /usr/local/lib/libruby19.so.1.91
#3  0x0000000204bb476b in rb_thread_schedule () from /usr/local/lib/libruby19.so.1.91
#4  0x0000000204bb4a6e in rb_thread_terminate_all () from /usr/local/lib/libruby19.so.1.91
#5  0x0000000204abc8da in ruby_cleanup () from /usr/local/lib/libruby19.so.1.91
#6  0x0000000204abc996 in ruby_run_node () from /usr/local/lib/libruby19.so.1.91
#7  0x0000000000400c42 in main ()
(gdb) info threads
  4 process 17940, thread 0x208e0f000 (RUNNING)  0x0000000205b31da7 in pthread_cond_broadcast (cond=0x20b4bb040) at /usr/src/lib/libpthread/uthread/uthread_cond.c:655
  3 process 17940, thread 0x2034be000 (SELECT_WAIT)  _thread_kern_sched (scp=0x0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:495
  2 process 17940, thread 0x206059000 (COND_WAIT)  _thread_kern_sched (scp=0x0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:495
  1 process 17940, thread 0x20a045000 (RUNNING)  _thread_kern_sched (scp=0x0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:495

I'll try to spend some time debugging this tomorrow.
----------------------------------------
Bug #5130: Thread.pass sticks on OpenBSD
http://redmine.ruby-lang.org/issues/5130

Author: Yui NARUSE
Status: Assigned
Priority: Normal
Assignee: Motohiro KOSAKI
Category: core
Target version: 
ruby -v: ruby 1.9.4dev (2011-07-31 trunk 32788) [x86_64-openbsd4.9]


=begin
On OpenBSD 4.9, following script will stick.

 ./miniruby -ve'Thread.new{Thread.pass}'
=end



-- 
http://redmine.ruby-lang.org