[#25936] [Bug:1.9] [rubygems] $LOAD_PATH includes bin directory — Nobuyoshi Nakada <nobu@...>

Hi,

10 messages 2009/10/05

[#25943] Disabling tainting — Tony Arcieri <tony@...>

Would it make sense to have a flag passed to the interpreter on startup that

16 messages 2009/10/05

[#26028] [Bug #2189] Math.atanh(1) & Math.atanh(-1) should not raise an error — Marc-Andre Lafortune <redmine@...>

Bug #2189: Math.atanh(1) & Math.atanh(-1) should not raise an error

14 messages 2009/10/10

[#26222] [Bug #2250] IO::for_fd() objects' finalization dangerously closes underlying fds — Mike Pomraning <redmine@...>

Bug #2250: IO::for_fd() objects' finalization dangerously closes underlying fds

11 messages 2009/10/22

[#26244] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context fails — Suraj Kurapati <redmine@...>

Bug #2258: Kernel#require inside rb_require() inside rb_protect() inside SysV context fails

24 messages 2009/10/22

[#26361] [Feature #2294] [PATCH] ruby_bind_stack() to embed Ruby in coroutine — Suraj Kurapati <redmine@...>

Feature #2294: [PATCH] ruby_bind_stack() to embed Ruby in coroutine

42 messages 2009/10/27

[#26371] [Bug #2295] segmentation faults — tomer doron <redmine@...>

Bug #2295: segmentation faults

16 messages 2009/10/27

[ruby-core:25928] Ruby 1.8.6-p383 hangs in dln_load on Snow Leopard

From: Timothy Hunter <cyclists@...>
Date: 2009-10-03 21:26:21 UTC
List: ruby-core #25928
An RMagick user reports that Ruby 1.8.6 hangs when requiring RMagick.  
I've determined that Ruby hangs in semaphore_wait_signal_trap() called  
from dln_load(). I've pasted the full traceback below.

This is Ruby 1.8.6 (2009-08-04 patchlevel 383) [i686-darwin10.0.0]  
running on Snow Leopard installed from source. The hang does not occur  
with the version of Ruby that is pre-installed with Snow Leopard  
(1.8.7-p72), or with Ruby 1.8.7-p174 installed from source.

Here's the Ruby ./configure command:

$ ./configure --enable-pthread --enable-shared --enable-install-doc

In all cases I'm using RMagick 2.11.1, from http://rubyforge.org/frs/download.php/63235/RMagick-2.11.1.tar.gz 
  and ImageMagick 6.5.6-5, from ftp.imagemagick.org. I don't think it  
matters precisely which delegate libraries are installed but if it  
does I'll be glad to list what I have installed.

A simple reproduction is

ruby -r RMagick -e"puts Magick::Long_version"

I'm using the stock gcc that comes with Snow Leopard:

$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)

I'd appreciate advice on how to resolve this problem. Please let me  
know if you need any more information. Thanks.

Here's the gdb traceback:

(gdb) whe
#0  0x00007fff80066dc2 in semaphore_wait_signal_trap ()
#1  0x00007fff8006c30d in pthread_mutex_lock ()
#2  0x00007fff83280490 in unmap_image ()
#3  0x00007fff5fc04a34 in __dyld__ZN4dyld11removeImageEP11ImageLoader ()
#4  0x00007fff5fc04ba5 in __dyld__ZN4dyld20garbageCollectImagesEv ()
#5  0x00007fff5fc09e9a in __dyld_dlclose ()
#6  0x00007fff8006e565 in dlclose ()
#7  0x00007fff832783c5 in _read_images ()
#8  0x00007fff8328f25e in map_images_nolock ()
#9  0x00007fff83277bc0 in map_images ()
#10 0x00007fff5fc039b9 in  
__dyld__ZN4dyldL18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoE 
  ()
#11 0x00007fff5fc0c839 in  
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbbRKNS_10RPathChainE ()
#12 0x00007fff5fc04d48 in  
__dyld__ZN4dyld4linkEP11ImageLoaderbRKNS0_10RPathChainE ()
#13 0x00007fff5fc08a29 in __dyld_NSLinkModule ()
#14 0x00007fff8016dfce in NSLinkModule ()
#15 0x0000000100011479 in dln_load (file=0x10023e820 "../../ext/ 
RMagick/RMagick2.bundle") at dln.c:1469
#16 0x000000010002e761 in rb_require_safe (fname=4296659680, safe=0)  
at eval.c:7297
#17 0x0000000100023d00 in rb_call0 (klass=4296796480, recv=4296786760,  
id=9449, oid=9449, argc=1, argv=0x7fff5fbfead0, body=0x1001a0af8,  
flags=<value temporarily unavailable, due to optimizations>) at eval.c: 
5872
#18 0x000000010002403b in rb_call (klass=4296796480, recv=4296786760,  
mid=9449, argc=1, argv=0x7fff5fbfead0, scope=1, self=4296786760) at  
eval.c:6119
#19 0x000000010001d6b2 in rb_eval (self=4296786760, n=<value  
temporarily unavailable, due to optimizations>) at eval.c:3507
#20 0x000000010002e381 in rb_load (fname=4296660280, wrap=<value  
temporarily unavailable, due to optimizations>) at eval.c:6914
#21 0x000000010002e7e0 in rb_require_safe (fname=4296662160, safe=0)  
at eval.c:7288
#22 0x0000000100023d00 in rb_call0 (klass=4296796480, recv=4296786760,  
id=9449, oid=9449, argc=1, argv=0x7fff5fbff450, body=0x1001a0af8,  
flags=<value temporarily unavailable, due to optimizations>) at eval.c: 
5872
#23 0x000000010002403b in rb_call (klass=4296796480, recv=4296786760,  
mid=9449, argc=1, argv=0x7fff5fbff450, scope=1, self=4296786760) at  
eval.c:6119
#24 0x000000010001d6b2 in rb_eval (self=4296786760, n=<value  
temporarily unavailable, due to optimizations>) at eval.c:3507
#25 0x000000010002fa5b in ruby_exec_internal () at eval.c:1644
#26 0x000000010002fa98 in ruby_exec () at eval.c:1664
#27 0x000000010002fac0 in ruby_run () at eval.c:1674
#28 0x0000000100000ee4 in main (argc=<value temporarily unavailable,  
due to optimizations>, argv=<value temporarily unavailable, due to  
optimizations>, envp=<value temporarily unavailable, due to  
optimizations>) at main.c:48



In This Thread

Prev Next