Bug 206955 - Can't create more than 256 connections to X display
Summary: Can't create more than 256 connections to X display
Keywords:
Status: CLOSED DUPLICATE of bug 230217
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: xorg-x11
Version: 4.0
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: Adam Jackson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 234251 325581
TreeView+ depends on / blocked
 
Reported: 2006-09-18 14:15 UTC by Bastien Nocera
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-11 20:06:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test.c (658 bytes, text/plain)
2006-09-18 14:15 UTC, Bastien Nocera
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0756 0 normal SHIPPED_LIVE xorg-x11 bug fix and enhancement update 2007-11-15 14:25:12 UTC

Description Bastien Nocera 2006-09-18 14:15:03 UTC
xorg-x11-libs-6.8.2-1.EL.13.25

After opening loads of xterms, or other X clients, we'd get the error:
Xlib: connection to ":0.0" refused by server
Xlib: Maximum number of clients reached
xterm Xt error: Can't open display: sunultra20b:0.0

One way to reproduce is to run:
for i in `seq 1 255`; do xlogo & done
and see the ~240th instances and subsequent ones fail to connect to the display

bug 176328 for RHEL3 isn't related, as it was about XOpenDisplay failing when
the first fd would be >= 256.

It isn't related to upstream:
https://bugs.freedesktop.org/show_bug.cgi?id=2920
as the electricsheep screensaver isn't being used.

Comment 1 Bastien Nocera 2006-09-18 14:15:07 UTC
Created attachment 136545 [details]
test.c

Comment 7 Adam Jackson 2007-05-03 22:01:05 UTC
XIDs are the global namespace for objects in the X protocol.  Clients are
assigned a range when they connect, and subsequent allocations happen from that
pool.

The XID itself is allocated as follows:

3 bits reserved (for no good reason)
N bits of client ID
M bits of resource ID

where N is defined by the MAXCLIENTS define in the server source.  Which means
right now, we have 8 bits for client ID and 21 for resource ID.  This patch
would move one bit to the client ID space, which has the side effect of reducing
the number of resources per client from 2millionish to 1millionish.  This is
probably not a problem.  However we may want to add an option somewhere to allow
the user to switch this at server startup.

Comment 8 RHEL Program Management 2007-05-09 09:36:10 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 9 Adam Jackson 2007-08-02 00:15:32 UTC
Built as xorg-x11 6.8.2-1.EL.25.  MODIFIED.

Comment 11 Cameron Meadors 2007-10-09 20:44:46 UTC
Not fixed.  Used the shell loop:

for a in `seq 1 256`; do xlogo & done

hit the limit at 253.  I have some clients already opened.  Starting a new one
explicitly says the limit was hit.



Comment 14 Jonathan Blandford 2007-10-11 20:06:59 UTC

*** This bug has been marked as a duplicate of 230217 ***


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