Messages in this thread | | | Date | Sat, 08 Jun 2013 13:56:01 -0500 | From | Rob Landley <> | Subject | Re: Strange intermittent EIO error when writing to stdout since v3.8.0 |
| |
On 06/06/2013 06:54:17 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: ... > 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.
I tracked down and fixed something like this in the User Mode Linux tty implementation many moons ago.
The trick to making it reproducible was to rename a copy of the xterm binary to somethingunique, run a shell in said xterm (because "cat" doesn't exercise the tty logic, that's why), run a thing in there producing test output, and have a loop in another window doing "while true; do killall -STOP somethingunique; sleep 1; killall -START somethingunique; sleep 1; done".
This forces the pipe buffer to the pty to fill up and exercise the flow control logic, plus all the fun "short write and retry" stuff...
Rob
| |