NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Porting Corosync/Pacemaker - Help needed with gdb
Now this is really strange. I added a simple printf before the line where pthread_mutex_lock() is called:
static int ipc_thread_active (void *conn)
{
....
printf("Hi");
pthread_mutex_lock (&conn_info->mutex);
...
}
This leads to the following crash:
Core was generated by `corosync'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f7ff68078e9 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
(gdb) bt
#0 0x00007f7ff68078e9 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
#1 0x00007f7ff60ecfe7 in __flockfile_internal () from /usr/lib/libc.so.12
#2 0x00007f7ff60d0e9a in vfprintf () from /usr/lib/libc.so.12
#3 0x00007f7ff60cbeb6 in printf () from /usr/lib/libc.so.12
#4 0x00007f7ff7002e6a in ipc_thread_active (conn=0x7f7ff7391000) at coroipcs.c:465
#5 pthread_ipc_consumer (conn=0x7f7ff7391000) at coroipcs.c:675
#6 0x00007f7ff6809d75 in ?? () from /usr/lib/libpthread.so.1
#7 0x00007f7ff60759f0 in ___lwp_park50 () from /usr/lib/libc.so.12
It seems that libc uses some kind of internal locking for printf - which also crashes in pthread_mutex_lock().
Can somebody explain that to me?
Home |
Main Index |
Thread Index |
Old Index