[Xcb] [Bug 29599] hang in xcb_request_check() due to expecting a reply on void request

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 24 09:48:51 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=29599

--- Comment #7 from Jamey Sharp <jamey at minilop.net> 2010-08-24 09:48:50 PDT ---
(In reply to comment #4)
> That still hangs in my test, in the backtrace looking at the connection struct,
> gdb shows
>  request_expected = 17161, request_read = 17160, request_completed = 17159
> 
> At this point we are blocking for 17160 and stuck.

I assume you mean that cookie.sequence was 17160.

> A theory on this is that request_expected was < 17160 going into
> xcb_request_check, so we didn't GetInputFocus.

The condition was cookie.sequence > request_expected, so you've stated a case
where it *would* sync, unless cookie.sequence wasn't also greater than
request_completed at the time.

> Then we had sent some other void
> request, which resulted in an event with sequence 17161 while we were spinning
> in xcb_wait_for_reply(). This is too late to trigger the GetInputFocus.

That theory can't explain the sequence numbers you observed: If you got an
event with sequence 17161, then request_read would be 17161 and
request_completed would be 17160. Instead I think you must have gotten an event
or reply (not an error) for 17160, and also sent a non-void request for 17161.
Which raises the question of how you could be blocked indefinitely...

Perhaps that non-void request didn't get flushed? Maybe xcb_request_check needs
to flush when it doesn't sync?

Also: Is your test app making requests from multiple threads? That's supposed
to Just Work, but it would be important to know.

BTW, I want to think about your proposed API changes after this bug is sorted
out; but I'm ignoring them until then. :-)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Xcb mailing list