Random crashes on Ubuntu 18.04 with Ryzen 2700x

Title pretty much says it all.

Some background - My previous system was an AMD FX-8320 with 8GB of RAM, pretty old so I decided to do a bit upgrade and bought myself a fancy new processor and whatnot. The full spec list is here (pcpartpicker). I went ahead and installed the hardware, keeping the same SSD that my Ubuntu 18.04 install runs off of (currently on kernel 4.18.7). But of course I’ve hit a bit of a snag.

Randomly, my desktop crashes completely, forcing me to do a hard reboot. Here’s what I believe are the relevant logs that happened right before I hard restarted my machine - I can’t make heads or tails of it since I’m not exactly a kernel/hardware guy but I want to at least find out what the root cause of this could be.

Sep 14 18:10:08 desktop kernel: [ 2806.901248] mce: [Hardware Error]: Machine check events logged
Sep 14 18:10:08 desktop kernel: [ 2806.901251] [Hardware Error]: Corrected error, no action required.
Sep 14 18:10:08 desktop kernel: [ 2806.901256] [Hardware Error]: CPU:7 (17:8:2) MC3_STATUS[-|CE|MiscV|-|-|-|-|SyndV|-]: 0x9820000000000150
Sep 14 18:10:08 desktop kernel: [ 2806.901261] [Hardware Error]: IPID: 0x000300b000000000, Syndrome: 0x000000002a000503
Sep 14 18:10:08 desktop kernel: [ 2806.901264] [Hardware Error]: Decode Unit Extended Error Code: 0
Sep 14 18:10:08 desktop kernel: [ 2806.901265] [Hardware Error]: Decode Unit Error: uop cache tag parity error.
Sep 14 18:10:08 desktop kernel: [ 2806.901267] [Hardware Error]: cache level: RESV, tx: INSN, mem-tx: IRD
Sep 14 19:12:23 desktop kernel: [ 6542.407892] mce: [Hardware Error]: Machine check events logged
Sep 14 19:12:23 desktop kernel: [ 6542.407895] [Hardware Error]: Corrected error, no action required.
Sep 14 19:12:23 desktop kernel: [ 6542.407900] [Hardware Error]: CPU:9 (17:8:2) MC3_STATUS[-|CE|MiscV|-|-|-|-|SyndV|-]: 0x9820000000000150
Sep 14 19:12:23 desktop kernel: [ 6542.407904] [Hardware Error]: IPID: 0x000300b000000000, Syndrome: 0x000000002a000503
Sep 14 19:12:23 desktop kernel: [ 6542.407907] [Hardware Error]: Decode Unit Extended Error Code: 0
Sep 14 19:12:23 desktop kernel: [ 6542.407909] [Hardware Error]: Decode Unit Error: uop cache tag parity error.
Sep 14 19:12:23 desktop kernel: [ 6542.407911] [Hardware Error]: cache level: RESV, tx: INSN, mem-tx: IRD
Sep 14 19:22:46 desktop kernel: [ 7164.989156] mce: [Hardware Error]: Machine check events logged
Sep 14 19:22:46 desktop kernel: [ 7164.989159] [Hardware Error]: Corrected error, no action required.
Sep 14 19:22:46 desktop kernel: [ 7164.989164] [Hardware Error]: CPU:9 (17:8:2) MC3_STATUS[-|CE|MiscV|-|-|-|-|SyndV|-]: 0x9820000000000150
Sep 14 19:22:46 desktop kernel: [ 7164.989168] [Hardware Error]: IPID: 0x000300b000000000, Syndrome: 0x000000002a000503
Sep 14 19:22:46 desktop kernel: [ 7164.989171] [Hardware Error]: Decode Unit Extended Error Code: 0
Sep 14 19:22:46 desktop kernel: [ 7164.989172] [Hardware Error]: Decode Unit Error: uop cache tag parity error.
Sep 14 19:22:46 desktop kernel: [ 7164.989175] [Hardware Error]: cache level: RESV, tx: INSN, mem-tx: IRD

So update on this - I installed Windows and updated absolutely everything I possibly could (BIOS etc) and it seems to be running fine now. Have yet to reinstall Ubuntu (something later down the line).

Pro-tip:

Always make sure that you have the linux-firmware-nonfree packages installed; this may have a different name on Ubuntu. As a Debian user, when you are running bleeding edge, this will ensure that you get all firmware packages.

You may have run into an issue where your kernel was too new and the CPU microcode and firmware components were not running the latest and greatest, causing your lockups because the kernel is expecting something to be there that is not.