Hi folks, it is not quite Rust question, but hopefully someone knows the answer.
I accidentally wrote an app that seems to behave like Row hammer - Wikipedia
The issue is that an app must behave as memory-hard function, so it is kind of by design. What I'm wondering is whether there are some software tricks that can decrease probability of this happening.
What I see specifically is that under heavy memory-bound load I can cause some in-memory data to have unexpected values causing unexplainable panics. I'm fairly certain at this point that the bug is not the algorithm, after restart with the same inputs I do not get the crash anymore.
My system is 13900K processor with Crucial Balistix DDR4 RAM running at XMP profile (3600MHz CL16) that I also used with 5900X processor before for a few years and never observed any memory-related issues until I started happering it with this app. OS/CPU do not detect any memory-related errors either.
Just to make sure it is not memory I ran
memtester for 2 hours and then 3 full passes of memtest86+ (12.5 hours) and neither found any issues.
While I can capture panics around this code and handle them gracefully in the app, it is not guaranteed which memory will be corrupted. I had my compute freeze once because of this thing
Any ideas are welcome.