On Tue, Jun 09, 2009 at 04:48:06PM +0300, Marius Gedminas wrote: > On Wed, May 13, 2009 at 06:25:05PM +0300, Marius Gedminas wrote: > > On Wed, May 13, 2009 at 10:11:42AM +1000, Peter Hutterer wrote: > > > On Tue, May 12, 2009 at 04:35:51PM +0300, Marius Gedminas wrote: > > > > Are there any debugging facilities for finding out which X client has > > > > the grab? > > > > > > > > I once spent an hour killing all processes one by one until I found the > > > > one responsible (gnome-settings-daemon): > > > > http://mg.pov.lt/blog/xorg-snafu.html > > > > > > if you have a second machine you can ssh+gdb in and look at > > > CLIENT_BITS(inputInfo.pointer->deviceGrab.grab->resource). this should > > > give > > > you the client mask for the grab, and with xwininfo -root -children -all > > > you > > > can then match that up with a running client (that's from memory, no > > > guarantees) > > > > Thank you, this is more or less what I wanted to know in case the bug > > strikes again (probably unlikely). > > The Bug took over a coworker's machine. After killing a couple of > processes at random and failing to find the one that had the mouse grab, > I installed Ubuntu's debug packages and ran > > sudo gdb `which Xorg` `pidof X` > (gdb) printf "%x", inputInfo.pointer->deviceGrab.grab->resource > > (gdb doesn't know about CLIENT_BITS). > > I got something like 0x2600000, and found a bunch of resources belonging > to xchat-gnome that had IDs of the form 0x260xxxx in xwininfo output. > > Unfortunately, killing xchat-gnome did not release the grab --- instead, > reconnecting with gdb I got a different resource ID (one belonging to > Skype). Killing Skype repeated the story: different resource ID > (Tomboy this time). I gave up and told my coworker to restart X.
fwiw, we've had fun with a bug like this on a fedora 10 box and the culprit was metacity. so far, we don't know whether it's metacity misbehaving or the server dropping a ungrab request. btw. the resource ID debugging works for active grabs, for passive grabs it's a bit more complicated. Cheers, Peter _______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
