Possible bug with pthreads on Debian (__pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed)

507 views
Skip to first unread message

Vasily Rodochenko

unread,
Dec 17, 2014, 2:29:15 PM12/17/14
to mat...@googlegroups.com
Hi everyone,

I encounter a bug while compiling MathGL with pthread enabled. The problem looks rather compiler-independent (holds on gcc and clang) and version-independent (from 3.1 to the latest svn checkout). After library being succesfully installed by make the following problem occcurs. It holds in all previously working code. I attach gdb output below.

mgl_glut_example: ../nptl/pthread_mutex_lock.c:80: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
Аварийный останов
root@dv7-deb:/home/user/src/mathgl/mathgl-code/examples# gdb ./mgl_glut_example
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/user/src/mathgl/mathgl-code/examples/mgl_glut_example...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/user/src/mathgl/mathgl-code/examples/mgl_glut_example
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff32be700 (LWP 13935)]
[New Thread 0x7ffff2abd700 (LWP 13936)]
[New Thread 0x7ffff22bc700 (LWP 13937)]
You may specify argument '1', '2', '3' or 'd' for viewing examples of 1d, 2d, 3d or dual plotting
mgl_glut_example: ../nptl/pthread_mutex_lock.c:80: __pthread_mutex_lock: Assertion `
mutex->__data.__owner == 0' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff4ded107 in raise () from /lib/x86_64-linux-gnu/libc.so.6


Введите код...


mathgl....@gmail.com

unread,
Dec 18, 2014, 4:11:21 PM12/18/14
to mat...@googlegroups.com
Dear Vasiliy,

Thank you for the bug. It look as a conflict of OpenMP+pthread usage. I'll try to fix it. However, usually only one of this features (OpenMP or pthread) is enough.

--
You received this message because you are subscribed to the Google Groups "MathGL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathgl+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Kind regards,
Alexey Balakin

mathgl....@gmail.com

unread,
Jan 19, 2015, 3:19:38 PM1/19/15
to mat...@googlegroups.com
Dear Vasiliy,

Sorry for delay with answer. This is bug at configuring stage. It is not possible to use pthread and openmp simultaneously due to conflict of mutex objects. So, fix it in cmake files. Thank you.
Reply all
Reply to author
Forward
0 new messages