Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird bug: dylib symbol loading hangs on pthread semaphore



On Friday, Dec 20, 2002, at 09:50 US/Pacific, Yarden Livnat wrote:
Program received signal SIGINT, Interrupt.
0x90034d68 in semaphore_wait_trap ()
(gdb) where
#0 0x90034d68 in semaphore_wait_trap ()
#1 0x9000a258 in pthread_mutex_lock ()
#2 0x001972ec in std::locale::classic() ()
#3 0x00196b48 in std::locale::locale() ()
#4 0x0018ccf4 in std::basic_filebuf<char, std::char_traits<char> >::basic_filebuf(__sFILE*, std::_Ios_Openmode, int) ()
#5 0x00188644 in std::ios_base::Init::_S_ios_create(bool) ()
#6 0x001889c8 in std::ios_base::Init::Init() ()
#7 0x001ae2e4 in __static_initialization_and_destruction_0(int, int) ()
#8 0x001ae348 in _GLOBAL__I__Z4testv ()
#9 0x8fe16350 in __dyld_call_module_initializers_for_library ()
#10 0x8fe160e4 in __dyld_call_module_initializers ()
#11 0x8fe106f0 in __dyld_link_in_need_modules ()
#12 0x8fe1016c in __dyld_bind_lazy_symbol_reference ()
#13 0x8fe00ec0 in __dyld_stub_binding_helper_interface ()
#14 0x00197344 in std::locale::classic() ()
#15 0x00196b48 in std::locale::locale() ()
#16 0x0018ccf4 in std::basic_filebuf<char, std::char_traits<char> >::basic_filebuf(__sFILE*, std::_Ios_Openmode, int) ()
#17 0x00188644 in std::ios_base::Init::_S_ios_create(bool) ()
#18 0x001889c8 in std::ios_base::Init::Init() ()
#19 0x001ae1e4 in __static_initialization_and_destruction_0(int, int) ()
#20 0x001ae248 in _GLOBAL__I__ZN1B4failEv ()
#21 0x8fe16350 in __dyld_call_module_initializers_for_library ()
#22 0x8fe160e4 in __dyld_call_module_initializers ()
#23 0x8fe106f0 in __dyld_link_in_need_modules ()
#24 0x8fe1016c in __dyld_bind_lazy_symbol_reference ()
#25 0x8fe00ec0 in __dyld_stub_binding_helper_interface ()
#26 0x0018ccf4 in std::basic_filebuf<char, std::char_traits<char> >::basic_filebuf(__sFILE*, std::_Ios_Openmode, int) ()
#27 0x00188644 in std::ios_base::Init::_S_ios_create(bool) ()
#28 0x001889c8 in std::ios_base::Init::Init() ()
#29 0x001ae0e4 in __static_initialization_and_destruction_0(int, int) ()
#30 0x001ae148 in _GLOBAL__I__ZN1A4failEv ()
#31 0x8fe16350 in __dyld_call_module_initializers_for_library ()
#32 0x8fe160e4 in __dyld_call_module_initializers ()
#33 0x8fe106f0 in __dyld_link_in_need_modules ()
#34 0x8fe13d68 in __dyld__dyld_NSLookupSymbolInImage ()
#35 0x0005fd80 in dlsymIntern ()
#36 0x00002a44 in main ()
#37 0x000025e0 in _start (argc=2, argv=0xbffffc34, envp=0xbffffc40) at /SourceCache/Csu/Csu-45/crt.c:267
#38 0x00002460 in start ()

Notice that std::locale::classic() is frame 14 and frame 2. For whatever reason, a mutex is being acquired in that method, then some interaction between dyld and the C++ initializers is causing recursion into that same method. The mutex isn't recursive, so the thread deadlocks against itself.

This is what is happening. I can't be of much help in answering why though.

Jason
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >weird bug: dylib symbol loading hangs on pthread semaphore (From: Yarden Livnat <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.