Bug 494091

Summary: libxcb's generate_xid() has a bug that causes clients to fail with BadIDChoice
Product: [Fedora] Fedora Reporter: D. Hugh Redelmeier <hugh>
Component: libxcbAssignee: Adam Jackson <ajax>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: ajax, hugh, warlord
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 1.1.91-6.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-09 04:21:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
The patch I'm testing none

Description D. Hugh Redelmeier 2009-04-04 04:42:01 UTC
Description of problem:

Firefox and other applications fail due to a libxcb bug.  Firefox will print to stdout or stderr the following message and immediately exit.  Most users don't notice because stdout and stderr are discarded normally.  The message looks like this:
The program 'firefox' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadIDChoice (invalid resource ID chosen for this connection)'.
  (Details: serial 293520194 error_code 14 request_code 148 minor_code 4)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Version-Release number of selected component (if applicable):
at least libxcb-1.1.91-5.fc10.x86_64

How reproducible:
For me, it takes a few days of a single firefox instance with lots of windows and tabs.

Additional info:

Described and fixed upstream (not yet in a release).  See

There are a couple of Fedora bz entries that seem to be instances of this bug (but perhaps other ones are mixed in):

Comment 1 Derek Atkins 2009-04-10 13:07:35 UTC
Looks like this has been fixed upstream.

From http://bugs.freedesktop.org/show_bug.cgi?id=20254 :

commit beccb0be15f5699c942a0af33307d9e4bf797e2a
Author: Bart Massey <bart@cs.pdx.edu>
Date:   Tue Mar 24 16:24:04 2009 -0700

    kludgily hand-merged xid fixes

    Signed-off-by: Bart Massey <bart@cs.pdx.edu>
    Signed-off-by: Julien Danjou <julien@danjou.info>

Any chance you could apply this patch to libxcb in F10..  pretty please with sugar on top?

I'll gladly test this for you!

Comment 2 Derek Atkins 2009-04-17 17:53:38 UTC
Created attachment 340056 [details]
The patch I'm testing

This is the patch I'm testing against.  I rebuilt the libxcb RPM with this patch.  So far it seems to be working but I'll know more in a few days, whether firefox dies or not.

Comment 3 Derek Atkins 2009-04-21 17:32:38 UTC
FYI, I've been running with the patch all weekend and haven't seen a single X Protocol Error.  So I think this patch definitely fixes this problem for me.

Comment 4 D. Hugh Redelmeier 2009-04-21 18:01:57 UTC
Ubuntu is adopting this fix:

Comment 5 Fedora Update System 2009-04-21 19:22:42 UTC
libxcb-1.1.91-6.fc10 has been submitted as an update for Fedora 10.

Comment 6 Fedora Update System 2009-04-22 01:11:07 UTC
libxcb-1.1.91-6.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libxcb'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-3865

Comment 7 Fedora Update System 2009-05-09 04:21:47 UTC
libxcb-1.1.91-6.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.