Applications that use libxcb 1.1 cannot open more than 1024 files

Bug #393509 reported by Andrew Pollock
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ia32-libs (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
libxcb (Ubuntu)
Fix Released
Undecided
Timo Aaltonen
Hardy
Won't Fix
Undecided
Unassigned

Bug Description

Hi,

We have some internal 32-bit applications that end up with a lot of files open. If they in turn call a program that links with libxcb, more often than not, that program segfaults.

This has been determined to be because libxcb uses select() and the man page for select() says this:

"An fd_set is a fixed size buffer. Executing FD_CLR() or FD_SET() with a value of fd that is negative or is equal to or larger than FD_SETSIZE will result in undefined behavior. Moreover, POSIX requires fd to be a valid file descriptor."

Later versions of libxcb address this by using poll()

I'm attaching the patch that we are using internally against libxcb 1.1-1.1

If you make this SRU, please also ensure that the 32-bit version in ia32-libs gets updated.

Revision history for this message
Andrew Pollock (apollock) wrote :
Revision history for this message
Andrew Pollock (apollock) wrote :

Assigning to Timo as discussed via email

Changed in libxcb (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

the xid bug is #220628

Changed in libxcb (Ubuntu Hardy):
status: New → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

closing for karmic

Changed in libxcb (Ubuntu):
status: New → Fix Released
Changed in ia32-libs (Ubuntu):
status: New → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Uploaded to hardy-proposed.

Changed in libxcb (Ubuntu Hardy):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted libxcb into hardy-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Anyone who could test the packages in hardy-proposed?

Revision history for this message
Andrew Pollock (apollock) wrote :

We've only been affected by the 32-bit version on a 64-bit system, and I can't see a fixed ia32-libs in hardy-proposed

Revision history for this message
Martin Pitt (pitti) wrote :

This proposed update has been in hardy-proposed for almost half a year without any positive feedback, and it was reported to cause a regression in bug 220628. Therefore it was removed from hardy-proposed again.

Changed in libxcb (Ubuntu Hardy):
status: Fix Committed → Won't Fix
Changed in ia32-libs (Ubuntu Hardy):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.