[Zope] EAGAIN errors crashing ZServer Aiieeee!!!!

Michel Pelletier michel@digicool.com
Tue, 14 Mar 2000 12:51:43 -0800


Jon Prettyman wrote:
> 
> Couldn't get gdb to play with Zope/Python, so I went the strace route
> and guess what?
> 

> 18417 select(27, [9 11 13 14 15 17 26], [], [], {30, 0}) = ? ERESTARTNOHAND (To be restarted)
> 18417 --- SIGSEGV (Segmentation fault) ---
> 18417 +++ killed by SIGSEGV +++
> 
> This came up after about 15 minutes of handling requests.  If anyone
> wants to seem more of the strace output, let me know and I'll post it
> somewhere it can be seen.
> 
> Poking around through system header files finds:
> /usr/include/linux/errno.h
> 
> #ifndef _LINUX_ERRNO_H
> #define _LINUX_ERRNO_H
> 
> #include <asm/errno.h>
> 
> `#ifdef __KERNEL__
> 
> /* Should never be seen by user programs */
> #define ERESTARTSYS     512
> #define ERESTARTNOINTR  513
> #define ERESTARTNOHAND  514     /* restart if no handler.. */


But fs/select.c(sys_select) (in the linux kernel) DOES return
ERESTARTNOHAND of do_select returns a negative value.  This is, of
course, not documented in the select man page...  come to think of it,
it looks like the linux kernel returns ERESTARTNOHAND instead of EINTER
because (quoting the source comments) "ERESTARTSYS [instead of EINTER]
breaks at lest the xview clock binary, so I'm trying ERESTARTNOHAND
which restart only when you want to" [block comments are mine].

Fishy.

-Michel