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

fix: drop mmap handles before modifying during handle_consistency #10708

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

joshieDo
Copy link
Collaborator

@joshieDo joshieDo commented Sep 4, 2024

should close #10689

Seems that windows locks files against writing when using mmap. When trying to heal from a sudden crash, we leave the mmap handles open as we prune the offset/data file, which probably causes the The requested operation cannot be performed on a file with a user-mapped section open. (os error 1224)

While this most likely closes the above issue, it has more serious implications. eg. What happens when a rpc starts reading data (using mmap), and at the same time the node is appending a new block? Probably crashes

@joshieDo joshieDo added C-bug An unexpected or incorrect behavior O-windows OS: Windows A-static-files Related to static files labels Sep 4, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these drops look a bit weird, perhaps we can achieve the same thing with scoping, but this works

@joshieDo joshieDo marked this pull request as ready for review September 9, 2024 16:21
@joshieDo joshieDo requested a review from shekhirin as a code owner September 9, 2024 16:21
@joshieDo joshieDo added this pull request to the merge queue Sep 11, 2024
Merged via the queue into main with commit 1c53518 Sep 11, 2024
35 checks passed
@joshieDo joshieDo deleted the joshie/windowsmm branch September 11, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-static-files Related to static files C-bug An unexpected or incorrect behavior O-windows OS: Windows
Projects
None yet
3 participants