Faulty disk results in SIGBUS/SIGSEGV panics
Previously we thought that all cryptic boltdb errors were caused by low disk space. However, it appears that mmap
'd files (like our consensus.db) can cause SIGBUS/SIGSEGV panics if the program accesses part of the file that resides on a faulty disk block. As such, I am reclassifying the following issues as "faulty disk" errors:
#2231 (closed)
#2220 (closed)
#1819 (closed)
And for Sia-UI:
https://github.com/NebulousLabs/Sia-UI/issues/738
https://github.com/NebulousLabs/Sia-UI/issues/708
https://github.com/NebulousLabs/Sia-UI/issues/700
https://github.com/NebulousLabs/Sia-UI/issues/690
These issues all mention SIGBUS, but an IO error may also cause SIGSEGV (at least, according to Wikipedia). I didn't mark those issues because SIGSEGV can also be caused by bolt failing to mmap enough space. We can clean up those issues later.
We should add signal handling to catch such errors and report them in a more actionable (and less scary) way. This shouldn't require much code.