From: Peter Hurley <peter@hurleysoftware.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>, Mikael Pettersson <mikpe@it.uu.se>,
David Howells <dhowells@redhat.com>
Subject: Re: Strange intermittent EIO error when writing to stdout since v3.8.0
Date: Fri, 07 Jun 2013 11:39:29 -0400 [thread overview]
Message-ID: <51B1FEB1.8040103@hurleysoftware.com> (raw)
In-Reply-To: <20130606143750.GB520@x4>
On 06/06/2013 10:37 AM, Markus Trippelsdorf wrote:
> On 2013.06.06 at 10:18 -0400, Peter Hurley wrote:
>> On 06/06/2013 07:54 AM, Markus Trippelsdorf wrote:
>>> Since v3.8.0 several people reported intermittent IO errors that happen
>>> during high system load while using "emerge" under Gentoo:
>>> ...
>>> File "/usr/lib64/portage/pym/portage/util/_eventloop/EventLoop.py", line 260, in iteration
>>> if not x.callback(f, event, *x.args):
>>> File "/usr/lib64/portage/pym/portage/util/_async/PipeLogger.py", line 99, in _output_handler
>>> stdout_buf[os.write(stdout_fd, stdout_buf):]
>>> File "/usr/lib64/portage/pym/portage/__init__.py", line 246, in __call__
>>> rval = self._func(*wrapped_args, **wrapped_kwargs)
>>> OSError: [Errno 5] Input/output error
>>
>> Looks to me like a user-space bug: EIO is returned when the other
>> end of the "pipe" has been closed.
>>
>> FWIW, I didn't see where the OP tried to revert
>> 'SpawnProcess: stdout_fd FD_CLOEXEC'
>>
>> The only non-emerge related comment (#21 in the link provided) refers to
>> 'a similar issue sometimes happened when I built Firefox by hand [..snip..]
>> And it would randomly crash during the build.
>>
>> Since I've recompiled Python with gcc-4.6 this issue also never occurred
>> again.'
>>
>> That comment doesn't really corroborate the reported bug.
>
> That comment was from me (I use 'octoploid' for blog trolling, etc.) and
> is wrong. The Firefox build issue happend again today. See also the rest
> of my mail:
>
>> (A similar issue also happens when building Firefox since v3.8.0. But
>> because Firefox's build process doesn't raise an exception it just
>> dies at random points without giving a clue.)
>
> Please note that both the Firefox build process and Portage (emerge)
> are implemented in Python.
Based on the other reports from Mikael and David, I suspect this problem
may have to do with my commit 699390354da6c258b65bf8fa79cfd5feaede50b6:
pty: Ignore slave pty close() if never successfully opened
This commit poisons the pty under certain error conditions that may
occur from parallel open()s (or parallel close() with pending write()).
It's unclear to me which error condition is triggered and how user-space
got an open file descriptor but that seems the most likely. Is the problem
reproducible enough that a debug patch would likely trigger?
Regards,
Peter Hurley
next prev parent reply other threads:[~2013-06-07 15:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 11:54 Strange intermittent EIO error when writing to stdout since v3.8.0 Markus Trippelsdorf
2013-06-06 14:18 ` Peter Hurley
2013-06-06 14:37 ` Markus Trippelsdorf
2013-06-07 15:39 ` Peter Hurley [this message]
2013-06-07 16:07 ` Markus Trippelsdorf
2013-06-07 18:22 ` Mikael Pettersson
2013-06-13 10:39 ` Markus Trippelsdorf
2013-06-13 14:16 ` Peter Hurley
2013-06-13 14:51 ` Markus Trippelsdorf
2013-06-13 15:25 ` [PATCH] tty: Debug EIO from write() Peter Hurley
2013-06-13 16:16 ` Markus Trippelsdorf
2013-06-13 16:29 ` Peter Hurley
2013-06-13 19:56 ` [PATCH] tty: Fix transient pty write() EIO Peter Hurley
2013-06-16 17:31 ` Mikael Pettersson
2013-06-07 19:56 ` Strange intermittent EIO error when writing to stdout since v3.8.0 David Howells
2013-06-11 22:14 ` Orion Poplawski
2013-06-13 10:38 ` Markus Trippelsdorf
2013-06-06 14:41 ` Mikael Pettersson
2013-06-06 17:31 ` David Howells
2013-06-06 18:41 ` Markus Trippelsdorf
2013-06-08 18:56 ` Rob Landley
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=51B1FEB1.8040103@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=dhowells@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=mikpe@it.uu.se \
/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