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

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?

Tim H. wrote:

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.

On Jun 24, 2007, at 6:42 PM, Tim H. wrote:

Has anybody else encountered this problem?

Yes. This is the bug that hosed the Ruby Q. software:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/256794

That’s the second time I have run into the bug too, unfortunately.
It’s a pretty big issue with that release.

It is fixed in the HEAD of Ruby’s 1.8 branch, if that helps.

James Edward G. II

James Edward G. II wrote:

It is fixed in the HEAD of Ruby’s 1.8 branch, if that helps.

James Edward G. II

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

On Jun 26, 2007, at 7:38 PM, Tim H. wrote:

unfortunately. It’s a pretty big issue with that release.

It is fixed in the HEAD of Ruby’s 1.8 branch, if that helps.

James Edward G. 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 G. II

James Edward G. II wrote:

James Edward G. II

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

Sigh. Sometimes I hate software.

On Jun 27, 2007, at 3:43 PM, Tim H. wrote:

Unfortunately, both scripts I ran into it with are very non-trivial.

James Edward G. 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 G. II

On Jun 26, 2007, at 5:40 PM, Tim H. wrote:

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 G. II

On Jun 27, 2007, at 4:36 PM, Bill K. wrote:

share it. I’ve been in contact with Apple and Leopard is
Sigh. Sometimes I hate software.
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 G. II

From: “James Edward G. II” [email protected]

it. I’ve been in contact with Apple and Leopard is suppose to
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