public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Strange intermittent EIO error when writing to stdout since v3.8.0
@ 2013-06-06 11:54 Markus Trippelsdorf
  2013-06-06 14:18 ` Peter Hurley
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Markus Trippelsdorf @ 2013-06-06 11:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Jiri Slaby

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

Basically 'emerge' just writes the build output to stdout in a loop:
...
def _output_handler(self, fd, event):

       background = self.background
       stdout_fd = self.stdout_fd
       log_file = self._log_file 

       while True:
               buf = self._read_buf(fd, event)

               if buf is None:
                       # not a POLLIN event, EAGAIN, etc...
                       break

               if not buf:
                       # EOF
                       self._unregister()
                       self.wait()
                       break

               else:
                       if not background and stdout_fd is not None:
                               failures = 0
                               stdout_buf = buf
                               while stdout_buf:
                                       try:
                                               stdout_buf = \
                                                       stdout_buf[os.write(stdout_fd, stdout_buf):]
                                       except OSError as e:
                                               if e.errno != errno.EAGAIN:
                                                       raise
				...

see: https://bugs.gentoo.org/show_bug.cgi?id=459674

(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.)

Now the question is: Could this be a kernel bug? Maybe in the TTY layer?

Unfortunately the issue is not easily reproducible and a git-bisect is
out of the question.

-- 
Markus

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-06-16 17:34 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox