* Server crashes with > 20 X clients -- partial patch
@ 1998-04-27 14:37 adisaacs
0 siblings, 0 replies; only message in thread
From: adisaacs @ 1998-04-27 14:37 UTC (permalink / raw)
To: axp-list
Hello all,
I spent some time looking at the problem with the X server crashing when
more than about 25 X clients connect. I was able to create the enclosed
partial patch, but it's not a complete fix. This patch causes the X server
to ignore the clients, rather than crashing.
I still hope to look into this problem more, but it's getting towards the
end of the quarter, so my free time is decreasing precipitously, and I
wanted to get this out so that people would at least have somewhere to
start.
You'll need to apply this patch in xc/programs/Xserver/os/. You might also
need to change a few other calls of ffs() to use myffs(). (Make sure to
prototype myffs() correctly if you call it from another file.)
-andy
--- WaitFor.c.dist Mon Mar 2 06:56:36 1998
+++ WaitFor.c Tue Mar 17 22:49:41 1998
@@ -143,6 +143,14 @@
#if !defined(AMOEBA)
+int myffs(long i)
+{
+ int j;
+ for (j = 1; (i & 1) == 0; j++)
+ i >>= 1;
+ return j;
+}
+
int
WaitForSomething(pClientsReady)
int *pClientsReady;
@@ -418,7 +426,7 @@
{
int client_priority, client_index;
- curclient = ffs (clientsReadable.fds_bits[i]) - 1;
+ curclient = myffs (clientsReadable.fds_bits[i]) - 1;
client_index = ConnectionTranslation[curclient + (i << 5)];
#else
int highest_priority;
@@ -531,7 +539,7 @@
while (clientsReadable[i]) {
int client_priority, curclient, client_index;
- curclient = ffs (clientsReadable[i]) - 1;
+ curclient = myffs (clientsReadable[i]) - 1;
client_index = ConnectionTranslation[curclient + (i << 5)];
dbprintf(("%d has input\n", curclient));
#ifdef XSYNC
--
Andy Isaacson adisaacs@mtu.edu adi@acm.org Fight Spam, join CAUCE:
http://www.csl.mtu.edu/~adisaacs/ http://www.cauce.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-04-27 14:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-04-27 14:37 Server crashes with > 20 X clients -- partial patch adisaacs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox