|
Bugzilla – Full Text Bug Listing |
| Summary: | Xlib: Maximum number of clients reached | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | Olaf Dabrunz <odabrunz> |
| Component: | X.Org | Assignee: | Stefan Dirsch <sndirsch> |
| Status: | RESOLVED WONTFIX | QA Contact: | Stefan Dirsch <sndirsch> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | eich |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | SuSE Linux 10.0 | ||
| Whiteboard: | |||
| Found By: | Development | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Olaf Dabrunz
2005-12-05 16:04:14 UTC
This is really biting me. Tentatively increasing severity to major. # cvs annotate misc.h [...] 3.14 (dawes 14-Aug-98): #define MAXCLIENTS 256 [...] # cvs log misc.h [...] revision 3.14 date: 1998/08/14 13:35:50; author: dawes; state: Exp; lines: +2 -2 fix some build problems change the connection limit stuff [...] # cvs diff -u -r3.13 -r3.14 misc.h [...] @@ -94,7 +94,7 @@ #ifndef MAXSCREENS #define MAXSCREENS 4 #endif -#define MAXCLIENTS 128 +#define MAXCLIENTS 256 #define MAXDITS 1 #define MAXEXTENSIONS 128 #define MAXFORMATS 8 MAXCLIENT = 512 seems to be already prepared. programs/Xserver/include/resource.h [...] /* bits and fields within a resource id */ #define RESOURCE_AND_CLIENT_COUNT 29 /* 29 bits for XIDs */ #if MAXCLIENTS == 64 #define RESOURCE_CLIENT_BITS 6 #endif #if MAXCLIENTS == 128 #define RESOURCE_CLIENT_BITS 7 #endif #if MAXCLIENTS == 256 #define RESOURCE_CLIENT_BITS 8 #endif #if MAXCLIENTS == 512 #define RESOURCE_CLIENT_BITS 9 #endif The additional memory space used in the X-Server does not seem to increase that
much. A few arrays of pointers are bigger, and this:
typedef struct _ClientResource {
ResourcePtr *resources;
int elements;
int buckets;
int hashsize; /* log(2)(buckets) */
XID fakeID;
XID endFakeID;
XID expectID;
} ClientResourceRec;
[...]
ClientResourceRec clientTable[MAXCLIENTS];
The only point seems to be that the number of available RESOURCE_IDs decreases
from about 2 million (2^21) to one million (2^20):
#if MAXCLIENTS == 512
#define RESOURCE_CLIENT_BITS 9
#endif
/* client field offset */
#define CLIENTOFFSET (RESOURCE_AND_CLIENT_COUNT - RESOURCE_CLIENT_BITS)
/* resource field */
#define RESOURCE_ID_MASK ((1 << CLIENTOFFSET) - 1)
Egbert, what do you think?
A while ago we were asked to increase this number because the broken IBM Java implementation expected to open up bzillions of clients. We strongly encouraged IBM to fix this - and they did. Here w3m seems to be broken - and should be fixed. We would have to review the code in may places if more than 256 clients will actually work without problems lurking in some remote corners. Being that this is really a corner issue and not a popular request I will rather spend my time on other issues. In amy case this warrent a severity of "major'. Also, where is the limit? Is 512 really enough? Maybe you want to explore the issue yourself and roll an Xserver with MAX_CLIENTS set to 512. If you don't see problems we may want to explore the issue further after SLES10. I can see your points.
Thanks for commenting on this.
In the meantime I have had some ideas on how to solve the problem in w3m more
quickly, including
- using one w3mimgdisplay server for all w3ms running on a client for a
given user on a given display
- use only one w3m and add a feature to switch between sessions/tabbars
Aternatively maybe I can build and test an Xserver with 512 clients myself.
I cannot spend much time on this either, but I will see what can be done...
Thanks again!
|