2015-01-26 09:02:08 -0600 | asked a question | Segfault in pthread_detach (TBB) OpenCV 2.4.6 / RedHat 6.5 x86_64 / C++ gcc 4.8.3 / CPU only (no GPU) - Intel /multithreaded app which uses different algorithms from OpenCV (static linking) The problem is: occasionally we get SEGFAULT with the following backtrace: Dec 17 22:21:54 localhost kernel: multithreaded_app[19409]: segfault at 7ff5ef7fda08 ip 000000359b0080e0 sp 00007ff5fccd4d50 error 4 in libpthread-2.12.so[359b000000+17000] Program terminated with signal SIGSEGV, Segmentation fault. 0 0x000000359b0080e0 in pthread_detach () from /lib64/libpthread.so.0(gdb) bt 0 0x000000359b0080e0 in pthread_detach () from /lib64/libpthread.so.01 0x0000000000db11d9 in rml::internal::thread_monitor::detach_thread (handle=<optimized out="">) at /sandbox/@BUILD-release/externals/opencv/opencv/opencv/3rdparty/tbb/tbb41_20130613oss/src/rml/server/thread_monitor.h:2382 0x0000000000db137c in tbb::internal::rml::private_server::request_close_connection (this=0x7ff5d001a080) at /sandbox/@BUILD-release/externals/opencv/opencv/opencv/3rdparty/tbb/tbb41_20130613oss/src/tbb/private_server.cpp:2033 0x0000000000dabfb8 in on_thread_leaving<true> (this=0x7ff5d0053780) at /sandbox/@BUILD-release/externals/opencv/opencv/opencv/3rdparty/tbb/tbb41_20130613oss/src/tbb/arena.h:3574 tbb::internal::generic_scheduler::cleanup_master (this=<optimized out="">) at /sandbox/@BUILD-release/externals/opencv/opencv/opencv/3rdparty/tbb/tbb41_20130613oss/src/tbb/scheduler.cpp:11685 0x000000359b007a69 in start_thread () from /lib64/libpthread.so.06 0x000000359ace89dd in clone () from /lib64/libc.so.6As you can see, some kind of task sheduler in Intel TBB tries to phtread_detach invalid thread handle. Did anybody face similar problem or know OpenCV Issue addressing the problem? I couldn't find anything. Thanks in advance. |