[PATCH xf86-input-synaptics] Drain XRecord connection of any events after handling replies

Chase Douglas chase.douglas at canonical.com
Tue Apr 19 09:41:12 PDT 2011


On 04/18/2011 12:01 AM, Peter Hutterer wrote:
> On Fri, Apr 15, 2011 at 03:29:57PM -0400, Chase Douglas wrote:
>> If the X server sends an event to the XRecord connection the event
>> will never be handled. This will cause the event queue to fill up in
>> Xlib and lead to syndaemon running away at 100% cpu usage.
>>
>> This change drains any events from the connection. It's not a fix for
>> the underlying bug in the server or Xlib, but it does paper over the
>> issue for now.
>>
>> https://bugs.launchpad.net/bugs/754470
>> http://bugs.freedesktop.org/show_bug.cgi?id=31921
>>
>> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
>> ---
>> I'm offering this up as a work around for whatever real bug exists. It
>> probably should not be committed upstream though.
>  
> fair call, though I'd appreciate it if you could figure out why the events
> are sent on the record connection (and if that is indeed a bug or just
> unhandled behaviour on the syndaemon side).

I'd love to figure out the real bug, but I don't have any machines that
reproduce this behavior. I'm not sure how much I can do to help debug
the issue for others remotely.

I will note that the two people who have reported the bug and performed
further digging both found that the stray events are X core UngrabKey
events IIRC. I don't think there should be any events at all, so I think
this issue lies outside of syndaemon. That probably means it's in the X
server, though it could be in Xlib.

-- Chase


More information about the xorg-devel mailing list