[Xcb] Invalid XIDs

Nathaniel Smith njs at pobox.com
Tue Feb 10 16:39:35 PST 2009


On Sat, Jan 24, 2009 at 10:47 PM, Nathaniel Smith <njs at pobox.com> wrote:
> Anyway, since the crash is so rare (occurs maybe once a week,
> unpredictably), it's very hard to tell whether a patch works or not by
> trying it.  ("It's been a week without a crash... so did we fix it or
> just get lucky?").  So I'm going to instrument the range resetting
> code instead, and the next time the crash happens we'll know for sure
> whether it was proceeded by a count==1 reply.

Finally caught the bastard!

(Context refresher from two+ weeks ago: Firefox crashes irregularly --
their bug https://bugzilla.mozilla.org/show_bug.cgi?id=458092 -- maybe
or maybe not due to a bug in xcb_generate_id's handling of small XID
ranges.)

---------
[...]

Breakpoint 2, xcb_generate_id (c=0x1450640) at xcb_xid.c:51
51	        c->xid.last = range->start_id;
$556 = {response_type = 1 '\001', pad0 = 0 '\0', sequence = 29274,
length = 0, start_id = 41385232, count = 8}

Breakpoint 2, xcb_generate_id (c=0x1450640) at xcb_xid.c:51
51	        c->xid.last = range->start_id;
$557 = {response_type = 1 '\001', pad0 = 0 '\0', sequence = 29325,
length = 0, start_id = 41385218, count = 3}

Breakpoint 2, xcb_generate_id (c=0x1450640) at xcb_xid.c:51
51	        c->xid.last = range->start_id;
$558 = {response_type = 1 '\001', pad0 = 0 '\0', sequence = 29340,
length = 0, start_id = 41385215, count = 2}

Breakpoint 2, xcb_generate_id (c=0x1450640) at xcb_xid.c:51
51	        c->xid.last = range->start_id;
$559 = {response_type = 1 '\001', pad0 = 0 '\0', sequence = 29345,
length = 0, start_id = 41385235, count = 1}

Breakpoint 1, gdk_x_error (display=0x144fc00, error=0x7ffff91140d0) at
/build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkmain-x11.c:613

---------

So the BadIDChoice error is occurring immediately after (what appears
to be) the first time the server sends back a reply->count of 1. I
think this confirms that you found the right problem, Bart.

Anything more I can do to help? When roughly would a release with a
fix be expected, for reference?

-- Nathaniel


More information about the Xcb mailing list