Re: [FYI] GCC segfaults under heavy multithreaded compilation with AMD Ryzen

From: Andreas Hartmann
Date: Mon Jul 31 2017 - 14:01:45 EST


On 07/31/2017 at 02:10 PM Alan Cox wrote:
> On Wed, 26 Jul 2017 06:54:01 +0900
> Satoru Takeuchi <satoru.takeuchi@xxxxxxxxx> wrote:
>
>> # I'm a LKML subscriber, but not a x86 list subscriber
>>
>> I found the following new linux kernel bugzilla about Ryzen related problem.
>> Since many developers don't check this bugzilla and I've also
>> encountered this problem,
>> I decided to introduce this problem here.
>
> Historically we've seen exactly these symptoms on all kinds of systems
> where the memory is at fault, even in cases where memtest86 passes.
> Whether there's a specific problem on some Ryzen boards is a question for
> AMD, but if I saw this without knowing the CPU I'd suspect memory
> firstly. GCC it turns out is by accident an amazingly effective memory
> testing tool.

That's surely true. But meanwhile, I got rid of my memory problems (no
more traces like these [1] or even system hangs) by a correct memory
configuration, but the segfaults of gcc remain, most of the time with
kernel 4.12, kernel 4.11.x and 4.9.39ff are working mostly fine -
mostly, because I stopped tests and can't therefore say, if it's really
stable or not - but (k)aslr must be disabled always.

FreeBSD meanwhile provides this workaround after long research [2]:

https://reviews.freebsd.org/D11780

Please port it to Linux!


[1] https://www.spinics.net/lists/kernel/msg2565491.html
[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219399#c89