Hey Armon,
My name is Rom and I'm working with Motty.
We just upgraded to v0.8.4 (from 0.6.4) and started running into this issue again (after some research, seems that it's not related to the upgrade).
What actually happens is that we have tests which crash nodes where consul is running, and apparently, our crash timings fits exactly into consul raft performing snapshots (approx 10m after consul starts). BTW, is there any sequence of events that causes the snapshot to be written to disk? Or is it time dependent? Where is it configured?
Anyhow, looking into the raft code and digging in some linux blogs, I started wandering whether your snapshot reaping (from .tmp to full dirctory) is safe enough.
According to some sources, at least if I got it right, you should both fsync the source dir and the dest dir while renaming, otherwise crash consistency is not guaranteed.
What happen in our case is the we get the dir renamed (without .tmp), and the metafile is written, but the state.bin file is empty).
But again, I might be wrong.
Thanks,
Rom