[Lustre-discuss] clients gets EINTR from time to time

Ken Hornstein kenh at cmf.nrl.navy.mil
Fri Feb 25 07:47:23 PST 2011


>I have a report from a user that is is getting EINTR when a SIGALRM goes 
>off on his write().  It isn't unexpected to get SIGALRM because he 
>called the alarm, but he also has SA_RESTART set.  I can't remember 
>whose responsibility it is to restart the call, syscall or whereever, 
>but it seems that someone is dropping the ball because if EINTR is 
>returned then SA_RESTART didn't seem to do the trick, right?

I would agree with you on that one; if you're setting SA_RESTART then
you shouldn't ever get EINTR.  It looks like what should be happening
is that if you get interrupted the system call should return
ERESTARTSYS and then after the signal handler is done the system call
should be re-run for you by the signal handling code.

I see that at least for some cases, Lustre will use ERESTARTSYS; just a
guess, but maybe somewhere Lustre is returning EINTR itself instead of
returning ERESTARTSYS?

--Ken



More information about the lustre-discuss mailing list