Segfault in pthread_detach (TBB)

asked 2015-01-26 08:55:40 -0500

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[359b000000+17000]

Program terminated with signal SIGSEGV, Segmentation fault.

0 0x000000359b0080e0 in pthread_detach () from /lib64/

(gdb) bt

0 0x000000359b0080e0 in pthread_detach () from /lib64/

1 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:238

2 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:203

3 0x0000000000dabfb8 in on_thread_leaving<true> (this=0x7ff5d0053780) at /sandbox/@BUILD-release/externals/opencv/opencv/opencv/3rdparty/tbb/tbb41_20130613oss/src/tbb/arena.h:357

4 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:1168

5 0x000000359b007a69 in start_thread () from /lib64/

6 0x000000359ace89dd in clone () from /lib64/

As 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.

edit retag flag offensive close merge delete