Multithreding...
Vaillant Etienne
evaillant at anevia.com
Mon Feb 26 04:38:18 PST 2007
Hi all,
in my application, I have many threads and at a moment two thread work
on the same connection :
- the first enter in "dbus_connection_pop_message"
- and the second in "dbus_connection_send"
but the first thread failed on "HAVE_LOCK_CHECK (connection);" and core.
With backtrace :
(gdb) thread 5
[Switching to thread 5 (process 23726)]#0 0xffffe410 in
__kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7abd01e in __lll_mutex_lock_wait () from
/lib/tls/i686/cmov/libpthread.so.0
#2 0xb7ab9673 in _L_mutex_lock_49 () from
/lib/tls/i686/cmov/libpthread.so.0
#3 0xb7abd131 in __lll_mutex_unlock_wake () from
/lib/tls/i686/cmov/libpthread.so.0
#4 0xb7ab9cd9 in pthread_mutex_unlock () from
/lib/tls/i686/cmov/libpthread.so.0
#5 0xb7c56be6 in pthread_mutex_lock () from /lib/tls/i686/cmov/libc.so.6
#6 0xb7fbaa08 in _dbus_pthread_mutex_lock (mutex=0x5cae) at
dbus-sysdeps-pthread.c:155
#7 0xb7fa7678 in _dbus_mutex_lock (mutex=0xb7abd131) at dbus-threads.c:148
#8 0xb7f88469 in _dbus_connection_acquire_dispatch
(connection=0x8062418) at dbus-connection.c:3739
#9 0xb7f8b3cc in dbus_connection_pop_message (connection=0x8062418) at
dbus-connection.c:3692
#10 0xb7eee020 in Anevia::Ipc::Server::DBusRegister::Process::execute
(this=0x805d2ec, conn=@0xb7022440, flags=25, watch=0x8062158) at
src/Server/DBusRegister.cc:680
#11 0xb7eefbdf in Anevia::Ipc::Server::DBusRegister::Process::run
(this=0x805d2ec) at src/Server/DBusRegister.cc:603
#12 0xb7f60ea0 in Anevia::Threads::Thread::threadFunction
(arg=0x805d2ec) at Threads/Thread.cxx:133
#13 0xb7ab7504 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#14 0xb7c4a51e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) thread 1
[Switching to thread 1 (process 23727)]#0 0xffffe410 in
__kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7ba6770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7ba7ef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7fba7d5 in _dbus_abort () at dbus-sysdeps.c:84
#4 0xb7faef87 in _dbus_real_assert (condition=0,
condition_text=0xb7fc12a8 "(connection)->have_connection_lock",
file=0xb7fc0db4 "dbus-connection.c", line=1811, func=0xb7fc2b80
"_dbus_connection_preallocate_send_unlocked")
at dbus-internals.c:813
#5 0xb7f86f4f in _dbus_connection_preallocate_send_unlocked
(connection=0x8062418) at dbus-connection.c:1811
#6 0xb7f8df14 in _dbus_connection_send_and_unlock
(connection=0x8062418, message=0x8062658, client_serial=0xb68213a0) at
dbus-connection.c:1974
#7 0xb7f8e086 in dbus_connection_send (connection=0x8062418,
message=0x8062658, serial=0xb68213a0) at dbus-connection.c:2972
#8 0xb7eecb77 in Anevia::Ipc::Server::WorkerThread::popCallback
(this=0x8063e38, event=0xb4700678) at src/Server/WorkerThread.cc:73
#9 0xb7ef5895 in
Anevia::MessageFifo<Anevia::Ipc::Server::WorkerThread>::IPushableMsg<Anevia::Ipc::Server::ProcessEvent>::execute
(this=0xb4701300, msgReceiver=0x8063e38)
at
/home/evaillant/root/libanevia/include/libanevia-1.0/Anevia/MessageFifo.hh:34
#10 0xb7eed831 in
Anevia::MessageFifo<Anevia::Ipc::Server::WorkerThread>::processNextMsg
(this=0x804fd20, msgReceiver=0x8063e38) at
/home/evaillant/root/libanevia/include/libanevia-1.0/Anevia/MessageFifo.hh:72
#11 0xb7eec7e1 in Anevia::Ipc::Server::WorkerThread::run
(this=0x8063e38) at src/Server/WorkerThread.cc:82
#12 0xb7f60ea0 in Anevia::Threads::Thread::threadFunction
(arg=0x8063e38) at Threads/Thread.cxx:133
#13 0xb7ab7504 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#14 0xb7c4a51e in clone () from /lib/tls/i686/cmov/libc.so.6
With :
- dbus 1.0.2
- gcc 4.1.2 (ubuntu version)
Thanks for any help.
Regards,
Etienne
More information about the dbus
mailing list