[Xcb] xcb_wait_for_reply deadlocking with xcb_property_changed call

Nicholas Allen nick.allen at onlinehome.de
Tue Mar 30 13:10:01 PDT 2010


Jamey Sharp wrote:
> Julien, you re-wrote libxcb-property; does anything about
> https://bugs.freedesktop.org/show_bug.cgi?id=27368 sound familiar, or
> do you have any advice for Nick? I seem to recall some discussion of
> getting rid of the property library entirely; is it still useful?
>
> Nick, I'm not sure you want to be handling events from multiple
> threads. 
I'm not - at least not that I know of! One thread reads events and posts
events into another queue which is processed by another thread in Java
to take the appropriate action but only one thread has the event
dispatch loop and reads events.
> XCB should allow you to call xcb_wait_for_event from any
> number of threads simultaneously, but I'd argue it isn't a good idea,
>   
I only call that from one thread.
> because then you have no idea what order the events arrived in. Also,
> I don't see any locking in libxcb-property, so while it looks like
> calling xcb_property_changed from multiple threads is probably safe, I
> wouldn't bet on it.
>   
I also only call it from one thread - the native event handling loop.
> I can't make any sense of the xtrace, because it's trimmed too far.
> I'd like to see at least as many GetProperty requests as you have
> threads blocked in libxcb-property. Which, again, should probably not
> be more than 1. :-) Perhaps if you gzip the trace it will fit in 1MB?
>
> I'm also hopeful that you can get stack traces with debug symbols. I
> don't know why installing the Ubuntu -dbg packages didn't help.
>   
Yes I'll try that again tomorrow. I have quite a heavy workload at the
moment so didn't get a chance to try that today but can hopefully get
that to you soon...

Cheers,

Nick


More information about the Xcb mailing list