Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Andreas Schwab
"Phil Endecott" <[EMAIL PROTECTED]> writes: > Sorry for being dense, but what is the implication of your comment "Since > it isn't restarted" ? Are you saying that the kernel isn't going to > restart it and will have converted it to EINTR and returned that to > user-space, and that this modified

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Phil Endecott
Andreas Schwab wrote: "Phil Endecott" <[EMAIL PROTECTED]> writes: Andreas Schwab wrote: "Phil Endecott" <[EMAIL PROTECTED]> writes: However, there's a lot of code and I know that there are bugs in it. I just want to focus on the kernel-related issue that the strace fragment that I posted brin

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Andreas Schwab
"Phil Endecott" <[EMAIL PROTECTED]> writes: > Andreas Schwab wrote: >> "Phil Endecott" <[EMAIL PROTECTED]> writes: >> >>> However, there's a lot of code and I know that there are bugs in it. I >>> just want to focus on the kernel-related issue that the strace fragment >>> that I posted brings up:

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Phil Endecott
Andi Kleen wrote: "Phil Endecott" <[EMAIL PROTECTED]> writes: Many thanks for any suggestions. It's a long standing bug reported regularly Thanks for the re-assurance. but so far nobody has tracked it down. That's mostly because most people cannot really reproduce it. I'm pretty sure th

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Phil Endecott
Andreas Schwab wrote: "Phil Endecott" <[EMAIL PROTECTED]> writes: However, there's a lot of code and I know that there are bugs in it. I just want to focus on the kernel-related issue that the strace fragment that I posted brings up: even if my user code gets completely screwed up (corrupts i

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Jiri Slaby
On 01/05/2008 04:03 PM, Andi Kleen wrote: >if (!strcmp(current->comm, "yourprogramwithoutpath")) > printk("%s:%d ERESTART\n", __FILE__, __LINE__); > > [the later two might need adding linux/string.h and/or linux/sched.h includes > to the files if they don't compile] > > to all of

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Andreas Schwab
"Phil Endecott" <[EMAIL PROTECTED]> writes: > However, there's a lot of code and I know that there are bugs in it. I > just want to focus on the kernel-related issue that the strace fragment > that I posted brings up: even if my user code gets completely screwed up > (corrupts its stack, runs ou

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Andi Kleen
"Phil Endecott" <[EMAIL PROTECTED]> writes: > > Many thanks for any suggestions. It's a long standing bug reported regularly but so far nobody has tracked it down. That's mostly because most people cannot really reproduce it. If you can reproduce it reliably: you could do the brute force debuggi

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Phil Endecott
Jiri Slaby wrote: On 01/05/2008 11:31 AM, Jiri Slaby wrote: Do not remove CCed people. On 01/05/2008 02:38 AM, Phil Endecott wrote: timezone go and play with http://demos.anyterm.org/bastet/anyterm.html while I sleep Service Temporarily Unavailable It failed at 0325 GMT thanks to the m

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Jiri Slaby
On 01/05/2008 11:31 AM, Jiri Slaby wrote: > Do not remove CCed people. > > On 01/05/2008 02:38 AM, Phil Endecott wrote: >> timezone go and play with http://demos.anyterm.org/bastet/anyterm.html >> while I sleep > > Service Temporarily Unavailable bastet? the tetris in which you always get th

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-05 Thread Jiri Slaby
Do not remove CCed people. On 01/05/2008 02:38 AM, Phil Endecott wrote: > timezone go and play with http://demos.anyterm.org/bastet/anyterm.html > while I sleep Service Temporarily Unavailable -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-04 Thread Phil Endecott
Frederik Deweerdt wrote: On Fri, Jan 04, 2008 at 09:01:38PM +, Phil Endecott wrote: struct sockaddr_in client_addr; socklen_t client_size=sizeof(client_addr); int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size); if (connfd==-1) { // [1] .report error and terminate..

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-04 Thread Frederik Deweerdt
On Fri, Jan 04, 2008 at 09:01:38PM +, Phil Endecott wrote: > Dear Experts, > > I have some code like this: > > struct sockaddr_in client_addr; > socklen_t client_size=sizeof(client_addr); > int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size); > if (connfd==-1) { > // [1] >

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-04 Thread Phil Endecott
Hi Jiri, Jiri Slaby wrote: On 01/04/2008 10:01 PM, Phil Endecott wrote: Dear Experts, I have some code like this: struct sockaddr_in client_addr; socklen_t client_size=sizeof(client_addr); int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size); if (connfd==-1) { // [1]

Re: strace, accept(), ERESTARTSYS and EINTR

2008-01-04 Thread Jiri Slaby
On 01/04/2008 10:01 PM, Phil Endecott wrote: > Dear Experts, > > I have some code like this: > > struct sockaddr_in client_addr; > socklen_t client_size=sizeof(client_addr); > int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size); > if (connfd==-1) { > // [1] > .report err

strace, accept(), ERESTARTSYS and EINTR

2008-01-04 Thread Phil Endecott
Dear Experts, I have some code like this: struct sockaddr_in client_addr; socklen_t client_size=sizeof(client_addr); int connfd = accept(fd,(struct sockaddr*)(&client_addr),&client_size); if (connfd==-1) { // [1] .report error and terminate.. } int rc = fcntl(connfd,F_SETFD,FD_CLOEXE