I ran into strange pty I/O issues with kernel 3.19-rc5 on Intel64 with dual-core and quad-core machines. I got random comparison failures with "make check -j NPROC" in GCC. Under kernel 3.19-rc5, part of GCC outputs got lost under heavy load and comparison failed. When I ran scripts manually, it looked fine. Revert commit 2ce3c10c0c3e0d418c1a7a4c838319ba42c75388 Author: Peter Hurley <peter@hurleysoftware.com> Date: Tue Dec 30 07:17:09 2014 -0500 Revert "tty: Fix pty master poll() after slave closes v2" This reverts commit c4dc304677e8d566572c4738d95c48be150c6606. This fix is superseded by commit 52bce7f8d4fc633c9a9d0646eef58ba6ae9a3b73, 'pty, n_tty: Simplify input processing on final close'. The final close now waits for input processing to complete before destroying the pty, so poll() does not need to special case this condition. Cc: Francesco Ruggeri <fruggeri@arista.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> fixes the problem for me.
Created attachment 173471 [details] A makefile to reproduce it On Linux/Intel64, set GCC-SOURCE-DIR in Makefile to master branch in gcc source tree: https://gcc.gnu.org/git/?p=gcc.git;a=summary # make # make check The bad kernel gives random errors like: FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 33) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 34) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 35) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 38) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 39) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 40) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 41) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 42) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 43) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 45) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 46) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 47) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 48) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 49) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for errors, line 50) FAIL: gfortran.dg/min_max_conformance.f90 -O (test for excess errors)
Revert commit 2ce3c10c0c3e0d418c1a7a4c838319ba42c75388 isn't sufficient for kernel 3.19.3.
Created attachment 173481 [details] attachment-27300-0.html Thanks for the bug report. This is part of a known problem that I'm working on. I'll be sure to cc you on the fix when it's ready. On Tue, Apr 7, 2015 at 8:38 PM, <bugzilla-daemon@bugzilla.kernel.org> wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=96311 > > --- Comment #2 from H.J. Lu <hjl.tools@gmail.com> --- > Revert commit 2ce3c10c0c3e0d418c1a7a4c838319ba42c75388 isn't sufficient > for kernel 3.19.3. > > -- > You are receiving this mail because: > You are on the CC list for the bug. >
Created attachment 173721 [details] Tested fix I tested the attached fix on 4.0-rc7 and the gcc testsuite passes (or rather the tests that failed were not due to broken pty i/o).
(In reply to Peter Hurley from comment #4) > Created attachment 173721 [details] > Tested fix > > I tested the attached fix on 4.0-rc7 and the gcc testsuite passes (or rather > the tests that failed were not due to broken pty i/o). I have verified that this patch works on 4.0-rc7. Thanks.
(In reply to H.J. Lu from comment #5) > I have verified that this patch works on 4.0-rc7. Thanks. Great! Thanks for testing. Please reply to the v2 patch email with: Tested-by: H.J. Lu <hjl.tools@gmail.com>
The same patch also works on kernel 3.19.3-200 from Fedora 21.
Any progress on this to get this upstreamed? I don't see the patch even in 4.1-rc2 ...