Curious hardware failure troubleshooting

Today I was finishing a gentoo install on my living room computer when I kept getting compiler internal segfaults when compiling certain packages. The most obvious cases were GCC and SQLite.

I tried everything I could and knew about: memtest, used one stick of RAM at a time, downgraded to a non beta BIOS, put the CPU(3700X) in eco mode, cleared USE flags, etc. Nothing seemed to work and GCC kept segfaulting at random locations.

Then I started investigating the power supply, as it had come from my main pc. I replaced it because of some crashes which I attributed to upgrading to a 5950x and overloading its 12V rails. I stress tested the CPU, and GPU(vega64) separately and together, it passed with no crashes or visible errors in dmesg or the journal.

Then I tried compiling gcc again and it worked? I thought it was strange but then I noticed I had left es2gears(glxgears) running in the background. I closed it and tried compiling SQLite, it failed. I start es2gears, try to compile SQLite and it works. I repeat this exercise three more times and the pattern repeats itself.

My only guess is that some power transients due to bad caps are causing memory or CPU issues that do not crash the system outright but will obviously cause issues in some processes. Having the GPU pulling 100W somehow evens out the power distribution which helps.

I even compiled the kernel without issues, which I attribute to being a very constant balanced load, whereas GCC stops and starts some functions constantly which cause the spikes.

Tomorrow a new PSU arrives and I will be able to tell for sure if it was the issue in the end :smiley:

When I upgraded from the 3700x to the 5950x I even bought a new motherboard because I kept getting crashes in darktable when executing certain functions. It went away with the new motherboard but I guess only because it was better at dealing with transients from the PSU. Could’ve saved a lot of money on the way if I went straight to the PSU back then…

Hopefully the power supply solves it for you! Otherwise, that’s weird :hot_face:

2 Likes

So… It wasn’t the PSU, not the whole problem at least. The GPU I’m using, an old Vega 64, now boosts normally and doesn’t stay stuck in low power mode and my mouse is not constantly have its USB dongle reset.

It seems to have been AMD’s PBO which for some reason is enabled by default when set to “Auto” and even “Eco Mode”. It’s only eco when it comes to all core loads. Single core will still have its boost behavior at default or even boosted. I disabled it and set an all core overclock at 4GHz@1.25V. Voilà, lower temperatures, no segfaults, the only downside being losing 0.4GHz of single core boosts. Multicore is still the same for this CPU at 4GHz all core.

This issue has most likely been with the motherboard/cpu since the beginning, it just never materialized with the workloads I gave it. I have a very early batch 3700X which came with these issues as the process was still maturing. Turns out you need to compile GCC or SQLite to find these things out. Even CPU benchmarks, demanding video games, compiling the kernel, compiling all kinds of different software, darktable, etc, ran fine. (maybe data corruption I haven’t found yet?).

As to why loading the GPU stabilizes the power delivery and prevents these errors I have no idea, some electrical engineering magic.

4 Likes