The bug is easiest to repro and work with if you have written some code that triggers the bug. Hopefully with high accuracy. If the bug only occurs sometimes it's either a memory bug or a threading bug. Don't be afraid to insert useless for loops into the code to force the bug to appear more often. If it's a memory bug try to repro the bug with as little as possible happening after boot. QEMU starts all memory as zero initialized and also we want to narrow down the potential code sights involved.