Lost in the bowels of eval.c: fflush in Thread deadlocks in VMS Rubyport

B

BG - Ben Armstrong

Help. I'm lost in the bowels of eval.c! Somehow doing fflush() in a
Thread breaks in our OpenVMS port of Ruby:

Here is a minimal failing test case:

$ ruby -v -e"Thread.new{STDOUT.flush}.join"
ruby 1.8.2 (2004-12-16) [alpha-vms]
deadlock 0x1bdf20: sleep:S - thread.rb:1
deadlock 0x1cc1e8: sleep:J(0x1bdf20) (main) - thread.rb:1
thread.rb:1:in `join': Thread(0x1cc1e8): deadlock (fatal)
from thread.rb:1

So it appears that one thread (the flush thread) is sleeping, and one
thread is waiting to join (the main thread) and now rb_schedule_thread()
has nothing to do, so it throws the fatal deadlock error.

How did we end up in this state? What should I be looking for now?

Thanks,
Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top