View Single Post
Old 05-23-12, 03:28 AM   #11
martvdsanden
Registered User
 
Join Date: May 2012
Location: The Netherlands
Posts: 1
Default Re: 295.20 crash on fork call

I am seeing the same problem in 295.49, it was fine before a driver update, I'm not sure what version that was though.

I'm running a multi-threaded program which uses OpenGL (direct X11 setup of GL windows, no QT or Glut), but also needs to fork() to capture a process output.

The stack-trace of the child process below clearly shows that a mutex inside libGL is hanging. Since fork() only "clones" the calling thread, there will be no other thread to unlock this mutex, therefore this is a deadlock situation.

This seems to me to be a bug inside libGL? Anyone any ideas?

I might have to note that it happens only once in a while. I do a lot of forks (a few per second) and usually in about a minute the first child hangs.

Child process stack-trace:

0xb776b424 in __kernel_vsyscall ()
(gdb) bt
#0 0xb776b424 in __kernel_vsyscall ()
#1 0xb75715a2 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2 0xb756cebb in _L_lock_764 () from /lib/i386-linux-gnu/libpthread.so.0
#3 0xb756cd75 in __pthread_mutex_lock (mutex=0xb5502660) at pthread_mutex_lock.c:82
#4 0xb54be671 in ?? () from /usr/lib/nvidia-current-updates/libGL.so.1
#5 0xb7574464 in __fork () at ../nptl/sysdeps/unix/sysv/linux/pt-fork.c:26
#6 0xb1deb8f1 in yb::HttpServiceCGIResponse::doWrite (this=0xb07070c0, fd=41) at /home/mart/Projects/yb/yb/net/httpservicecgiresponse.cc:53
#7 0xb1dc794d in yb::ConfigServiceRequestHandler:nWrite (this=0xb07079f0) at /home/mart/Projects/yb/plugins/configservice/configservicerequesthandler.cc:319
#8 0xb1de42ec in operator() (this=0xb0700aa0) at /home/mart/Projects/yb/yb/net/httpservice.cc:107
#9 std::_Function_handler<void(), yb::HttpService::asyncWrite(const std::shared_ptr<yb::HttpServiceRequest>&)::<lambda ()>::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...)
at /usr/include/c++/4.6/functional:1778
#10 0x0808b4c0 in operator() (this=0xb1a291ec) at /usr/include/c++/4.6/functional:2161
#11 yb::WorkerThread::loop (this=0x8c9a758, context=...) at /home/mart/Projects/yb/yb/threading/workerthread.cc:289
#12 0x0808bfc5 in operator() (this=0x8c9ac90) at /home/mart/Projects/yb/yb/threading/workerthread.cc:133
#13 __call<void> (this=0x8c9ac90, __args=...) at /usr/include/c++/4.6/functional:1287
#14 operator()<> (this=0x8c9ac90) at /usr/include/c++/4.6/functional:1378
#15 std::thread::_Impl<std::_Bind_result<void, yb::WorkerThread::increaseThreads(size_t)::<lambda ()>()> >::_M_run(void) (this=0x8c9ac84) at /usr/include/c++/4.6/thread:117
#16 0xb7624007 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#17 0xb54c3a01 in ?? () from /usr/lib/nvidia-current-updates/libGL.so.1
#18 0x5c8b0824 in ?? ()
#19 0xbab80424 in ?? ()
#20 0x65000000 in ?? ()
#21 0x001015ff in ?? ()
#22 0xd3890000 in ?? ()
#23 0xfff0013d in ?? ()
#24 0xc30173ff in ?? ()
#25 0x0f8122e8 in ?? ()
#26 0x9fc18100 in ?? ()

Last edited by martvdsanden; 05-23-12 at 04:03 AM. Reason: Added that it doesn't happen every fork
martvdsanden is offline   Reply With Quote