LKML Archive on
help / color / mirror / Atom feed
* select() setting ERESTARTNOHAND (514).
@ 2007-01-10 23:42 Sean Reifschneider
  2007-01-11  0:27 ` David Miller
  2007-01-11  0:37 ` PATCH - x86-64 signed-compare bug, was " Neil Brown
  0 siblings, 2 replies; 14+ messages in thread
From: Sean Reifschneider @ 2007-01-10 23:42 UTC (permalink / raw)
  To: linux-kernel

I've been looking at an issue in Python where a "time.sleep(1)" will
sporadically raise an IOError exception with errno=514.  time.sleep() is
implemented with select(), to get sub-second resolution.

In looking at the Linux code for ERESTARTNOHAND, I see that
include/linux/errno.h says this errno should never make it to the user.
However, in this instance we ARE seeing it.  Looking around on google shows
others are seeing it as well, though hits are few.

In looking at the select() code, I see that there are definitely cases
where sys_select() or sys_pselect7() can return -ERESTARTNOHAND.  However,
I don't know if this is expected to be caught elsewhere, or if returning it
here would send it back to user-space.  Worse, I don't fully understand
what the impact would be of trapping the ERESTARTNOHAND in the
sys_select/sys_pselect7 functions would be.

Is this something that's intended to be retrned back to the user, in which
case the message in include/linux/errno.h should be corrected and people
using time.sleep() in python will just have to live with it sometimes
raising an exception?  Or is it something that definitely should never
reach the user-space code, and there's some leak.

Just to be clear, this is happening only on one machine out of at least 4
where this has been tested.  The machine where it's happening is a dual
processor, dual core Xeon 2GHz 51xx series system.  The other systems where
it's not happening are single CPU Celeron or P4 class systems, though one
is a 2-year-old quad CPU Xeon running something <2GHz, IIRC.

More details on my investigation are at:


(Not subscribed, I'll use the list archive to follow-up)
 Electricity travels a foot in a nanosecond.
                 -- Commodore Grace Murray Hopper
Sean Reifschneider, Member of Technical Staff <>, ltd. - Linux Consulting since 1995: Ask me about High Availability

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

end of thread, other threads:[~2007-01-24  0:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-10 23:42 select() setting ERESTARTNOHAND (514) Sean Reifschneider
2007-01-11  0:27 ` David Miller
2007-01-11  1:04   ` Sean Reifschneider
2007-01-11  1:15     ` David Miller
2007-01-11  8:25       ` Sean Reifschneider
2007-01-11 22:22         ` bert hubert
2007-01-24  0:50           ` Sean Reifschneider
2007-01-11  0:37 ` PATCH - x86-64 signed-compare bug, was " Neil Brown
2007-01-11  0:40   ` Andi Kleen
2007-01-11  1:02     ` Neil Brown
2007-01-11  1:37       ` Andi Kleen
2007-01-11  4:09       ` Sean Reifschneider
2007-01-11 19:38       ` Denis Vlasenko
2007-01-11  0:43   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).