Bug 23521 - XQueryPointer locks the display while it's executing
Summary: XQueryPointer locks the display while it's executing
Status: RESOLVED NOTOURBUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-25 23:46 UTC by Dima Ryazanov
Modified: 2009-09-02 21:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Dima Ryazanov 2009-08-25 23:46:21 UTC
I'm using Kubuntu 9.04; not sure which version of X it has. The version of xorg-server itself is 1.6.

If an application stops in the middle of a call to XQueryPointer - e.g., hits a breakpoint in gdb - the whole desktop freezes until the application is resumed. That also makes it difficult to resume the application.
It looks like XQueryPointer calls LockDisplay, so if another application - such as the window manager - makes a call to XQueryPointer, the call won't return until the first application finishes executing it.

Steps to reproduce:
1. Start Firefox
2. Attach gdb to it
3. Set a breakpoint in XQueryService.
4. When the breakpoint gets hit, set another one at xcb_wait_for_reply
5. When the second breakpoint is hit, the desktop will be frozen

Another way, without gdb:
1. Start Firefox
2. Start "ksysguard"
3. Right-click the firefox process, and choose "Monitor Input&Output".
4. Go back to using Firefox, wait for about a minute, and the desktop will become frozen.
Comment 1 Peter Hutterer 2009-09-02 19:03:00 UTC
LockDisplay is a library-internal function and only affects that client.

can you please try to replicate this issue using xeyes. it's about as simple an apps as you get and it uses XQueryPointer too.
Comment 2 Dima Ryazanov 2009-09-02 19:12:07 UTC
Weird... I cannot reproduce it in xclock, only in Firefox. I'll see if I can come up with a simple testcase.

(Btw, I made a typo in step 3 - it's XQueryPointer, not XQueryService)
Comment 3 Peter Hutterer 2009-09-02 21:23:53 UTC
xclock? or xeyes?

If you can't reproduce the issue with xeyes, please close as NOTOURBUG and report with firefox.
Comment 4 Dima Ryazanov 2009-09-02 21:46:29 UTC
Oops, yes, xeyes.

Ok, I'll open a Firefox bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.