Bug 96311 - [3.19 regression] Random "make check -j8" failures with kernel 3.19-rc5
Summary: [3.19 regression] Random "make check -j8" failures with kernel 3.19-rc5
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Serial (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Peter Hurley
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-07 22:50 UTC by H.J. Lu
Modified: 2017-06-09 12:42 UTC (History)
6 users (show)

See Also:
Kernel Version: 3.19
Tree: Mainline
Regression: No


Attachments
A makefile to reproduce it (8.92 KB, text/plain)
2015-04-07 22:58 UTC, H.J. Lu
Details
attachment-27300-0.html (1.01 KB, text/html)
2015-04-08 01:00 UTC, Peter Hurley
Details
Tested fix (8.72 KB, patch)
2015-04-10 13:21 UTC, Peter Hurley
Details | Diff

Description H.J. Lu 2015-04-07 22:50:35 UTC
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.
Comment 1 H.J. Lu 2015-04-07 22:58:42 UTC
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)
Comment 2 H.J. Lu 2015-04-08 00:38:44 UTC
Revert commit 2ce3c10c0c3e0d418c1a7a4c838319ba42c75388 isn't sufficient
for kernel 3.19.3.
Comment 3 Peter Hurley 2015-04-08 01:00:56 UTC
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.
>
Comment 4 Peter Hurley 2015-04-10 13:21:19 UTC
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).
Comment 5 H.J. Lu 2015-04-10 14:43:44 UTC
(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.
Comment 6 Peter Hurley 2015-04-10 14:49:37 UTC
(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>
Comment 7 H.J. Lu 2015-04-10 17:28:55 UTC
The same patch also works on kernel 3.19.3-200 from Fedora 21.
Comment 8 Jakub Jelinek 2015-05-05 09:54:43 UTC
Any progress on this to get this upstreamed?  I don't see the patch even in 4.1-rc2 ...

Note You need to log in before you can comment on or make changes to this bug.