People were reporting it only happens on some installs and takes up to five days to present itself. Considering that this was only released today it seems too premature to confirm that.
Whenever I fix a bug I wait for confirmation that the bug has actually been fixed before I submit the patch. Sometimes, especially when fixing race conditions that occur unpredictably, it takes a while to confirm that the bug has been fixed. Not that I'm skeptical - it seems like they're pretty confident that they've fixed it.
I took a look at them, and figured out what in the write path could have gone wrong to create the bad behavior. It turned out to be in db/log_writer.cc and deps.
I cannot promise there are no other bugs within Bitcoin or LevelDB, but this resolves one issue. I'm interested in seeing it tested in the wide area, just to make sure.
Of course, if there are other bugs, I'm just as happy to debug and squash them.
If the mapping maps data from a file (MAP_SHARED), then the memory will eventually be written back to disk if it's dirty. This will happen automatically at some point in the future (implementation dependent).
16 comments
[ 578 ms ] story [ 2951 ms ] threadI took a look at them, and figured out what in the write path could have gone wrong to create the bad behavior. It turned out to be in db/log_writer.cc and deps.
I cannot promise there are no other bugs within Bitcoin or LevelDB, but this resolves one issue. I'm interested in seeing it tested in the wide area, just to make sure.
Of course, if there are other bugs, I'm just as happy to debug and squash them.
Additionally, the statement you quote explicitly relates to private mappings. LevelDB uses shared mappings.
Your random quotes from man pages are out of context (and keep changing as you edit your posts).
Changes to private mappings aren't supposed to be reflected in the underlying file, so this statement is a bit of a truism.
Changes to shared mappings, on the other hand, are supposed to be reflected in the file, and that's what this article is about.
would really love a good talk or screencast that explains some of this stuff - anyone got one?
( i know its kind of sad i dont know this alread - its why im not a kernel dev tho :P )