Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* WaitForSomething(): select :errno=22
@ 2001-05-20  5:36 G. Hugh Song
  2001-05-22 10:27 ` kj hermans
  0 siblings, 1 reply; 5+ messages in thread
From: G. Hugh Song @ 2001-05-20  5:36 UTC (permalink / raw)


My UP2000 board running Linux/Alpha SMP from SuSE-7.0
xf86-3.3.6-49.alpha.rpm and xglint-3.3.6-49.alpha.rpm.
afterstp-1.8.0-0.alpha.rpm.

X often crashes with the messages:

WaitForSomething():select :errno=22

Any clue to this problem?

Thank you.

-- 
G. Hugh Song


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WaitForSomething(): select :errno=22
  2001-05-20  5:36 WaitForSomething(): select :errno=22 G. Hugh Song
@ 2001-05-22 10:27 ` kj hermans
  2001-05-22 15:53   ` kj hermans
  0 siblings, 1 reply; 5+ messages in thread
From: kj hermans @ 2001-05-22 10:27 UTC (permalink / raw)


"G. Hugh Song" <ghsong@nospam.com> wrote in message news:<3B0757FB.7A6A7FA8@nospam.com>...
> My UP2000 board running Linux/Alpha SMP from SuSE-7.0
> xf86-3.3.6-49.alpha.rpm and xglint-3.3.6-49.alpha.rpm.
> afterstp-1.8.0-0.alpha.rpm.
> 
> X often crashes with the messages:
> 
> WaitForSomething():select :errno=22
> 
> Any clue to this problem?
> 
> Thank you.

Well, 22 is EINVAL on Linux and 'man select' says that select() returns EINVAL
when n is negative, so somehow the maximum filedescriptor fed to select() manages
to become negative.  According to the http://www.afterstep.org/code, afterstep
has two functions that start with 'WaitFor', namely 'WaitForExpose()' and
'WaitForButtonsUp()'.  However, the source code to the X server has a function called
'WaitForSomething()' in 'xc/programs/Xserver/os/WaitFor.c' on line 342,
where 'MAXSOCKS' is the culprit.
And in 'xc/programs/Xserver/os/osdep.h', around line 70,
we find a piece of code that can easily lead to MAXSOCKS being -1

#ifndef OPEN_MAX
#ifdef SVR4
#define OPEN_MAX 256
#else
#include <sys/param.h>
#ifndef OPEN_MAX
#if defined(NOFILE) && !defined(NOFILES_MAX)
#define OPEN_MAX NOFILE
#else
#define OPEN_MAX NOFILES_MAX
#endif
#endif
#endif
#endif

#if OPEN_MAX <= 256
#define MAXSOCKS (OPEN_MAX - 1)
#else
#define MAXSOCKS 256
#endif

I think.  But I'm not sure; just a quick source code scan.

KC


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WaitForSomething(): select :errno=22
  2001-05-22 10:27 ` kj hermans
@ 2001-05-22 15:53   ` kj hermans
  2001-05-25  6:21     ` G. Hugh Song
  0 siblings, 1 reply; 5+ messages in thread
From: kj hermans @ 2001-05-22 15:53 UTC (permalink / raw)


kees@org-net.nl (kj hermans) wrote in message news:<3ebe4270.0105220227.712f63a4@posting.google.com>...
> "G. Hugh Song" <ghsong@nospam.com> wrote in message news:<3B0757FB.7A6A7FA8@nospam.com>...
> > My UP2000 board running Linux/Alpha SMP from SuSE-7.0
> > xf86-3.3.6-49.alpha.rpm and xglint-3.3.6-49.alpha.rpm.
> > afterstp-1.8.0-0.alpha.rpm.
> > 
> > X often crashes with the messages:
> > 
> > WaitForSomething():select :errno=22
> > 
> > Any clue to this problem?
> > 
> > Thank you.
> 
> Well, 22 is EINVAL on Linux and 'man select' says that select() returns EINVAL
> when n is negative, so somehow the maximum filedescriptor fed to select() manages
> to become negative.  According to the http://www.afterstep.org/code, afterstep
> has two functions that start with 'WaitFor', namely 'WaitForExpose()' and
> 'WaitForButtonsUp()'.  However, the source code to the X server has a function called
> 'WaitForSomething()' in 'xc/programs/Xserver/os/WaitFor.c' on line 342,
> where 'MAXSOCKS' is the culprit.
> And in 'xc/programs/Xserver/os/osdep.h', around line 70,
> we find a piece of code that can easily lead to MAXSOCKS being -1
> 
> #ifndef OPEN_MAX
> #ifdef SVR4
> #define OPEN_MAX 256
> #else
> #include <sys/param.h>
> #ifndef OPEN_MAX
> #if defined(NOFILE) && !defined(NOFILES_MAX)
> #define OPEN_MAX NOFILE
> #else
> #define OPEN_MAX NOFILES_MAX
> #endif
> #endif
> #endif
> #endif
> 
> #if OPEN_MAX <= 256
> #define MAXSOCKS (OPEN_MAX - 1)
> #else
> #define MAXSOCKS 256
> #endif
> 
> I think.  But I'm not sure; just a quick source code scan.
> 
> KC

In short; when compiling for your system,
maybe somebody forgot to #define NOFILE _and_ NOFILES_MAX.
If that's the case (and I'm not very sure about this), write to the person who
packages these rpms, or the person who's supposed to have created the standard
header files for your Linux distribution (Suse, that is); because in my
Linux, OPEN_MAX is already #define-d in /usr/include/linux/limits.h as 256.
Of course it's just a possibility; this needs to be proven by recompiling
the Xserver for your system with some sort of echo of this value.

you can also add the lines

#if !defined(OPEN_MAX) && !defined(SVR4) && !defined(NOFILE) && !defined(NOFILES_MAX)
#error "impossible system configuration"
#endif

on top of all these defines inside the source code and recompile.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WaitForSomething(): select :errno=22
  2001-05-22 15:53   ` kj hermans
@ 2001-05-25  6:21     ` G. Hugh Song
  2001-05-28  8:42       ` kj hermans
  0 siblings, 1 reply; 5+ messages in thread
From: G. Hugh Song @ 2001-05-25  6:21 UTC (permalink / raw)


kj hermans wrote:
> 
> kees@org-net.nl (kj hermans) wrote in message news:<3ebe4270.0105220227.712f63a4@posting.google.com>...
> > "G. Hugh Song" <ghsong@nospam.com> wrote in message news:<3B0757FB.7A6A7FA8@nospam.com>...
> > > My UP2000 board running Linux/Alpha SMP from SuSE-7.0
> > > xf86-3.3.6-49.alpha.rpm and xglint-3.3.6-49.alpha.rpm.
> > > afterstp-1.8.0-0.alpha.rpm.
> > >
> > > X often crashes with the messages:
> > >
> > > WaitForSomething():select :errno=22
> > >
> > > Any clue to this problem?
> > >
> > > Thank you.
>> In short; when compiling for your system,
> maybe somebody forgot to #define NOFILE _and_ NOFILES_MAX.
> If that's the case (and I'm not very sure about this), write to the person who
> packages these rpms, or the person who's supposed to have created the standard
> header files for your Linux distribution (Suse, that is); because in my
> Linux, OPEN_MAX is already #define-d in /usr/include/linux/limits.h as 256.
> Of course it's just a possibility; this needs to be proven by recompiling
> the Xserver for your system with some sort of echo of this value.

Thank you very much for the wonderful message:
I checked /usr/include/linux/limits.h on my system SuSE-7.0 for
Alpha/Linux.
OPEN_MAX was already defined there.   Anyway, your message seems to
suggest 
that I should use something other than AfterStep.  Is my understanding 
correct?

Too bad, I liked AfterStep so much for its beauty.

Best regards,

Hugh


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WaitForSomething(): select :errno=22
  2001-05-25  6:21     ` G. Hugh Song
@ 2001-05-28  8:42       ` kj hermans
  0 siblings, 0 replies; 5+ messages in thread
From: kj hermans @ 2001-05-28  8:42 UTC (permalink / raw)


"G. Hugh Song" <ghsong@nospam.com> wrote in message news:<3B0DF9FE.8FE49A96@nospam.com>...
> kj hermans wrote:
> > 
> > kees@org-net.nl (kj hermans) wrote in message news:<3ebe4270.0105220227.712f63a4@posting.google.com>...
> > > "G. Hugh Song" <ghsong@nospam.com> wrote in message news:<3B0757FB.7A6A7FA8@nospam.com>...
> > > > My UP2000 board running Linux/Alpha SMP from SuSE-7.0
> > > > xf86-3.3.6-49.alpha.rpm and xglint-3.3.6-49.alpha.rpm.
> > > > afterstp-1.8.0-0.alpha.rpm.
> > > >
> > > > X often crashes with the messages:
> > > >
> > > > WaitForSomething():select :errno=22
> > > >
> > > > Any clue to this problem?
> > > >
> > > > Thank you.
> >> In short; when compiling for your system,
> > maybe somebody forgot to #define NOFILE _and_ NOFILES_MAX.
> > If that's the case (and I'm not very sure about this), write to the person who
> > packages these rpms, or the person who's supposed to have created the standard
> > header files for your Linux distribution (Suse, that is); because in my
> > Linux, OPEN_MAX is already #define-d in /usr/include/linux/limits.h as 256.
> > Of course it's just a possibility; this needs to be proven by recompiling
> > the Xserver for your system with some sort of echo of this value.
> 
> Thank you very much for the wonderful message:
> I checked /usr/include/linux/limits.h on my system SuSE-7.0 for
> Alpha/Linux.
> OPEN_MAX was already defined there.   Anyway, your message seems to
> suggest 
> that I should use something other than AfterStep.  Is my understanding 
> correct?
> 
> Too bad, I liked AfterStep so much for its beauty.
> 
> Best regards,
> 
> Hugh

No, what I'm saying is, that you should get the four (I think) tar.gz's
(xorg-1 until 4) from x.org and recompile your X server if you really want to know
what's happening.  The part about afterstep was misleading, I thought at first
that that was the problem, but the message comes from the X server code really,
which is a wholly different process and it can do its own crashing.
Checking your personal setting for OPEN_MAX does not prove anything,
it's about the OPEN_MAX setting on the system of the person who compiled
your X server (unless that was you, of course) that matters.

Then again, checking out some buglist at suse is also a good idea, and 
your other option.  But try recompilation; it's fun !

KC


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-05-28  8:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-20  5:36 WaitForSomething(): select :errno=22 G. Hugh Song
2001-05-22 10:27 ` kj hermans
2001-05-22 15:53   ` kj hermans
2001-05-25  6:21     ` G. Hugh Song
2001-05-28  8:42       ` kj hermans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox