* X server crashes
@ 1998-06-29 19:06 Ken Raeburn
1998-06-29 19:47 ` Matti Aarnio
0 siblings, 1 reply; 6+ messages in thread
From: Ken Raeburn @ 1998-06-29 19:06 UTC (permalink / raw)
To: axp-list
(Sorry if this has come up recently, I'm behind on my axp-list mail.)
My Matrox server has been crashing when I have too many connections.
I remember other people reporting this, but don't remember seeing a
solution, so I've been investigating, and here's one problem I've
found:
In os/WaitFor.c:
while (clientsReadable.fds_bits[i])
{
int client_priority, client_index;
curclient = ffs (clientsReadable.fds_bits[i]) - 1;
clientsReadable is a standard fd_set, and it and ffs both come from
the installed header files. However, fds_bits elements are type
"unsigned long int", and the ffs prototype is:
extern int ffs (int __i) ;
So when clientsReadable.fds_bits[i] is 0x300000000, the function call
truncates the value to fit an "int", and ffs(0) is 0, so curclient
gets assigned -1, and things fall apart from there.
Note also that connection.c and io.c use ffs similarly, and perhaps
stuff in other directories too.
I'm not sure if it should be required that ffs be usable on elements
of an fd_set. It really does only accept an int currently, it
truncates the value internally.
For now I'm probably just going to write a hack ffs64 so I can get
work done....
Ken
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: X server crashes
1998-06-29 19:06 Ken Raeburn
@ 1998-06-29 19:47 ` Matti Aarnio
1998-06-30 0:44 ` Andreas U. Trottmann
0 siblings, 1 reply; 6+ messages in thread
From: Matti Aarnio @ 1998-06-29 19:47 UTC (permalink / raw)
To: axp-list; +Cc: raeburn
> (Sorry if this has come up recently, I'm behind on my axp-list mail.)
>
> My Matrox server has been crashing when I have too many connections.
> I remember other people reporting this, but don't remember seeing a
> solution, so I've been investigating, and here's one problem I've
> found:
Wait a few hours -- two, I think -- and then download from
ftp://mea.tmt.tele.fi/pub/XFree86/
I am compiling code with fairly clean patches for this.
('make World CC="egcs -g"' takes about two hours, and
about 500 MB disk space..)
....
> Ken
/Matti Aarnio <matti.aarnio@sonera.fi>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: X server crashes
1998-06-29 19:47 ` Matti Aarnio
@ 1998-06-30 0:44 ` Andreas U. Trottmann
1998-06-30 14:10 ` Ken Raeburn
0 siblings, 1 reply; 6+ messages in thread
From: Andreas U. Trottmann @ 1998-06-30 0:44 UTC (permalink / raw)
To: axp-list
On Mon, Jun 29, 1998 at 10:47:18PM +0300, Matti Aarnio wrote:
> > My Matrox server has been crashing when I have too many connections.
> > I remember other people reporting this, but don't remember seeing a
> > solution, so I've been investigating, and here's one problem I've
> > found:
>
> Wait a few hours -- two, I think -- and then download from
> ftp://mea.tmt.tele.fi/pub/XFree86/
First of all: I want to thank you for your great work. Your patched X
server (XF86_SVGA) has been proven to be much more stable than any other X
server I ever tried. And I havn't seen any unaligned trap since I
installed your server :-)
But: Using your latest server as of now (XF86_SVGA.alpha.bin.gz: 1674606
bytes, date is Jun 30 00:20) the problem of "crashing at more than 32
clients" has been replaced by "can't open more than 32 clients".
I.e. if I start the X server (no window manager), I can start 32 xterms.
When I try to start the 33rd, no window appears but I can kill the xterm
process. If I then kill one of the old ones, I can start a new one (making
again 32 X clients), but any try to go again past 32 fails.
So, it seems you touched the right spot with your last bugfix (no more
crash), but there still seems to be a problem somewhere in that area.
--
Andreas Trottmann <andreas.trottmann@werft22.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: X server crashes
1998-06-30 0:44 ` Andreas U. Trottmann
@ 1998-06-30 14:10 ` Ken Raeburn
1998-06-30 16:44 ` Matti Aarnio
0 siblings, 1 reply; 6+ messages in thread
From: Ken Raeburn @ 1998-06-30 14:10 UTC (permalink / raw)
To: axp-list
> On Mon, Jun 29, 1998 at 10:47:18PM +0300, Matti Aarnio wrote:
> > Wait a few hours -- two, I think -- and then download from
> > ftp://mea.tmt.tele.fi/pub/XFree86/
IMHO the main X code shouldn't be conditionalized so much on sizes
just to deal with which utility functions to call and how many bits to
shift a value. Both could be hidden away in macros, making the code
easier to read and no slower to run.
curclient = XFD_FFS (clientsReadable.fds_bits[i]) - 1;
client_index = ConnectionTranslation[curclient + (i << XFD_LOG2_NBITS)];
Will your ffsl do the right thing for an input of 0?
"Andreas U. Trottmann" <andreas.trottmann@werft22.com> writes:
> I.e. if I start the X server (no window manager), I can start 32 xterms.
> When I try to start the 33rd, no window appears but I can kill the xterm
> process. If I then kill one of the old ones, I can start a new one (making
> again 32 X clients), but any try to go again past 32 fails.
Hm, me too. So, we're still missing something....
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: X server crashes
1998-06-30 14:10 ` Ken Raeburn
@ 1998-06-30 16:44 ` Matti Aarnio
0 siblings, 0 replies; 6+ messages in thread
From: Matti Aarnio @ 1998-06-30 16:44 UTC (permalink / raw)
To: axp-list
Ok, new binaries are available...
> > On Mon, Jun 29, 1998 at 10:47:18PM +0300, Matti Aarnio wrote:
> > > Wait a few hours -- two, I think -- and then download from
> > > ftp://mea.tmt.tele.fi/pub/XFree86/
>
> IMHO the main X code shouldn't be conditionalized so much on sizes
> just to deal with which utility functions to call and how many bits to
> shift a value. Both could be hidden away in macros, making the code
> easier to read and no slower to run.
>
> curclient = XFD_FFS (clientsReadable.fds_bits[i]) - 1;
> client_index = ConnectionTranslation[curclient + (i << XFD_LOG2_NBITS)];
>
> Will your ffsl do the right thing for an input of 0?
The "ffsl()" is just "ffs()" with "long" input
parameter (where the ffs() has "int").
> "Andreas U. Trottmann" <andreas.trottmann@werft22.com> writes:
> > I.e. if I start the X server (no window manager), I can start 32 xterms.
> > When I try to start the 33rd, no window appears but I can kill the xterm
> > process. If I then kill one of the old ones, I can start a new one (making
> > again 32 X clients), but any try to go again past 32 fails.
>
> Hm, me too. So, we're still missing something....
Yep, that was a nasty one. Found the same problem present
in Xserver/os/io.c, lbxproxy/os/io.c, and somewhere else,
which I don't remember offhand.
I have to do more work to get proper diffs out this time, as
I had to tinker far and wide before I finally found that one.
/Matti Aarnio <matti.aarnio@sonera.fi> -- with fvwm current-desk object
listing going to "i"
(damn, it just doesn't fit to my
screen anymore! 93 fd's on
the XF86_SVGA process.)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: X server crashes
@ 1998-06-30 18:58 DevGolfs18
0 siblings, 0 replies; 6+ messages in thread
From: DevGolfs18 @ 1998-06-30 18:58 UTC (permalink / raw)
To: axp-list
Please remove me from any and all of your mailing lists. Thank you very much.
Devin Rahn
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1998-06-30 18:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-06-30 18:58 X server crashes DevGolfs18
-- strict thread matches above, loose matches on Subject: below --
1998-06-29 19:06 Ken Raeburn
1998-06-29 19:47 ` Matti Aarnio
1998-06-30 0:44 ` Andreas U. Trottmann
1998-06-30 14:10 ` Ken Raeburn
1998-06-30 16:44 ` Matti Aarnio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox