AMD Ryzen Segfault Testing during GCC Compiling.

Sunday October 22nd to the 23rd, 2017.

For me, this is a very important question.  During compiling with GCC, is the system stable?  I read a lot about it on AMD's Community Forum and I was wondering how widespread the issue is and how likely it would be for a person building a new system now,  7 months after introduction.  The easiest way to test this condition is with Marc Suaefar's script located on his Github Page.  It's an easy download and execution.  I did so and here's a copy of my terminal session:

Extract GCC sources
Download prerequisites
2017-10-22 18:17:43 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 [2383840] -> "./gmp-6.1.0.tar.bz2" [1]
2017-10-22 18:17:44 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2 [1279284] -> "./mpfr-3.1.4.tar.bz2" [1]
2017-10-22 18:17:45 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz [669925] -> "./mpc-1.0.3.tar.gz" [1]
2017-10-22 18:17:47 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2 [1626446] -> "./isl-0.16.1.tar.bz2" [1]
gmp-6.1.0.tar.bz2: OK
mpfr-3.1.4.tar.bz2: OK
mpc-1.0.3.tar.gz: OK
isl-0.16.1.tar.bz2: OK
All prerequisites downloaded successfully.
cat /proc/cpuinfo | grep -i -E "(model name|microcode)"
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
model name    : AMD Ryzen 7 1800X Eight-Core Processor
microcode    : 0x8001129
sudo dmidecode -t memory | grep -i -E "(rank|speed|part)" | grep -v -i unknown
    Speed: 2400 MHz
    Part Number: F4-2400C15-16GFXR
    Rank: 2
    Configured Clock Speed: 1200 MHz
    Speed: 2400 MHz
    Part Number: F4-2400C15-16GFXR
    Rank: 2
    Configured Clock Speed: 1200 MHz
    Speed: 2400 MHz
    Part Number: F4-2400C15-16GFXR
    Rank: 2
    Configured Clock Speed: 1200 MHz
    Speed: 2400 MHz
    Part Number: F4-2400C15-16GFXR
    Rank: 2
    Configured Clock Speed: 1200 MHz
uname -a
Linux ryzen7 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
cat /proc/sys/kernel/randomize_va_space
2
/ /mnt/ramdisk/workdir
/mnt/ramdisk/workdir
Using 16 parallel processes
[KERN] -- Logs begin at Sun 2017-10-22 11:10:45 PDT. --
[KERN] Oct 22 17:56:44 ryzen7 kernel: nouveau 0000:28:00.0: DRM: DDC responded, but no EDID for DVI-I-1
[KERN] Oct 22 18:12:53 ryzen7 kernel: zram: Added device: zram0
[KERN] Oct 22 18:12:53 ryzen7 kernel: zram0: detected capacity change from 0 to 68719476736
[KERN] Oct 22 18:12:54 ryzen7 kernel: EXT4-fs (zram0): mounted filesystem with ordered data mode. Opts: discard
[KERN] Oct 22 18:13:22 ryzen7 kernel: zram: Cannot change disksize for initialized device
[loop-0] Sun Oct 22 18:17:48 PDT 2017 start 0
[loop-1] Sun Oct 22 18:17:49 PDT 2017 start 0
[loop-2] Sun Oct 22 18:17:50 PDT 2017 start 0
[loop-3] Sun Oct 22 18:17:51 PDT 2017 start 0
[loop-4] Sun Oct 22 18:17:52 PDT 2017 start 0
[loop-5] Sun Oct 22 18:17:53 PDT 2017 start 0
[loop-6] Sun Oct 22 18:17:54 PDT 2017 start 0
[loop-7] Sun Oct 22 18:17:55 PDT 2017 start 0
[loop-8] Sun Oct 22 18:17:56 PDT 2017 start 0
[loop-9] Sun Oct 22 18:17:57 PDT 2017 start 0
[loop-10] Sun Oct 22 18:17:58 PDT 2017 start 0
[loop-11] Sun Oct 22 18:17:59 PDT 2017 start 0
[loop-12] Sun Oct 22 18:18:00 PDT 2017 start 0
[loop-13] Sun Oct 22 18:18:01 PDT 2017 start 0
[loop-14] Sun Oct 22 18:18:02 PDT 2017 start 0
[loop-15] Sun Oct 22 18:18:03 PDT 2017 start 0
[KERN] Oct 22 18:18:25 ryzen7 kernel: show_signal_msg: 4 callbacks suppressed
[KERN] Oct 22 18:18:25 ryzen7 kernel: bash[21819]: segfault at 40e3d7c8 ip 0000000000485d57 sp 00007fff02d6f640 error 4 in bash[400000+f4000]
[loop-4] Sun Oct 22 18:18:26 PDT 2017 build failed
[loop-4] TIME TO FAIL: 38 s
[KERN] Oct 22 18:18:32 ryzen7 kernel: nouveau 0000:28:00.0: DRM: DDC responded, but no EDID for DVI-I-1
[loop-1] Sun Oct 22 18:19:30 PDT 2017 build failed
[loop-1] TIME TO FAIL: 102 s
[KERN] Oct 22 18:19:30 ryzen7 kernel: bash[24648]: segfault at af5908 ip 000000000041d989 sp 00007ffe00c431b8 error 6 in bash[400000+f4000]
[loop-10] Sun Oct 22 18:20:03 PDT 2017 build failed
[loop-10] TIME TO FAIL: 135 s
[KERN] Oct 22 18:20:03 ryzen7 kernel: bash[4672]: segfault at eeff89 ip 00007fac97d8d694 sp 00007ffe60001590 error 6 in libc-2.23.so[7fac97c28000+1c0000]
[loop-12] Sun Oct 22 18:51:47 PDT 2017 build failed
[loop-12] TIME TO FAIL: 2039 s
[KERN] Oct 22 18:51:47 ryzen7 kernel: traps: bash[13646] trap invalid opcode ip:48db90 sp:7ffeb8c397e8 error:0
[KERN] Oct 22 18:51:47 ryzen7 kernel:  in bash[400000+f4000]
[loop-2] Sun Oct 22 20:46:00 PDT 2017 build failed
[loop-2] TIME TO FAIL: 8892 s
[KERN] Oct 22 20:46:00 ryzen7 kernel: traps: bash[10023] trap invalid opcode ip:41d98e sp:7ffcbeb2f6a8 error:0
[KERN] Oct 22 20:46:00 ryzen7 kernel:  in bash[400000+f4000]
[loop-3] Sun Oct 22 21:14:01 PDT 2017 build failed
[loop-3] TIME TO FAIL: 10573 s
[loop-15] Sun Oct 22 21:15:59 PDT 2017 build failed
[loop-15] TIME TO FAIL: 10691 s
[KERN] Oct 22 21:15:59 ryzen7 kernel: bash[22025]: segfault at 39 ip 00000000004b9dec sp 00007ffd937de718 error 4 in bash[400000+f4000]
[KERN] Oct 22 21:18:39 ryzen7 kernel: nouveau 0000:28:00.0: DRM: DDC responded, but no EDID for DVI-I-1
[loop-7] Sun Oct 22 21:21:38 PDT 2017 start 1
[loop-5] Sun Oct 22 21:21:39 PDT 2017 start 1
[loop-8] Sun Oct 22 21:21:46 PDT 2017 start 1
[loop-6] Sun Oct 22 21:21:46 PDT 2017 start 1
[loop-9] Sun Oct 22 21:21:53 PDT 2017 start 1
[loop-0] Sun Oct 22 21:21:53 PDT 2017 start 1
[loop-13] Sun Oct 22 21:22:02 PDT 2017 start 1
[loop-11] Sun Oct 22 21:22:05 PDT 2017 start 1
[loop-5] Sun Oct 22 21:22:11 PDT 2017 build failed
[loop-5] TIME TO FAIL: 11063 s
[KERN] Oct 22 21:22:11 ryzen7 kernel: bash[32615]: segfault at 0 ip 00007f27bc6d4746 sp 00007fff7504e040 error 4 in libc-2.23.so[7f27bc649000+1c0000]
[loop-14] Sun Oct 22 21:22:14 PDT 2017 start 1
^C
me@ryzen7:~/Downloads$ [KERN] Oct 22 21:34:22 ryzen7 kernel: nouveau 0000:28:00.0: DRM: DDC responded, but no EDID for DVI-I-1

To my surprise, it only took 39 seconds for the first segfault with the second appearing within 102 seconds.  After recovering from my initial shock, I decided to run a few more tests.  The first was to do a simple kernel compile in 16.04.3 with 16 threads and the second was to do another run with Marc's test, but this time with only 4 concurrent compiles with each taking 4 threads.  The single kernel compile completed without issue (albeit a short test) and the 4x4 test resulted in a segfault within the first 5 minutes.  Since Ubuntu 16.04.3 is using the 4.10 kernel, and Ubuntu 17.10 was just released using the 4.12 kernel line, for completeness, I decided to upgrade to 17.10 and perform Marc's test one more time.  The upgrade went fine, but the test failed with segfaults within the first 2 minutes - killing the terminal window in which the test was running.

I decided to table this issue for now and continue testing.

To discuss this article click here.

Next up - Are there random reboots and MCE errors?