"Basic" problem with Threads (?)

E

Eric K

I just upraded to Ruby 1.8.3 (from sources) on my Redhat Linux box.
When I attempt to do anything that starts a new thread, I receive the
message "ThreadError: uninitialized thread - check
`Thread#initialize'". Below is a transcript from a one-line session in
IRB that demonstrates the problem. Any ideas? (Please let me know if
there is other information that would be helpful in diagnosing this.)

irb(main):001:0> Thread.new { puts 'hi' }
ThreadError: uninitialized thread - check `Thread#initialize'
from (irb):1:in `new'
from (irb):1
irb(main):002:0>

Thank you!
 
A

Ara.T.Howard

I just upraded to Ruby 1.8.3 (from sources) on my Redhat Linux box.
When I attempt to do anything that starts a new thread, I receive the
message "ThreadError: uninitialized thread - check
`Thread#initialize'". Below is a transcript from a one-line session in
IRB that demonstrates the problem. Any ideas? (Please let me know if
there is other information that would be helpful in diagnosing this.)

irb(main):001:0> Thread.new { puts 'hi' }
ThreadError: uninitialized thread - check `Thread#initialize'
from (irb):1:in `new'
from (irb):1
irb(main):002:0>

can you show us how you compiled ruby?

-a
--
===============================================================================
| ara [dot] t [dot] howard [at] gmail [dot] com
| all happiness comes from the desire for others to be happy. all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================
 
R

Robert Klemme

Eric said:
I just upraded to Ruby 1.8.3 (from sources) on my Redhat Linux box.
When I attempt to do anything that starts a new thread, I receive the
message "ThreadError: uninitialized thread - check
`Thread#initialize'". Below is a transcript from a one-line session
in IRB that demonstrates the problem. Any ideas? (Please let me
know if there is other information that would be helpful in
diagnosing this.)

irb(main):001:0> Thread.new { puts 'hi' }
ThreadError: uninitialized thread - check `Thread#initialize'
from (irb):1:in `new'
from (irb):1
irb(main):002:0>

Works for me:

irb(main):001:0> Thread.new { puts 'hi' }
hi=> #<Thread:0x101d74b0 run>

Ruby 1.8.3 on cygwin.

Kind regards

robert
 
C

Caleb Tennis

I just upraded to Ruby 1.8.3 (from sources) on my Redhat Linux box.
When I attempt to do anything that starts a new thread, I receive the
message "ThreadError: uninitialized thread - check
`Thread#initialize'". Below is a transcript from a one-line session in
IRB that demonstrates the problem. Any ideas? (Please let me know if
there is other information that would be helpful in diagnosing this.)

The ruby executable links against libruby18.so. If you downloaded and
installed ruby into /usr/local or something like that, perhaps at runtime
your new ruby binary is still linking against the older ruby library. A
quick use of 'ldd' will help determine that.

Caleb
 
E

Eric K

Thanks for the replies.

Ara >> can you show us how you compiled ruby?

I installed Ruby 1.8.3 from source using (I believe) the standard
"compile/make/make install" cycle. (It's been a week or so, so the
memory's a bit weak). Might there have been special switches I'd have
needed for Redhat Enterprise Server 3?

Caleb >> perhaps at runtime your new ruby binary is still linking
against
Caleb >> the older ruby library. A quick use of 'ldd' will help
determine that.

Here's the output from 'ldd' of /usr/local/bin/ruby:

libdl.so.2 => /lib/libdl.so.2 (0x200000000005c000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x2000000000078000)
libm.so.6.1 => /lib/tls/libm.so.6.1 (0x20000000000c0000)
libc.so.6.1 => /lib/tls/libc.so.6.1 (0x2000000000154000)
/lib/ld-linux-ia64.so.2 => /lib/ld-linux-ia64.so.2
(0x2000000000000000)

Unfortunately I'm not sure what to make of it. Is there a way to tell
if the '/lib/ld-linux-ia64.so.2' referenced is for 1.8.2, 1.8.3, or
1.6?

Thanks again!
 

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
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top