Hi Chris, Thanks for the data, so far I do not know what's happening but that is very helpful indeed.
Cheers Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Chris Mears Sent: Thursday, September 23, 2010 7:35 AM To: Guido Tack Cc: [email protected] Subject: Re: [gecode-users] Multiple thread lock error > Could you give us some details on the machine (processor(s), how many cores, hyperthreading)? /proc/cpuinfo says "Intel(R) Core(TM)2 Duo CPU E8600 @ 3.33GHz", which I think means 2 cores with no hyperthreading. I did some more investigation (all with Gecode 3.4.0). With 1 thread there are no errors. With 2 threads I sometimes get "terminate called after throwing an instance of 'Gecode::OperatingSystemError'", but the process exits cleanly and doesn't crash. With 3 or more threads, I get that message and sometimes the "what(): Mutex::acquire[pthread_mutex_lock]: Operating system error" message accompanied by a crash and core dump. The stack trace from the crashed program is included below (and after that another crashed stack trace on a 4x2 core machine with 10 Gecode threads, in case it helps). Good luck! Chris Stack trace: 2 cores, 3 threads: Core was generated by `./bibd -threads 3'. Program terminated with signal 6, Aborted. #0 0x00007f18b1b3f165 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. in ../nptl/sysdeps/unix/sysv/linux/raise.c (gdb) thread apply all bt Thread 4 (Thread 32706): #0 __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97 #1 0x00007f18b1b85458 in _L_lock_9590 () from /lib/libc.so.6 #2 0x00007f18b1b83841 in *__GI___libc_free (mem=0x7f18b1e69e40) at malloc.c:3737 #3 0x00007f18b3baf8ed in Gecode::Space::~Space() () from /usr/lib/libgecodekernel.so.23 #4 0x00000000004055a3 in ~ScriptBase (this=0x7f18b1e69e40, __in_chrg=<value optimized out>) at ./gecode/driver.hh:525 #5 ~BIBD (this=0x7f18b1e69e40, __in_chrg=<value optimized out>) at examples/bibd.cpp:96 #6 0x00007f18b51342f6 in ?? () from /usr/lib/libgecodesearch.so.23 #7 0x00007f18b5139453 in ?? () from /usr/lib/libgecodesearch.so.23 #8 0x00007f18b39a76e4 in Gecode::Support::Thread::Run::exec() () from /usr/lib/libgecodesupport.so.23 #9 0x00007f18b39a78c9 in ?? () from /usr/lib/libgecodesupport.so.23 #10 0x00007f18b26208ba in start_thread (arg=<value optimized out>) at pthread_create.c:300 #11 0x00007f18b1bdc02d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #12 0x0000000000000000 in ?? () Current language: auto The current source language is "auto; currently c". Thread 3 (Thread 32705): #0 __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97 #1 0x00007f18b1b85458 in _L_lock_9590 () from /lib/libc.so.6 #2 0x00007f18b1b83841 in *__GI___libc_free (mem=0x7f18b1e69e40) at malloc.c:3737 #3 0x00007f18b295a300 in qUnregisterResourceData(int, unsigned char const*, unsigned char const*, unsigned char const*) () from /usr/lib/libQtCore.so.4 #4 0x00007f18b336d223 in ?? () from /usr/lib/libQtGui.so.4 #5 0x00007f18b1b43965 in __cxa_finalize (d=0x7f18b399fe80) at cxa_finalize.c:56 #6 0x00007f18b2eb0526 in ?? () from /usr/lib/libQtGui.so.4 #7 0x000000000000002b in ?? () #8 0x0000000000000000 in ?? () Current language: auto The current source language is "auto; currently asm". Thread 2 (Thread 32708): #0 0x00007f18b1bd4cea in __brk (addr=0x246d000) at ../sysdeps/unix/sysv/linux/x86_64/brk.c:32 #1 0x00007f18b1bd4d9d in *__GI___sbrk (increment=-589824) at sbrk.c:54 #2 0x00007f18b1b85789 in *__GI___default_morecore (increment=38195200) at morecore.c:49 #3 0x00007f18b1b7e71a in sYSTRIm (pad=<value optimized out>, av=0x7f18b1e69e40) at malloc.c:3491 #4 0x00007f18b1b8384c in *__GI___libc_free (mem=<value optimized out>) at malloc.c:3739 #5 0x00007f18b3baf837 in Gecode::Space::~Space() () from /usr/lib/libgecodekernel.so.23 #6 0x00000000004055a3 in ~ScriptBase (this=0x246d000, __in_chrg=<value optimized out>) at ./gecode/driver.hh:525 #7 ~BIBD (this=0x246d000, __in_chrg=<value optimized out>) at examples/bibd.cpp:96 #8 0x00007f18b51342f6 in ?? () from /usr/lib/libgecodesearch.so.23 #9 0x00007f18b5139453 in ?? () from /usr/lib/libgecodesearch.so.23 #10 0x00007f18b39a76e4 in Gecode::Support::Thread::Run::exec() () from /usr/lib/libgecodesupport.so.23 #11 0x00007f18b39a78c9 in ?? () from /usr/lib/libgecodesupport.so.23 #12 0x00007f18b26208ba in start_thread (arg=<value optimized out>) at pthread_create.c:300 #13 0x00007f18b1bdc02d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 ---Type <return> to continue, or q <return> to quit--- #14 0x0000000000000000 in ?? () Thread 1 (Thread 32707): #0 0x00007f18b1b3f165 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007f18b1b41f70 in *__GI_abort () at abort.c:92 #2 0x00007f18b23d2dc5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6 #3 0x00007f18b23d1166 in ?? () from /usr/lib/libstdc++.so.6 #4 0x00007f18b23d1193 in std::terminate() () from /usr/lib/libstdc++.so.6 #5 0x00007f18b23d128e in __cxa_throw () from /usr/lib/libstdc++.so.6 #6 0x00007f18b39a778c in Gecode::Support::Thread::Run::exec() () from /usr/lib/libgecodesupport.so.23 #7 0x00007f18b39a78c9 in ?? () from /usr/lib/libgecodesupport.so.23 #8 0x00007f18b26208ba in start_thread (arg=<value optimized out>) at pthread_create.c:300 #9 0x00007f18b1bdc02d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #10 0x0000000000000000 in ?? () Current language: auto The current source language is "auto; currently c". ================================ 4 core (x2 via hyperthreading) machine with 10 threads: Core was generated by `./bibd -threads 8 31 6 1'. Program terminated with signal 6, Aborted. [New process 8903] [New process 8897] [New process 8898] [New process 8900] [New process 8904] [New process 8896] [New process 8901] [New process 8899] [New process 8902] #0 0x00007f4870217fb5 in raise () from /lib/libc.so.6 (gdb) thread apply all bt Thread 9 (process 8902): #0 0x00007f4870217fb5 in raise () from /lib/libc.so.6 #1 0x00007f4870219bc3 in abort () from /lib/libc.so.6 #2 0x00007f4870cd908f in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6 #3 0x00007f4870cd74b6 in ?? () from /usr/lib/libstdc++.so.6 #4 0x00007f4870cd74e3 in std::terminate () from /usr/lib/libstdc++.so.6 #5 0x00007f4870cd75ca in __cxa_throw () from /usr/lib/libstdc++.so.6 #6 0x00007f4870f1e85f in Gecode::Support::Thread::Run::exec ( this=<value optimized out>) at ./gecode/support/thread/pthreads.hpp:64 #7 0x00007f4870f1e969 in Gecode::Support::bootstrap (p=0x22c0) at gecode/support/thread/pthreads.cpp:47 #8 0x00007f487055e3ba in start_thread () from /lib/libpthread.so.0 #9 0x00007f48702cb02d in clone () from /lib/libc.so.6 #10 0x0000000000000000 in ?? () Thread 8 (process 8899): #0 0x00007f4870217fb5 in raise () from /lib/libc.so.6 #1 0x00007f4870219bc3 in abort () from /lib/libc.so.6 #2 0x00007f4870cd908f in __gnu_cxx::__verbose_terminate_handler () ---Type <return> to continue, or q <return> to quit--- from /usr/lib/libstdc++.so.6 #3 0x00007f4870cd74b6 in ?? () from /usr/lib/libstdc++.so.6 #4 0x00007f4870cd74e3 in std::terminate () from /usr/lib/libstdc++.so.6 #5 0x00007f4870cd75ca in __cxa_throw () from /usr/lib/libstdc++.so.6 #6 0x00007f4870f1e85f in Gecode::Support::Thread::Run::exec ( this=<value optimized out>) at ./gecode/support/thread/pthreads.hpp:64 #7 0x00007f4870f1e969 in Gecode::Support::bootstrap (p=0x22c0) at gecode/support/thread/pthreads.cpp:47 #8 0x00007f487055e3ba in start_thread () from /lib/libpthread.so.0 #9 0x00007f48702cb02d in clone () from /lib/libc.so.6 #10 0x0000000000000000 in ?? () Thread 7 (process 8901): #0 0x00007f48705622e9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x00007f4870f1e7d5 in Gecode::Support::Thread::Run::exec (this=0x20d7860) at ./gecode/support/thread/pthreads.hpp:100 #2 0x00007f4870f1e969 in Gecode::Support::bootstrap (p=0x20d789c) at gecode/support/thread/pthreads.cpp:47 #3 0x00007f487055e3ba in start_thread () from /lib/libpthread.so.0 #4 0x00007f48702cb02d in clone () from /lib/libc.so.6 ---Type <return> to continue, or q <return> to quit--- #5 0x0000000000000000 in ?? () Thread 6 (process 8896): #0 0x00007f487028d0c0 in _exit () from /lib/libc.so.6 #1 0x00007f487021b765 in exit () from /lib/libc.so.6 #2 0x00007f48702035ad in __libc_start_main () from /lib/libc.so.6 #3 0x0000000000403379 in _start () at ../sysdeps/x86_64/elf/start.S:113 Thread 5 (process 8904): #0 0x00007f4870217fb5 in raise () from /lib/libc.so.6 #1 0x00007f4870219bc3 in abort () from /lib/libc.so.6 #2 0x00007f4870cd908f in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6 #3 0x00007f4870cd74b6 in ?? () from /usr/lib/libstdc++.so.6 #4 0x00007f4870cd74e3 in std::terminate () from /usr/lib/libstdc++.so.6 #5 0x00007f4870cd75ca in __cxa_throw () from /usr/lib/libstdc++.so.6 #6 0x00007f4870f1e85f in Gecode::Support::Thread::Run::exec ( this=<value optimized out>) at ./gecode/support/thread/pthreads.hpp:64 #7 0x00007f4870f1e969 in Gecode::Support::bootstrap (p=0x22c0) at gecode/support/thread/pthreads.cpp:47 #8 0x00007f487055e3ba in start_thread () from /lib/libpthread.so.0 ---Type <return> to continue, or q <return> to quit--- #9 0x00007f48702cb02d in clone () from /lib/libc.so.6 #10 0x0000000000000000 in ?? () Thread 4 (process 8900): #0 0x00007f48702c7a47 in madvise () from /lib/libc.so.6 #1 0x00007f487025efb1 in ?? () from /lib/libc.so.6 #2 0x00007f487025f2a6 in free () from /lib/libc.so.6 #3 0x00007f48711276ed in ~Space (this=0x20d3c90) at ./gecode/support/heap.hpp:330 #4 0x00000000004049f3 in ~BIBD (this=0x7f4860021000) at ./gecode/driver.hh:525 #5 0x00007f4872752286 in ~Worker (this=0x20d4ec0) at ./gecode/search/parallel/path.hh:190 #6 0x00007f4872757643 in ~Worker (this=0x7f4860021000) at ./gecode/search/parallel/dfs.hh:49 #7 0x00007f4870f1e776 in Gecode::Support::Thread::Run::exec (this=0x20d7690) at gecode/support/thread/thread.cpp:59 #8 0x00007f4870f1e969 in Gecode::Support::bootstrap (p=0x7f4860021000) at gecode/support/thread/pthreads.cpp:47 #9 0x00007f487055e3ba in start_thread () from /lib/libpthread.so.0 #10 0x00007f48702cb02d in clone () from /lib/libc.so.6 #11 0x0000000000000000 in ?? () ---Type <return> to continue, or q <return> to quit--- Thread 3 (process 8898): #0 0x00007f48705622e9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x00007f4870f1e7d5 in Gecode::Support::Thread::Run::exec (this=0x20d72f0) at ./gecode/support/thread/pthreads.hpp:100 #2 0x00007f4870f1e969 in Gecode::Support::bootstrap (p=0x20d732c) at gecode/support/thread/pthreads.cpp:47 #3 0x00007f487055e3ba in start_thread () from /lib/libpthread.so.0 #4 0x00007f48702cb02d in clone () from /lib/libc.so.6 #5 0x0000000000000000 in ?? () Thread 2 (process 8897): #0 0x00007f4870261808 in malloc () from /lib/libc.so.6 #1 0x00007f4870cd649f in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6 #2 0x00007f4870f1e869 in Gecode::Support::Thread::Run::exec (this=0x20d7120) at ./gecode/support/thread/pthreads.hpp:55 #3 0x00007f4870f1e969 in Gecode::Support::bootstrap (p=0xf8) at gecode/support/thread/pthreads.cpp:47 #4 0x00007f487055e3ba in start_thread () from /lib/libpthread.so.0 ---Type <return> to continue, or q <return> to quit--- #5 0x00007f48702cb02d in clone () from /lib/libc.so.6 #6 0x0000000000000000 in ?? () Thread 1 (process 8903): #0 0x00007f4870217fb5 in raise () from /lib/libc.so.6 #1 0x00007f4870219bc3 in abort () from /lib/libc.so.6 #2 0x00007f4870cd90b4 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6 #3 0x00007f4870cd74b6 in ?? () from /usr/lib/libstdc++.so.6 #4 0x00007f4870cd74e3 in std::terminate () from /usr/lib/libstdc++.so.6 #5 0x00007f4870cd75ca in __cxa_throw () from /usr/lib/libstdc++.so.6 #6 0x00007f4870f1e85f in Gecode::Support::Thread::Run::exec ( this=<value optimized out>) at ./gecode/support/thread/pthreads.hpp:64 #7 0x00007f4870f1e969 in Gecode::Support::bootstrap (p=0x22c0) at gecode/support/thread/pthreads.cpp:47 #8 0x00007f487055e3ba in start_thread () from /lib/libpthread.so.0 #9 0x00007f48702cb02d in clone () from /lib/libc.so.6 #10 0x0000000000000000 in ?? () (gdb) _______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
