lkml.org 
[lkml]   [2007]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectselect() setting ERESTARTNOHAND (514).
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:

http://www.tummy.com/journals/entries/jafo_20070110_154659

Thoughts?

Thanks,
Sean
(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 <jafo@tummy.com>
tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-11 01:55    [W:0.087 / U:2.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site