[Xcb] [PATCH] Handle EAGAIN errno from poll(2) or select(2)

Jeremy Huddleston Sequoia jeremyhu at apple.com
Sun May 29 08:04:20 UTC 2016


> On May 29, 2016, at 00:39, Uli Schlachter <psychon at znc.in> wrote:
> 
> Am 29.05.2016 um 08:58 schrieb Jeremy Huddleston Sequoia:
>> Resurrecting this thread as it looks like there actually is a real-world case of this returning EAGAIN ... maybe...  I'm not convinced that there isn't something else going on here, but I wanted to connect the dots:
>> 
>> https://bugs.freedesktop.org/show_bug.cgi?id=92652
> 
> That doesn't sound like resource exhaustion at all (and retrying a failed
> xcb_wait_for_event() is pointless, because the connection will be in an error
> state after the failure and the following attempts immediately return a failure).

Yeah, I just wanted to connect the two threads since I found myself having some deja vu reading through that code.  I'd certainly not resource exhaustion, but we are getting back EAGAIN which is surprising.  I want to figure out why that is being returned instead of something more appropriate.

> Given the easy reproducability of this, I'd use the Mac equivalent of strace to
> figure out what exactly is going on. select()/poll() reproducability failing
> sounds more like the WM using KillClient to have the server close the
> connection, but since the test program has WM_DELETE_WINDOW...

Yeah, I ended up going down that same path by watching the server side:

(lldb) bt
* thread #3: tid = 0x20aab8, function: CloseDownConnection , stop reason = breakpoint 5.1
  * frame #0: 0x0000000101f44780 X11.bin`CloseDownConnection
    frame #1: 0x0000000101e1f804 X11.bin`CloseDownClient + 484
    frame #2: 0x0000000101e3a84a X11.bin`ProcKillClient + 314
    frame #3: 0x0000000101e1ebf4 X11.bin`Dispatch + 1172

so that seems like what's going on.

> Cheers,
> Uli
> -- 
> "Do you know that books smell like nutmeg or some spice from a foreign land?"
>                                                  -- Faber in Fahrenheit 451
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/xcb

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4465 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20160529/8f025669/attachment.bin>


More information about the Xcb mailing list