General Protection Fault Crash That I Can't Seem to Solve!

For the sake of the internet (and past me, who found this link 48 hours ago when trying to diagnose the same issue), I thought I would share my own experience.

I had similar issues with a new install of PVE 8.2.4 onto new hardware (N305 router). It was *almost* 100% stable, but partly crashed overnight with a GPF, leaving all of the VMs and containers running (including OPNSense VM), but the management console unresponsive. After several attempts to regain controlled, I ended up having to perform a "cycle BRS" to bring it back. ("big red switch")

To cut a long story short, the problem was the RAM. It was properly sourced from Crucial and the correct spec (DDR5 4800), but when I ran an extended memtest86 run on it, it finally returned a handful of errors after perhaps an hour of running. Same with memtester within PVE - no faults initially, but a handful after it had been running for a while.

RAM has been swapped to Crucial DDR5 5600 and all memory tests are now running clear and I'll be very surprised indeed if this does not fix my mild instability issues.

tl;dr: The problem is *always* DNS. Apart from when it's bad RAM.
 
To second @daern, I also finally tracked this down to memory. I rebuilt (scavenged) a bunch of working hardware to build a host with higher memory and core count. All components had worked error-free for years in different computers, so logic would dictate that putting them all together should work as well. The only time I would get this error was when Proxmox was installed. I ran Debian and Ubuntu for a week to test, and without any errors, and as soon as my first VM was running on Proxmox, boom, kernel error. I downgraded my DIMMs, and now all is/has been working well.

Looking into something else, I tripped across the root issue, identifying that my board is suited for 64 GB of memory (which I had verified before building Frankinhost) but maxed out at 16 GB DIMMs per lane. I had thrown in 2x32 GB DIMMs, which was the issue. Three weeks of head-banging, and it was that easy...

Code:
prox kernel: [40103.756436] traps: pvescheduler[105588] general protection fault ip:59c07da3917b sp:7ffec5215ec8 error:0 in perl[59c07d97d000+195000]