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 ![]()
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…