From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103734,6a7c75abf03cb3c2 X-Google-Attributes: gid103734,public X-Google-Thread: f4bda,6a7c75abf03cb3c2 X-Google-Attributes: gidf4bda,public X-Google-Thread: 111c93,6a7c75abf03cb3c2 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2001-05-22 03:27:32 PST Path: archiver1.google.com!newsfeed.google.com!postnews1.google.com!not-for-mail From: kees@org-net.nl (kj hermans) Newsgroups: comp.os.linux.alpha,comp.os.linux.x,comp.windows.x Subject: Re: WaitForSomething(): select :errno=22 Date: 22 May 2001 03:27:32 -0700 Organization: http://groups.google.com/ Message-ID: <3ebe4270.0105220227.712f63a4@posting.google.com> References: <3B0757FB.7A6A7FA8@nospam.com> NNTP-Posting-Host: 213.156.3.189 Content-Type: text/plain; charset=EUC-KR Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 990527252 12459 127.0.0.1 (22 May 2001 10:27:32 GMT) X-Complaints-To: groups-support@google.com NNTP-Posting-Date: 22 May 2001 10:27:32 GMT Xref: archiver1.google.com comp.os.linux.alpha:2915 comp.os.linux.x:11304 comp.windows.x:2400 "G. Hugh Song" 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 #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