#16 OpenMP crashes with multi-pipe configurations

closed-wont-fix
library (135)
4
2008-06-14
2008-05-15
Stefan Eilemann
No

Observed on Mac OS X 10.5.2, gcc 4.2.1: OpenMP crashes in gomp_resolve_num_threads when used concurrently from multiple threads. Does not happen with icc. A typical crash is:

Process: eqPly [84449]
Path: /Users/eile/Software/equalizer.5/src/build/Darwin/bin/eqPly.app/Contents/MacOS/eqPly
Identifier: eqPly
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: tcsh [42838]

Date/Time: 2008-05-15 09:18:23.997 +0200
OS Version: Mac OS X 10.5.2 (9C7010)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000008
Crashed Thread: 4

Thread 0:
0 libSystem.B.dylib 0x95075bce __semwait_signal + 10
1 libSystem.B.dylib 0x950a08cd pthread_cond_wait$UNIX2003 + 73
2 libeq.dylib 0x00310a38 eqBase::Monitor<unsigned int>::waitGE(unsigned int const&) const + 52 (monitor.h:208)
3 libeq.dylib 0x003b119c eq::Pipe::waitFrameFinished(unsigned int) const + 30 (pipe.h:165)
4 libeq.dylib 0x003aac01 eq::Node::_finishFrame(unsigned int) const + 77 (node.cpp:139)
5 libeq.dylib 0x003acc59 eq::Node::_cmdFrameFinish(eqNet::Command&) + 849 (node.cpp:380)
6 libeq.dylib 0x0031f791 eqNet::CommandFunc<eqNet::Base>::operator()(eqNet::Command&) + 87 (commandFunc.h:29)
7 libeq.dylib 0x0031ee72 eqNet::Base::invokeCommand(eqNet::Command&) + 336 (base.cpp:105)
8 libeq.dylib 0x0036fe13 eqNet::Session::_invokeObjectCommand(eqNet::Command&) + 1129 (session.cpp:522)
9 libeq.dylib 0x00372613 eqNet::Session::invokeCommand(eqNet::Command&) + 395 (session.cpp:478)
10 libeq.dylib 0x00351c3e eqNet::Node::invokeCommand(eqNet::Command&) + 750 (node.cpp:825)
11 libeq.dylib 0x003903b6 eq::Client::invokeCommand(eqNet::Command&) + 620 (client.cpp:294)
12 libeq.dylib 0x0039068d eq::Client::processCommand() + 71 (client.cpp:237)
13 libeq.dylib 0x0039451b eq::Config::finishFrame() + 217 (config.cpp:231)
14 eqPly 0x0001ba9b eqPly::Application::run() + 1155 (eqPly.cpp:63)
15 eqPly 0x0001ce99 main + 513 (main.cpp:57)
16 eqPly 0x0000285a start + 54

Thread 1:
0 libSystem.B.dylib 0x95075bce __semwait_signal + 10
1 libSystem.B.dylib 0x950a08cd pthread_cond_wait$UNIX2003 + 73
2 libeq.dylib 0x003242ce eqBase::MTQueue<eqNet::Command>::pop() + 58 (mtQueue.h:106)
3 libeq.dylib 0x003231bb eqNet::CommandQueue::pop() + 665 (commandQueue.cpp:72)
4 libeq.dylib 0x00351dfc eqNet::Node::_runCommandThread() + 148 (node.cpp:780)
5 libeq.dylib 0x003648f0 eqNet::Node::CommandThread::run() + 20 (node.h:625)
6 libeq.dylib 0x00316c6c eqBase::Thread::_runChild() + 380 (thread.cpp:101)
7 libeq.dylib 0x00316d51 eqBase::Thread::runChild(void*) + 23 (thread.cpp:77)
8 libSystem.B.dylib 0x9509fc55 _pthread_start + 321
9 libSystem.B.dylib 0x9509fb12 thread_start + 34

Thread 2:
0 libSystem.B.dylib 0x950d6142 poll$UNIX2003 + 10
1 libeq.dylib 0x0035394c eqNet::Node::_runReceiverThread() + 190 (node.cpp:523)
2 libeq.dylib 0x00364938 eqNet::Node::ReceiverThread::run() + 20 (node.h:610)
3 libeq.dylib 0x00316c6c eqBase::Thread::_runChild() + 380 (thread.cpp:101)
4 libeq.dylib 0x00316d51 eqBase::Thread::runChild(void*) + 23 (thread.cpp:77)
5 libSystem.B.dylib 0x9509fc55 _pthread_start + 321
6 libSystem.B.dylib 0x9509fb12 thread_start + 34

Thread 3:
0 libSystem.B.dylib 0x9506e9e6 mach_msg_trap + 10
1 libSystem.B.dylib 0x950761dc mach_msg + 72
2 com.apple.framework.IOKit 0x9695b632 io_connect_map_memory + 225
3 ...pple.ATIRadeonX1000GLDriver 0x0c519613 gldPageoffBuffer + 14915
4 ...pple.ATIRadeonX1000GLDriver 0x0c519d50 gldFinish + 160
5 GLEngine 0x0c3aef0c glFinish_Exec + 252
6 libGL.dylib 0x96c9834c glFinish + 92
7 eqPly 0x00021093 eq::Window::finish() const + 11 (window.h:184)
8 libeq.dylib 0x0038fb6e eq::ChannelStatistics::~ChannelStatistics() + 76 (channelStatistics.cpp:43)
9 libeq.dylib 0x00385bbc eq::Channel::_cmdFrameReadback(eqNet::Command&) + 554 (channel.cpp:728)
10 libeq.dylib 0x0031f791 eqNet::CommandFunc<eqNet::Base>::operator()(eqNet::Command&) + 87 (commandFunc.h:29)
11 libeq.dylib 0x0031ee72 eqNet::Base::invokeCommand(eqNet::Command&) + 336 (base.cpp:105)
12 libeq.dylib 0x0036fe13 eqNet::Session::_invokeObjectCommand(eqNet::Command&) + 1129 (session.cpp:522)
13 libeq.dylib 0x00372613 eqNet::Session::invokeCommand(eqNet::Command&) + 395 (session.cpp:478)
14 libeq.dylib 0x003c048c eq::Pipe::_runThread() + 1194 (pipe.cpp:314)
15 libeq.dylib 0x003c7754 eq::Pipe::PipeThread::run() + 20 (pipe.h:447)
16 libeq.dylib 0x00316c6c eqBase::Thread::_runChild() + 380 (thread.cpp:101)
17 libeq.dylib 0x00316d51 eqBase::Thread::runChild(void*) + 23 (thread.cpp:77)
18 libSystem.B.dylib 0x9509fc55 _pthread_start + 321
19 libSystem.B.dylib 0x9509fb12 thread_start + 34

Thread 4 Crashed:
0 libeq.dylib 0x003fa8aa gomp_resolve_num_threads + 42
1 libeq.dylib 0x003fa931 GOMP_parallel_start + 17
2 libeq.dylib 0x00329d16 eq::Compositor::_assembleDBImages(eq::Image*, std::vector<std::pair<eq::Frame const*, eq::Image const*>, std::allocator<std::pair<eq::Frame const*, eq::Image const*> > > const&) + 2656 (compositor.cpp:362)
3 libeq.dylib 0x0032aa34 eq::Compositor::assembleFramesCPU(std::vector<eq::Frame*, std::allocator<eq::Frame*> > const&, bool) + 1936 (compositor.cpp:354)
4 libeq.dylib 0x0032abb3 eq::Compositor::assembleFramesCPU(std::vector<eq::Frame*, std::allocator<eq::Frame*> > const&, eq::Channel*, bool) + 167 (compositor.cpp:260)
5 libeq.dylib 0x0032b369 eq::Compositor::assembleFrames(std::vector<eq::Frame*, std::allocator<eq::Frame*> > const&, eq::Channel*) + 77 (compositor.cpp:153)
6 libeq.dylib 0x00388a79 eq::Channel::frameAssemble(unsigned int) + 1731 (channel.cpp:195)
7 eqPly 0x00014c00 eqPly::Channel::frameAssemble(unsigned int) + 24 (channel.cpp:107)
8 libeq.dylib 0x00385d8f eq::Channel::_cmdFrameAssemble(eqNet::Command&) + 397 (channel.cpp:694)
9 libeq.dylib 0x0031f791 eqNet::CommandFunc<eqNet::Base>::operator()(eqNet::Command&) + 87 (commandFunc.h:29)
10 libeq.dylib 0x0031ee72 eqNet::Base::invokeCommand(eqNet::Command&) + 336 (base.cpp:105)
11 libeq.dylib 0x0036fe13 eqNet::Session::_invokeObjectCommand(eqNet::Command&) + 1129 (session.cpp:522)
12 libeq.dylib 0x00372613 eqNet::Session::invokeCommand(eqNet::Command&) + 395 (session.cpp:478)
13 libeq.dylib 0x003c048c eq::Pipe::_runThread() + 1194 (pipe.cpp:314)
14 libeq.dylib 0x003c7754 eq::Pipe::PipeThread::run() + 20 (pipe.h:447)
15 libeq.dylib 0x00316c6c eqBase::Thread::_runChild() + 380 (thread.cpp:101)
16 libeq.dylib 0x00316d51 eqBase::Thread::runChild(void*) + 23 (thread.cpp:77)
17 libSystem.B.dylib 0x9509fc55 _pthread_start + 321
18 libSystem.B.dylib 0x9509fb12 thread_start + 34

Thread 5:
0 libSystem.B.dylib 0xffff0665 __bzero + 101
1 libeq.dylib 0x0039bb96 eq::Event::Event() + 62
2 libeq.dylib 0x0038f6e9 eq::ConfigEvent::ConfigEvent() + 31
3 libeq.dylib 0x00384a40 eq::Channel::processEvent(eq::ChannelEvent const&) + 344 (channel.cpp:388)
4 libeq.dylib 0x003829ea eq::Channel::addStatistic(eq::ChannelEvent&) + 58 (channel.cpp:151)
5 libeq.dylib 0x0038fb9c eq::ChannelStatistics::~ChannelStatistics() + 122 (channelStatistics.cpp:44)
6 libeq.dylib 0x0032adb7 __ZN2eq12_GLOBAL__N_1L15_useCPUAssemblyERKSt6vectorIPNS_5FrameESaIS3_EEPNS_7ChannelEb + 413 (compositor.cpp:105)
7 libeq.dylib 0x0032b34b eq::Compositor::assembleFrames(std::vector<eq::Frame*, std::allocator<eq::Frame*> > const&, eq::Channel*) + 47 (compositor.cpp:152)
8 libeq.dylib 0x00388a79 eq::Channel::frameAssemble(unsigned int) + 1731 (channel.cpp:195)
9 eqPly 0x00014c00 eqPly::Channel::frameAssemble(unsigned int) + 24 (channel.cpp:107)
10 libeq.dylib 0x00385d8f eq::Channel::_cmdFrameAssemble(eqNet::Command&) + 397 (channel.cpp:694)
11 libeq.dylib 0x0031f791 eqNet::CommandFunc<eqNet::Base>::operator()(eqNet::Command&) + 87 (commandFunc.h:29)
12 libeq.dylib 0x0031ee72 eqNet::Base::invokeCommand(eqNet::Command&) + 336 (base.cpp:105)
13 libeq.dylib 0x0036fe13 eqNet::Session::_invokeObjectCommand(eqNet::Command&) + 1129 (session.cpp:522)
14 libeq.dylib 0x00372613 eqNet::Session::invokeCommand(eqNet::Command&) + 395 (session.cpp:478)
15 libeq.dylib 0x003c048c eq::Pipe::_runThread() + 1194 (pipe.cpp:314)
16 libeq.dylib 0x003c7754 eq::Pipe::PipeThread::run() + 20 (pipe.h:447)
17 libeq.dylib 0x00316c6c eqBase::Thread::_runChild() + 380 (thread.cpp:101)
18 libeq.dylib 0x00316d51 eqBase::Thread::runChild(void*) + 23 (thread.cpp:77)
19 libSystem.B.dylib 0x9509fc55 _pthread_start + 321
20 libSystem.B.dylib 0x9509fb12 thread_start + 34

Thread 6:
0 libSystem.B.dylib 0x95075bce __semwait_signal + 10
1 libSystem.B.dylib 0x950a08cd pthread_cond_wait$UNIX2003 + 73
2 libGLProgrammability.dylib 0x953ef432 glvmDoWork + 162
3 libSystem.B.dylib 0x9509fc55 _pthread_start + 321
4 libSystem.B.dylib 0x9509fb12 thread_start + 34

Thread 7:
0 libSystem.B.dylib 0xffff1090 __memset_pattern + 144
1 libeq.dylib 0x0032aa1f eq::Compositor::assembleFramesCPU(std::vector<eq::Frame*, std::allocator<eq::Frame*> > const&, bool) + 1915 (compositor.cpp:353)
2 libeq.dylib 0x0032abb3 eq::Compositor::assembleFramesCPU(std::vector<eq::Frame*, std::allocator<eq::Frame*> > const&, eq::Channel*, bool) + 167 (compositor.cpp:260)
3 libeq.dylib 0x0032b369 eq::Compositor::assembleFrames(std::vector<eq::Frame*, std::allocator<eq::Frame*> > const&, eq::Channel*) + 77 (compositor.cpp:153)
4 libeq.dylib 0x00388a79 eq::Channel::frameAssemble(unsigned int) + 1731 (channel.cpp:195)
5 eqPly 0x00014c00 eqPly::Channel::frameAssemble(unsigned int) + 24 (channel.cpp:107)
6 libeq.dylib 0x00385d8f eq::Channel::_cmdFrameAssemble(eqNet::Command&) + 397 (channel.cpp:694)
7 libeq.dylib 0x0031f791 eqNet::CommandFunc<eqNet::Base>::operator()(eqNet::Command&) + 87 (commandFunc.h:29)
8 libeq.dylib 0x0031ee72 eqNet::Base::invokeCommand(eqNet::Command&) + 336 (base.cpp:105)
9 libeq.dylib 0x0036fe13 eqNet::Session::_invokeObjectCommand(eqNet::Command&) + 1129 (session.cpp:522)
10 libeq.dylib 0x00372613 eqNet::Session::invokeCommand(eqNet::Command&) + 395 (session.cpp:478)
11 libeq.dylib 0x003c048c eq::Pipe::_runThread() + 1194 (pipe.cpp:314)
12 libeq.dylib 0x003c7754 eq::Pipe::PipeThread::run() + 20 (pipe.h:447)
13 libeq.dylib 0x00316c6c eqBase::Thread::_runChild() + 380 (thread.cpp:101)
14 libeq.dylib 0x00316d51 eqBase::Thread::runChild(void*) + 23 (thread.cpp:77)
15 libSystem.B.dylib 0x9509fc55 _pthread_start + 321
16 libSystem.B.dylib 0x9509fb12 thread_start + 34

Thread 4 crashed with X86 Thread State (32-bit):
eax: 0x00000000 ebx: 0x003fa891 ecx: 0x00000000 edx: 0x000000c8
edi: 0x00000000 esi: 0x00000000 ebp: 0xb0226988 esp: 0xb0226970
ss: 0x0000001f efl: 0x00010297 eip: 0x003fa8aa cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037
cr2: 0x00000008

Discussion

  • Logged In: YES
    user_id=326553
    Originator: YES

    omp_set_nested( 1 ); does not help as a workaround.

     
  • Logged In: YES
    user_id=326553
    Originator: YES

    Radar bug 5863902 filed with Apple.

     
    • status: open --> closed-wont-fix
     
  • Logged In: YES
    user_id=326553
    Originator: YES

    This has been confirmed to be a limitation in gcc 4.2 and 4.3, see gcc bug.