Bug 206955 - Can't create more than 256 connections to X display
Can't create more than 256 connections to X display
Status: CLOSED DUPLICATE of bug 230217
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: xorg-x11 (Show other bugs)
4.0
All Linux
high Severity medium
: ---
: ---
Assigned To: Adam Jackson
:
Depends On:
Blocks: 234251 325581
  Show dependency treegraph
 
Reported: 2006-09-18 10:15 EDT by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-11 16:06:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Bastien Nocera 2006-09-18 10:15:03 EDT
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 10:15:07 EDT
Created attachment 136545 [details]
test.c
Comment 7 Adam Jackson 2007-05-03 18:01:05 EDT
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 Product and Program Management 2007-05-09 05:36:10 EDT
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-01 20:15:32 EDT
Built as xorg-x11 6.8.2-1.EL.25.  MODIFIED.
Comment 11 Cameron Meadors 2007-10-09 16:44:46 EDT
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 16:06:59 EDT

*** 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.