Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vfs.OpenFile is not thread safe #8

Open
puellanivis opened this issue Sep 10, 2022 · 0 comments
Open

vfs.OpenFile is not thread safe #8

puellanivis opened this issue Sep 10, 2022 · 0 comments

Comments

@puellanivis
Copy link

vfs.OpenFile contains many mutations of the underlying pbFS that are not performed under lock. Of particular note, the mutation of fs.data during file creation although there are also numerous modifications made to the underlying sealedFile that also are done without holding a mutex.

This could lead to unpredictable behavior in multithreaded contexts (which is includes any and all HTTP services) as two data file creations could race against each other potentially returning an alias of the other’s underlying sealedFile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant