From: Thomas Rast <trast@inf.ethz.ch>
To: <kusmabite@gmail.com>
Cc: "Thomas Rast" <trast@student.ethz.ch>,
"Eric Chamberland" <Eric.Chamberland@giref.ulaval.ca>,
"Brian J. Murrell" <brian@interlinx.bc.ca>,
git@vger.kernel.org, "Pyeron,
Jason J CTR (US)" <jason.j.pyeron.ctr@mail.mil>,
"Maxime Boissonneault" <maxime.boissonneault@calculquebec.ca>,
"Philippe Vaucher" <philippe.vaucher@gmail.com>,
"Sébastien Boisvert" <sebastien.boisvert@calculquebec.ca>
Subject: Re: GIT get corrupted on lustre
Date: Wed, 23 Jan 2013 16:44:24 +0100 [thread overview]
Message-ID: <871udbc3af.fsf@pctrast.inf.ethz.ch> (raw)
In-Reply-To: <CABPQNSb89h28O_a3uVoVrNisZqPcHHVFm8nP7GdFGCb=PVdcsQ@mail.gmail.com> (Erik Faye-Lund's message of "Wed, 23 Jan 2013 16:32:54 +0100")
Erik Faye-Lund <kusmabite@gmail.com> writes:
> 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
next prev parent reply other threads:[~2013-01-23 15:44 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-24 14:08 GIT get corrupted on lustre Eric Chamberland
2012-12-24 14:48 ` Andreas Schwab
2012-12-24 15:11 ` Brian J. Murrell
2013-01-08 16:11 ` Eric Chamberland
2013-01-09 21:20 ` Eric Chamberland
2013-01-17 13:07 ` Eric Chamberland
2013-01-17 14:23 ` Philippe Vaucher
2013-01-17 16:30 ` Eric Chamberland
2013-01-17 16:40 ` Pyeron, Jason J CTR (US)
2013-01-17 16:41 ` Maxime Boissonneault
2013-01-17 17:17 ` Pyeron, Jason J CTR (US)
2013-01-18 17:50 ` Eric Chamberland
2013-01-21 13:29 ` Erik Faye-Lund
2013-01-21 16:11 ` Thomas Rast
2013-01-21 16:14 ` Maxime Boissonneault
2013-01-21 16:20 ` Thomas Rast
2013-01-21 18:54 ` Brian J. Murrell
2013-01-21 19:29 ` Thomas Rast
2013-01-22 21:31 ` Eric Chamberland
2013-01-22 22:03 ` Junio C Hamano
2013-01-22 22:14 ` Thomas Rast
2013-01-22 22:46 ` Eric Chamberland
2013-01-23 14:45 ` Sébastien Boisvert
2013-01-23 14:50 ` Sébastien Boisvert
2013-01-23 15:23 ` Erik Faye-Lund
2013-01-23 15:32 ` Thomas Rast
2013-01-23 15:32 ` Erik Faye-Lund
2013-01-23 15:44 ` Thomas Rast [this message]
2013-01-23 15:54 ` Erik Faye-Lund
2013-01-23 17:23 ` Jonathan Nieder
2013-01-23 18:34 ` Sébastien Boisvert
2013-02-04 13:58 ` Eric Chamberland
2013-01-21 17:07 ` Eric Chamberland
2013-01-21 18:28 ` Eric Chamberland
2012-12-25 1:11 ` Greg Troxel
2012-12-26 22:51 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871udbc3af.fsf@pctrast.inf.ethz.ch \
--to=trast@inf.ethz.ch \
--cc=Eric.Chamberland@giref.ulaval.ca \
--cc=brian@interlinx.bc.ca \
--cc=git@vger.kernel.org \
--cc=jason.j.pyeron.ctr@mail.mil \
--cc=kusmabite@gmail.com \
--cc=maxime.boissonneault@calculquebec.ca \
--cc=philippe.vaucher@gmail.com \
--cc=sebastien.boisvert@calculquebec.ca \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).