git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: GIT get corrupted on lustre

From
Thomas Rast <trast@inf.ethz.ch>
Date
Jan 23, 2013, 15:44 UTC
Message-ID
<871udbc3af.fsf@pctrast.inf.ethz.ch>
In-Reply-To
<CABPQNSb89h28O_a3uVoVrNisZqPcHHVFm8nP7GdFGCb=PVdcsQ@mail.gmail.com>
Erik Faye-Lund <kusmabite@gmail.com> writes:
Show 20 quoted lines
> On Wed, Jan 23, 2013 at 4:32 PM, Thomas Rast <trast@student.ethz.ch> wrote:
>> Erik Faye-Lund <kusmabite@gmail.com> writes:
>>
>>> POSIX allows error codes
>>> to be generated other than those defined. From
>>> http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_03.html:
>>>
>>> "Implementations may support additional errors not included in this
>>> list, *may generate errors included in this list under circumstances
>>> other than those described here*, or may contain extensions or
>>> limitations that prevent some errors from occurring."
>>
>> That same page says, however:
>>
>>   For functions under the Threads option for which [EINTR] is not listed
>>   as a possible error condition in this volume of IEEE Std 1003.1-2001,
>>   an implementation shall not return an error code of [EINTR].
>
> Yes, but surely that's for pthreads functions, no? utime is not one of
> those functions...
Ah, my bad.  In fact in
  http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap02.html
there is a paragraph "Signal Effects on Other Functions", which says
  The most common behavior of an interrupted function after a
  signal-catching function returns is for the interrupted function to
  give an [EINTR] error unless the SA_RESTART flag is in effect for the
  signal. However, there are a number of specific exceptions, including
  sleep() and certain situations with read() and write().
  The historical implementations of many functions defined by IEEE Std
  1003.1-2001 are not interruptible[...]
  Functions not mentioned explicitly as interruptible may be so on some
  implementations, possibly as an extension where the function gives an
  [EINTR] error. There are several functions (for example, getpid(),
  getuid()) that are specified as never returning an error, which can
  thus never be extended in this way.
  If a signal-catching function returns while the SA_RESTART flag is in
  effect, an interrupted function is restarted at the point it was
  interrupted. Conforming applications cannot make assumptions about the
  internal behavior of interrupted functions, even if the functions are
  async-signal-safe. For example, suppose the read() function is
  interrupted with SA_RESTART in effect, the signal-catching function
  closes the file descriptor being read from and returns, and the read()
  function is then restarted; in this case the application cannot assume
  that the read() function will give an [EBADF] error, since read()
  might have checked the file descriptor for validity before being
  interrupted.

Taken together this should mean that the bug is in fact simply that the calls do not *restart*. They are (like you say) allowed to return EINTR despite not being specified to, *but* SA_RESTART should restart it.

Now, does that make it a lustre bug or a glibc bug? :-)
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Erik Faye-LundNext: Erik Faye-Lund
Message 28 of 36 in “GIT get corrupted on lustre”
  1. Eric ChamberlandDec 24, 2012
  2. Andreas SchwabDec 24, 2012
  3. Brian J. MurrellDec 24, 2012
  4. Eric ChamberlandJan 8, 2013
  5. Eric ChamberlandJan 9, 2013
  6. Eric ChamberlandJan 17, 2013
  7. Philippe VaucherJan 17, 2013
  8. Eric ChamberlandJan 17, 2013
  9. Pyeron, Jason J CTR (US)Jan 17, 2013
  10. Maxime BoissonneaultJan 17, 2013
  11. Pyeron, Jason J CTR (US)Jan 17, 2013
  12. Eric ChamberlandJan 18, 2013
  13. Erik Faye-LundJan 21, 2013
  14. Thomas RastJan 21, 2013
  15. Maxime BoissonneaultJan 21, 2013
  16. Thomas RastJan 21, 2013
  17. Brian J. MurrellJan 21, 2013
  18. Thomas RastJan 21, 2013
  19. Eric ChamberlandJan 22, 2013
  20. Junio C HamanoJan 22, 2013
  21. Thomas RastJan 22, 2013
  22. Eric ChamberlandJan 22, 2013
  23. Sébastien BoisvertJan 23, 2013
  24. Sébastien BoisvertJan 23, 2013
  25. Erik Faye-LundJan 23, 2013
  26. Thomas RastJan 23, 2013
  27. Erik Faye-LundJan 23, 2013
  28. Thomas RastJan 23, 2013
  29. Erik Faye-LundJan 23, 2013
  30. Jonathan NiederJan 23, 2013
  31. Sébastien BoisvertJan 23, 2013
  32. Eric ChamberlandFeb 4, 2013
  33. Eric ChamberlandJan 21, 2013
  34. Eric ChamberlandJan 21, 2013
  35. Greg TroxelDec 25, 2012
  36. Jeff KingDec 26, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.