Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
luv_fs: fix gc of string during a fs.write
In virgo we hit a bug that only revealed itself when we were writing out to a file over NFS. This is likely because the NFS write out took a relatively long time and revealed a race. Example corrupted text file: # ch0002 tests/tmp/0002.chk OK »A¿7—A ch0003 tests/tmp/0003.chk OK 1337118370 Notice that the fifth line is garbage. That is because the string was getting GC'd before it was written to disk. So, we need to ref the string so this doesn't happen just as we ref the callback function.
- Loading branch information
Brandon Philips
committed
May 15, 2012
1 parent
5befa91
commit eba20e7
Showing
2 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters