AnsweredAssumed Answered

gcc segmentation faults on Ryzen / Linux

Question asked by ahartmetz on May 8, 2017
Latest reply on Jul 10, 2019 by patrikx3



As a software guy, I compile a lot of code, and occasionally gcc crashes with a segmentation fault for no obvious reason. I seem to remember that the problem also manifested as illegal instruction errors sometimes but I'm not sure about that anymore.. I have a Ryzen 1800X CPU and Asus Prime B350-Plus mainboard with UEFI BIOS 0609 (latest). My RAM is on the QVL and running at 3200 MHz but that shouldn't matter.

There is a lot of information in this thread to which I did not contribute: Gentoo Forums :: View topic - Segfaults during compilation on AMD Ryzen.

I'll summarize it: Different people, different gcc versions, different optimization levels, different software compiled, different RAM clocks including very low ones, different Ryzen models and mainboard models, Some of them tried swapping several pieces of hardware to no avail.

I have little to add: I can reproduce the segfaults on Ubuntu 17.04. And nothing else crashes for me after the latest UEFI + AGESA update.

Mean time between crashes is about an hour when compiling continuously.


I think you should try hard to reproduce and fix this at AMD. Compiling anything on Linux with gcc while using all CPU threads should suffice.


Thanks in advance.

[Edited: reordered to be more coherent, removed redundancy]