Subject: Select producing bogus EINVAL errors?
To: None <current-users@NetBSD.ORG>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: current-users
Date: 03/24/1997 12:06:14
I am not really sure if this is a "current-users" issue.
I have recently installed xntpd and now I get a lot of select errors
in totally unrelated programs. I have also recently upgraded the
kernel and and X so there is some confusion about where the problem
may lie ;-(
The programs I see this on are emacs running under X and fvwm. Emacs
sits there and every 5 minutes or so produces a "select: invalid
argument" error. Sometimes it produces several in a row. This is
annoying, but other wise doesn't stop emacs working.
Fvwm seems to run without error for long periods, but occasionally
gets into a state where it produces "select: errorcode 22" which is
also EINVAL as fast as it can go, filling up my error log file until
the partition fills up!. Also xclock consumes enourmous amounts of
CPU, possibly also producing these messages (there is no process ID or
name in the log file). emacs and fvwm are X11R6 linked but using
X11R6.3 dynamic libraries. Xclock is all new.
It is possible that there is a problem in XNextEvent, but last I
looked, emacs called select directly. Maybe this problem shows up in X
mostly because X uses select a *lot*.
Is it possible that there is some bad interaction between adjtime and
select? As I say, I don't recall seeing this before I ran xntpd which
presumably calls adjtime a lot. The select man page only mentions
negative time values for timeout as causes of EINVAL. It is possible
that calling programs are relying on a timeout not changing, but I
understand that the current implimentation, at least, timeout
does not get changed by select anyway.
Ian