Command in backticks hangs? (OS X, 1.8.6-p36)

T

Tim Hunter

I'm running ruby 1.8.6 (2007-06-07 patchlevel 36) [powerpc-darwin8.9.0]

I have a script (the OS X installer script for RMagick) that I've been
using for some months now. Today I discovered that, in this script only,
a command in backticks hangs:

im_version = `Magick-config --version` rescue nil

The command works normally when I enter it on the command line. The
statement works normally when I try it in irb. This statement works
normally as a simple one line Ruby script.

It is possible that this is the first time I've run the script since I
upgraded to this version of Ruby.

Has anybody else encountered this problem?
 
T

Tim Hunter

Tim said:
I'm running ruby 1.8.6 (2007-06-07 patchlevel 36) [powerpc-darwin8.9.0]

I have a script (the OS X installer script for RMagick) that I've been
using for some months now. Today I discovered that, in this script
only, a command in backticks hangs:

im_version = `Magick-config --version` rescue nil

The command works normally when I enter it on the command line. The
statement works normally when I try it in irb. This statement works
normally as a simple one line Ruby script.

It is possible that this is the first time I've run the script since I
upgraded to this version of Ruby.

Has anybody else encountered this problem?
Following up to myself: I uninstalled 1.8.6 patchlevel 36 and replaced
it with 1.8.6 patchlevel 0 downloaded from RubyForge. The script works
normally now. I suppose I should get energetic and work on a small
reproduction of the problem.
 
J

James Edward Gray II

Thanks! I just hope it's not broken in the version that will ship
with Leopard.

Yeah, I fear that myself. It would hurt the use of Ruby as a
scripting language in that release a lot.

James Edward Gray II
 
J

James Edward Gray II

The script works normally now. I suppose I should get energetic and
work on a small reproduction of the problem.

If anyone has a minimal script that shows this error, please share
it. I've been in contact with Apple and Leopard is suppose to ship
with Ruby 1.8.6-p36 which is where I found the issue. They are
willing to patch it though, if we can show the problem.
Unfortunately, both scripts I ran into it with are very non-trivial.

James Edward Gray II
 
T

Tim Hunter

James said:
If anyone has a minimal script that shows this error, please share
it. I've been in contact with Apple and Leopard is suppose to ship
with Ruby 1.8.6-p36 which is where I found the issue. They are
willing to patch it though, if we can show the problem.
Unfortunately, both scripts I ran into it with are very non-trivial.

James Edward Gray II
Oh, great. I re-installed 1.8.6-p36 and the script runs normally now.

Sigh. Sometimes I hate software.
 
J

James Edward Gray II

Oh, great. I re-installed 1.8.6-p36 and the script runs normally now.

Sigh. Sometimes I hate software.

I'm pretty sure the issue is related to threading. It would always
show up for me after I had been fetching Web pages or sending some
email using the networking libraries.

James Edward Gray II
 
B

Bill Kelly

From: "James Edward Gray II said:
I'm pretty sure the issue is related to threading. It would always
show up for me after I had been fetching Web pages or sending some
email using the networking libraries.

Something like this was brought up on ruby-core last week:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/11505

``1.8.6 thread support was broken in bad ways. It stayed for three months

1.8.6-p36 is broken w.r.t. compilation of extensions and has a thread bug.
The bug is much minor than in 1.8.6, but it is nonetheless a bug in a
very "core" part of the standard library.''

It seems to me if apple is willing to apply a patch, we ought to
maybe bring this discussion over to ruby-core ASAP so that whoever
knows the details can co-ordinate with apple... It sounds like
there is the potential to avert a disaster here...


Regards,

Bill
 
J

James Edward Gray II

Something like this was brought up on ruby-core last week:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/11505

``1.8.6 thread support was broken in bad ways. It stayed for three
months

1.8.6-p36 is broken w.r.t. compilation of extensions and has a
thread bug. The bug is much minor than in 1.8.6, but it is
nonetheless a bug in a very "core" part of the standard library.''

Yes, both myself and an Apple employee were trying to follow that
message train to find example error code and see where the issue was
resolved in Subversion. We may have located the relevant patch by
Nobu in the bug tracker, but that's about it.

James Edward Gray II
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top