Bug 494091 - libxcb's generate_xid() has a bug that causes clients to fail with BadIDChoice
Summary: libxcb's generate_xid() has a bug that causes clients to fail with BadIDChoice
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libxcb
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-04 04:42 UTC by D. Hugh Redelmeier
Modified: 2009-05-09 04:21 UTC (History)
3 users (show)

Fixed In Version: 1.1.91-6.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-09 04:21:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
The patch I'm testing (3.07 KB, patch)
2009-04-17 17:53 UTC, Derek Atkins
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 20254 0 None None None Never

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
  http://bugs.freedesktop.org/show_bug.cgi?id=20254
  https://bugzilla.mozilla.org/show_bug.cgi?id=458092

There are a couple of Fedora bz entries that seem to be instances of this bug (but perhaps other ones are mixed in):
  https://bugzilla.redhat.com/show_bug.cgi?id=486675
  https://bugzilla.redhat.com/show_bug.cgi?id=458657

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.edu>
Date:   Tue Mar 24 16:24:04 2009 -0700

    kludgily hand-merged xid fixes

    Signed-off-by: Bart Massey <bart.edu>
    Signed-off-by: Julien Danjou <julien>

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:
https://bugs.launchpad.net/bugs/220628

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.
http://admin.fedoraproject.org/updates/libxcb-1.1.91-6.fc10

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.


Note You need to log in before you can comment on or make changes to this bug.