[Xcb] xcb 1.1 dead lock

Martin Ebourne lists at ebourne.me.uk
Sat Dec 22 13:15:13 PST 2007


On Sat Dec 15 Jamey Sharp jamey at minilop.net  wrote:
> On 12/13/07, Todd Goyen <tgoyen at swri.org> wrote:
> > I have seen a dead lock with the following backtraces. The program
> > uses QT-4.3.3 and calls XInitThreads before anything else is
> > performed. The threads are used with the nVidia driver to  separate
> > OpenGL contexts and keep them synced to VBlank. In this case there
> > were 24 threads 11 of which are OpenGL rendering threads, 1 is the
> > GUI, and 12 are timers. It appears as though XTranslateCoordinates in
> > the main GUI thread caused the deadlock. Any ideas would be helpful.
> 
> Augh. I believe I've seen this same deadlock using `ico -threads 3` or
> higher, but I haven't been able to work out the cause, let alone a fix.
> Since an application that matters is encountering it, I guess we'd
> better hurry up and fix it, eh? sigh. If you have experience debugging
> deadlocks, I believe the problem is mostly confined to process_responses
> in xcb_io.c, and any insight you can provide would be appreciated.
> 
> Thanks for the complete backtrace. We'll let you know when there's a fix
> you can test; in the meantime, is this application one that we can get a
> copy of?

It looks like I'm also getting this deadlock, with current ekiga svn. I
was originally getting this deadlock:
http://mail.gnome.org/archives/ekiga-devel-list/2007-December/msg00030.html
which seems to have been fixed by this:
http://lists.freedesktop.org/archives/xcb-commit/2007-October/000546.html

Now I have the backtrace below where XTranslateCoordinates seems to be
the issue. Any suggestions on how to nail this one?

Cheers,

Martin.

Thread 17 (Thread 1107872080 (LWP 12568)):
#0  0x00000037606cddf2 in select () from /lib64/libc.so.6
#1  0x00002aaaaac5bbd4 in PThread::PXBlockOnIO (this=0x2aaab8000c80, handle=57, type=0, timeout=@0x4208b0b0)
    at tlibthrd.cxx:896
#2  0x00002aaaaac4f7ea in PChannel::PXSetIOBlock (this=0x4208b060, type=PChannel::PXReadBlock, timeout=@0x4208b0b0)
    at channel.cxx:119
#3  0x00002aaaaac4bb72 in PSocket::os_recvfrom (this=0x3a, buf=0xe5b1d0, len=1000, flags=-1, addr=0x4208ab20, 
    addrlen=0x7fffffff) at socket.cxx:547
#4  0x00002aaaaac6311b in PIPDatagramSocket::ReadFrom (this=0x4208b060, buf=0xe5b1d0, len=1000, addr=@0x4208b298, 
    port=@0x4208b2b8) at ../common/sockets.cxx:2294
#5  0x00002aaaaac631b3 in PUDPSocket::Read (this=0x3a, buf=0xe0fe30, len=11617888) at ../common/sockets.cxx:2655
#6  0x00002aaaaac238b4 in PSTUNMessage::Read (this=0x4208af10, socket=@0x4208b060) at ../../ptclib/pstun.cxx:388
#7  0x00002aaaaac23912 in PSTUNMessage::Poll (this=0x4208af10, socket=@0x4208b060, request=@0x4208af40, pollRetries=5)
    at ../../ptclib/pstun.cxx:405
#8  0x00002aaaaac20981 in PSTUNClient::GetNatType (this=0xd92000, force=<value optimized out>)
    at ../../ptclib/pstun.cxx:483
#9  0x00002aaaab361cb6 in OpalManager::SetSTUNServer (this=0x8b3530, server=@0x2aaab8000d28)
    at /usr/src/debug/opal-3.1.0/src/opal/manager.cxx:1063
#10 0x00000000005202bf in GMStunClient::Main (this=0x2aaab8000c80) at clients/stun.cpp:341
#11 0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#12 0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#13 0x00000037606d4b0d in clone () from /lib64/libc.so.6
Current language:  auto; currently c

Thread 16 (Thread 1107605840 (LWP 12567)):
#0  0x000000376160a8f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aaaaac57a1f in PSyncPoint::Wait (this=0x2aaab8000db8) at tlibthrd.cxx:1416
#2  0x00000000005208cd in GMStunClient (this=0x2aaab8000c80, display_progress_=false, display_config_dialog_=false, 
    wait_=<value optimized out>, parent_window=0x0, endpoint=<value optimized out>) at clients/stun.cpp:253
#3  0x00000000005122cd in GMManager::CreateSTUNClient (this=0x8b3530, display_progress=false, 
    display_config_dialog=false, wait=true, parent=0x0) at endpoints/manager.cpp:665
#4  0x000000000050e03d in GMAccountsEndpoint::Main (this=0xd43150) at endpoints/accountshandler.cpp:98
#5  0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#6  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#7  0x00000037606d4b0d in clone () from /lib64/libc.so.6
Current language:  auto; currently asm

Thread 15 (Thread 1107339600 (LWP 12566)):
#0  0x00000037606cddf2 in select () from /lib64/libc.so.6
#1  0x00002aaaaac4d7a5 in PSocket::Select (read=<value optimized out>, write=<value optimized out>, 
---Type <return> to continue, or q <return> to quit---
    except=<value optimized out>, timeout=@0x42009fd0) at socket.cxx:319
#2  0x00002aaaaac6167c in PSocket::Select (read=@0x42009d80, timeout=@0x42009fd0) at ../common/sockets.cxx:1031
#3  0x00002aaaaac68a61 in PMonitoredSockets::ReadFromSocket (this=0xd40590, info=@0xd40cd8, buf=0xd42010, len=2000, 
    addr=@0x42009eb0, port=@0x42009eae, lastReadCount=@0x42009ea8, timeout=@0x42009fd0) at ../../ptclib/psockbun.cxx:564
#4  0x00002aaaaac68d77 in PSingleMonitoredSocket::ReadFromBundle (this=0xd40590, buf=0xd42010, len=2000, 
    addr=@0x42009eb0, port=@0x42009eae, iface=@0x42009e50, lastReadCount=@0x42009ea8, timeout=@0x42009fd0)
    at ../../ptclib/psockbun.cxx:1084
#5  0x00002aaaab39e213 in OpalListenerUDP::Accept (this=0xd3bce0, timeout=@0x42009fd0)
    at /usr/src/debug/opal-3.1.0/src/opal/transports.cxx:757
#6  0x00002aaaab39a95c in OpalListener::ListenForConnections (this=0xd3bce0, thread=@0xd419e0)
    at /usr/src/debug/opal-3.1.0/src/opal/transports.cxx:416
#7  0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#8  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#9  0x00000037606d4b0d in clone () from /lib64/libc.so.6
Current language:  auto; currently c

Thread 14 (Thread 1107073360 (LWP 12565)):
#0  0x000000376160ab7d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aaaaac5791f in PSyncPoint::Wait (this=0x2aaaaaf12c08, waitTime=@0x2aaaaaf12bb8) at tlibthrd.cxx:1434
#2  0x00002aaaaac69467 in PInterfaceMonitor::UpdateThreadMain (this=0x2aaaaaf12b80) at ../../ptclib/psockbun.cxx:236
#3  0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#4  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#5  0x00000037606d4b0d in clone () from /lib64/libc.so.6
Current language:  auto; currently asm

Thread 13 (Thread 1106807120 (LWP 12564)):
#0  0x00000037606cddf2 in select () from /lib64/libc.so.6
#1  0x00002aaaaac5bbd4 in PThread::PXBlockOnIO (this=0xd3d160, handle=43, type=2, timeout=@0x41f87d30)
    at tlibthrd.cxx:896
#2  0x00002aaaaac4f7ea in PChannel::PXSetIOBlock (this=0xd32f58, type=PChannel::PXAcceptBlock, timeout=@0x41f87d30)
    at channel.cxx:119
#3  0x00002aaaaac4b74e in PSocket::os_accept (this=0xd3fb00, listener=@0xd32f58, addr=0x41f87d90, size=0x41f87d8c)
    at socket.cxx:197
#4  0x00002aaaaac63248 in PTCPSocket::Accept (this=0xd3fb00, socket=@0xd32f58) at ../common/sockets.cxx:2231
#5  0x00002aaaab39b59a in OpalListenerTCP::Accept (this=0xd32f00, timeout=<value optimized out>)
    at /usr/src/debug/opal-3.1.0/src/opal/transports.cxx:661
#6  0x00002aaaab39a95c in OpalListener::ListenForConnections (this=0xd32f00, thread=@0xd3d160)
    at /usr/src/debug/opal-3.1.0/src/opal/transports.cxx:416
#7  0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#8  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#9  0x00000037606d4b0d in clone () from /lib64/libc.so.6
Current language:  auto; currently c
---Type <return> to continue, or q <return> to quit---

Thread 12 (Thread 1074538832 (LWP 12563)):
#0  0x000000376160cef4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x0000003761608915 in _L_lock_102 () from /lib64/libpthread.so.0
#2  0x0000003761608390 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000004ffbd8 in gnomemeeting_threads_enter () at gui/misc.cpp:68
#4  0x0000000000506581 in PVideoInputDevice_Picture::GetFrameDataNoDelay (this=0xcd8640, 
    frame=0x2aaab5433010 '� <repeats 200 times>..., i=<value optimized out>) at devices/fakevideoinput.cpp:270
#5  0x0000000000506505 in PVideoInputDevice_Picture::GetFrameData (this=0xcd8640, 
    a=0x2aaab5433010 '� <repeats 200 times>..., i=0x400c1f6c) at devices/fakevideoinput.cpp:238
#6  0x00002aaaaabf6d02 in PVideoInputDevice::GetFrame (this=0xcd8640, frame=@0x400c1fa0) at ../common/videoio.cxx:1184
#7  0x000000000050891a in GMVideoGrabber::Main (this=0xcd9600) at devices/videoinput.cpp:124
#8  0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#9  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#10 0x00000037606d4b0d in clone () from /lib64/libc.so.6
Current language:  auto; currently asm

Thread 11 (Thread 1075071312 (LWP 12562)):
#0  0x000000376160a8f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000303904aa6a in PArrayObjects::Insert () at ../common/collect.cxx:153
#2  0x000000303904b0b8 in _XReply () from /usr/lib64/libX11.so.6
#3  0x000000303fa028cd in XvQueryExtension () from /usr/lib64/libXv.so.1
#4  0x000000000052be32 in XVWindow::Init (this=0xe22250, dp=<value optimized out>, rootWindow=<value optimized out>, 
    gc=0xcc2980, x=12, y=27, windowWidth=352, windowHeight=288, imageWidth=352, imageHeight=288) at xvwindow.cpp:137
#5  0x000000000050c04f in GMVideoDisplay_X::SetupFrameDisplay (this=0xd28e50, display=LOCAL_VIDEO, lf_width=352, 
    lf_height=288, rf_width=0, rf_height=0, zoom=100) at devices/videodisplay_x.cpp:144
#6  0x0000000000509218 in GMVideoDisplay_embedded::Redraw (this=0xd28e50) at devices/videodisplay.cpp:294
#7  0x00000000005098af in GMVideoDisplay_embedded::Main (this=0xd28e50) at devices/videodisplay.cpp:153
#8  0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#9  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#10 0x00000037606d4b0d in clone () from /lib64/libc.so.6

Thread 8 (Thread 1085561168 (LWP 12553)):
#0  0x00000037606cbd66 in __poll (fds=0x8d3480, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x0000003039831fee in g_main_context_iterate (context=0x8d7ca0, block=1, dispatch=1, self=<value optimized out>)
    at gmain.c:2996
#2  0x00000030398324aa in IA__g_main_loop_run (loop=0x8d4460) at gmain.c:2898
#3  0x00000030452181fd in startup_mainloop (arg=<value optimized out>) at e-book.c:3767
#4  0x0000003039850724 in g_thread_create_proxy (data=0x8d3080) at gthread.c:635
#5  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#6  0x00000037606d4b0d in clone () from /lib64/libc.so.6
Current language:  auto; currently c

Thread 7 (Thread 1074805072 (LWP 12551)):
#0  0x00000037606cbd66 in __poll (fds=0x8d0bc0, nfds=9, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x0000003039831fee in g_main_context_iterate (context=0x8b6a50, block=1, dispatch=1, self=<value optimized out>)
    at gmain.c:2996
#2  0x00000030398324aa in IA__g_main_loop_run (loop=0x8b8ae0) at gmain.c:2898
#3  0x000000303f6463b0 in PArrayObjects::Insert () at ../common/collect.cxx:153
#4  0x0000003039850724 in g_thread_create_proxy (data=0x8b73c0) at gthread.c:635
#5  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#6  0x00000037606d4b0d in clone () from /lib64/libc.so.6

Thread 4 (Thread 1074272592 (LWP 12549)):
#0  0x000000376160ab7d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aaaaac5791f in PSyncPoint::Wait (this=0x81b628, waitTime=@0x40080ff0) at tlibthrd.cxx:1434
#2  0x00002aaaaac59d85 in PHouseKeepingThread::Main (this=0x8b6060) at tlibthrd.cxx:125
#3  0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#4  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#5  0x00000037606d4b0d in clone () from /lib64/libc.so.6
Current language:  auto; currently asm

Thread 3 (Thread 1074006352 (LWP 12548)):
#0  0x000000376160ab7d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aaaaac5791f in PSyncPoint::Wait (this=0x8b3e50, waitTime=@0x4003ffe0) at tlibthrd.cxx:1434
#2  0x00002aaaab360613 in OpalManager::GarbageMain (this=0x8b3530) at /usr/src/debug/opal-3.1.0/src/opal/manager.cxx:1262
#3  0x00002aaaaac5847e in PThread::PX_ThreadStart (arg=<value optimized out>) at tlibthrd.cxx:804
#4  0x0000003761606407 in start_thread () from /lib64/libpthread.so.0
#5  0x00000037606d4b0d in clone () from /lib64/libc.so.6

Thread 2 (Thread 46912519178016 (LWP 12538)):
#0  0x000000376160a8f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000303903122d in PArrayObjects::Insert () at ../common/collect.cxx:153
#2  0x000000303904a1a5 in PArrayObjects::Insert () at ../common/collect.cxx:153
#3  0x000000303904b0a0 in _XReply () from /usr/lib64/libX11.so.6
#4  0x0000003039040d34 in XTranslateCoordinates () from /usr/lib64/libX11.so.6
#5  0x000000303c44b100 in gdk_event_translate (display=0x861050, event=0xe12520, xevent=0x7fffec7fdb20, return_exposes=0)
    at gdkevents-x11.c:1867
#6  0x000000303c44b2f2 in _gdk_events_queue (display=0x861050) at gdkevents-x11.c:2285
#7  0x000000303c44b7fe in gdk_event_dispatch (source=<value optimized out>, callback=0x80, user_data=0x9)
    at gdkevents-x11.c:2345
---Type <return> to continue, or q <return> to quit---
#8  0x000000303982eea3 in IA__g_main_context_dispatch (context=0x836940) at gmain.c:2061
#9  0x000000303983219d in g_main_context_iterate (context=0x836940, block=1, dispatch=1, self=<value optimized out>)
    at gmain.c:2694
#10 0x00000030398324aa in IA__g_main_loop_run (loop=0xe1e930) at gmain.c:2898
#11 0x000000303dd5b0c3 in IA__gtk_main () at gtkmain.c:1146
#12 0x00000000004f6c89 in main (argc=1, argv=<value optimized out>, envp=<value optimized out>) at gui/main.cpp:4413

Thread 1 (LWP 12538):
#0  0x000000376160a8f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000303903122d in PArrayObjects::Insert () at ../common/collect.cxx:153
#2  0x000000303904a1a5 in PArrayObjects::Insert () at ../common/collect.cxx:153
#3  0x000000303904b0a0 in _XReply () from /usr/lib64/libX11.so.6
#4  0x0000003039040d34 in XTranslateCoordinates () from /usr/lib64/libX11.so.6
#5  0x000000303c44b100 in gdk_event_translate (display=0x861050, event=0xe12520, xevent=0x7fffec7fdb20, return_exposes=0)
    at gdkevents-x11.c:1867
#6  0x000000303c44b2f2 in _gdk_events_queue (display=0x861050) at gdkevents-x11.c:2285
#7  0x000000303c44b7fe in gdk_event_dispatch (source=<value optimized out>, callback=0x80, user_data=0x9)
    at gdkevents-x11.c:2345
#8  0x000000303982eea3 in IA__g_main_context_dispatch (context=0x836940) at gmain.c:2061
#9  0x000000303983219d in g_main_context_iterate (context=0x836940, block=1, dispatch=1, self=<value optimized out>)
    at gmain.c:2694
#10 0x00000030398324aa in IA__g_main_loop_run (loop=0xe1e930) at gmain.c:2898
#11 0x000000303dd5b0c3 in IA__gtk_main () at gtkmain.c:1146
#12 0x00000000004f6c89 in main (argc=1, argv=<value optimized out>, envp=<value optimized out>) at gui/main.cpp:4413
#0  0x000000376160a8f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0




More information about the Xcb mailing list