Programster's Blog

Tutorials focusing on Linux, programming, and open source

Stabilizing Ubuntu 16.04 on Ryzen

I've had stabilitiy issues on my Ryzen machine for quite some time now and I've just put up with them as they weren't too frequent.

This weekend I "downgraded" from Ubuntu 17.04 to Ubuntu 16.04 LTS because 16.04.3 is now out with the 4.10 kernel which I installed directly to, rather than installing and then upgrading. This gets me back on the LTS line with a later kernel, so I thought the stability issue would have been resolved, but ufortunately it seemed to have gotten worse, freezing several times whilst I was moving KVM guests around.

To try and address the issue, after having updated the bios firmware on my Asus prime B350-Plus yet again (3rd time now), I disabled c-states after a suggestion found online. I thought this had resolved it as the system lasted quite a while before it froze again (hard to prove a negative). After that, I disabled SMT after reading this post.

The system hasn't crashed since (fingers crossed). Hopefully when Ubuntu 18.04 LTS comes around these issues will have been resolved, or another firmware update will do the trick.

I'll be sure to update this post if it crashes again or perform any additional steps. Let me know if this worked for you or if you are still having problems. Be sure to mention your distro and kernel version.

Update 24th August 2017

Woke up and found that the server still had the issue so it appears that disabling c-states and SMT alone is not enough.

Status: Still unstable.

Disabling ASLR

After reading a few comments disabling ASLR preventing one of the types of crash, I decided to disable it by running the followign commands as root.

# disable in current session
echo 0 | tee /proc/sys/kernel/randomize_va_space

# make change permanent (across reboots)
echo 0 > /etc/sysctl.d/01-disable-aslr.conf

References