Re: select() setting ERESTARTNOHAND (514).

2007-01-23 Thread Sean Reifschneider
On Thu, Jan 11, 2007 at 11:22:46PM +0100, bert hubert wrote: >Anything else relevant? Do you know which signal interrupted select? Is this >a single or multithreaded application? And where did the signal come from? It is, AFAIK, a multi-threaded application. I don't have any information on which

Re: select() setting ERESTARTNOHAND (514).

2007-01-11 Thread bert hubert
On Thu, Jan 11, 2007 at 01:25:16AM -0700, Sean Reifschneider wrote: > Nope, I haven't looked in strace at all. It's definitely making it to > user-space. The code in question is (abbreviated): > >if (select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t) != 0) { > PyErr_SetFromErrno(PyE

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-11 Thread Denis Vlasenko
On Thursday 11 January 2007 02:02, Neil Brown wrote: > If regs->rax is unsigned long, then I would think the compiler would > be allowed to convert > >switch (regs->rax) { > case -514 : whatever; >} > > to a no-op, as regs->rax will never have a negative value. In C, you never actu

Re: select() setting ERESTARTNOHAND (514).

2007-01-11 Thread Sean Reifschneider
On Wed, Jan 10, 2007 at 05:15:20PM -0800, David Miller wrote: >If you're only seeing it in strace, that's expected due to some Nope, I haven't looked in strace at all. It's definitely making it to user-space. The code in question is (abbreviated): if (select(0, (fd_set *)0, (fd_set *)0, (fd_

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Sean Reifschneider
On Thu, Jan 11, 2007 at 12:02:53PM +1100, Neil Brown wrote: >On Thursday January 11, [EMAIL PROTECTED] wrote: >> Normally it should be only visible in strace. Did you see it without >> strace? > >No, only in strace. I am absolutely seeing it outside of strace. It is showing up as an errno to the

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Andi Kleen
On Thursday 11 January 2007 02:02, Neil Brown wrote: > On Thursday January 11, [EMAIL PROTECTED] wrote: > > > Just a 'me too' at this point. > > > The X server on my shiny new notebook (Core 2 Duo) occasionally dies > > > with 'select' repeatedly returning ERESTARTNOHAND. It is most > > > annoyin

Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread David Miller
From: Sean Reifschneider <[EMAIL PROTECTED]> Date: Wed, 10 Jan 2007 18:04:29 -0700 > On Wed, Jan 10, 2007 at 04:27:47PM -0800, David Miller wrote: > >It gets caught by the return into userspace code. > > Ok, so somehow it is leaking. I have a system in the lab that is the same > hardware as prod

Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Sean Reifschneider
On Wed, Jan 10, 2007 at 04:27:47PM -0800, David Miller wrote: >It gets caught by the return into userspace code. Ok, so somehow it is leaking. I have a system in the lab that is the same hardware as production, but it currently has no, you know, hard drives in it, so some assembly is required. I

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Neil Brown
On Thursday January 11, [EMAIL PROTECTED] wrote: > > Just a 'me too' at this point. > > The X server on my shiny new notebook (Core 2 Duo) occasionally dies > > with 'select' repeatedly returning ERESTARTNOHAND. It is most > > annoying! > > Normally it should be only visible in strace. Did you s

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread David Miller
From: Neil Brown <[EMAIL PROTECTED]> Date: Thu, 11 Jan 2007 11:37:05 +1100 > On x86-64, regs->rax is "unsigned long", so the following is > needed > > I haven't tried it yet. Doesn't type promotion take care of that? Did you verify that assember? I checked the assembler on sparc64 for simi

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Andi Kleen
On Thursday 11 January 2007 01:37, Neil Brown wrote: > On Wednesday January 10, [EMAIL PROTECTED] wrote: > > > > 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.

PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Neil Brown
On Wednesday January 10, [EMAIL PROTECTED] wrote: > > 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,

Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread David Miller
From: Sean Reifschneider <[EMAIL PROTECTED]> Date: Wed, 10 Jan 2007 16:42:38 -0700 > 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