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

Windows: Remove OVERLAPPED IO flag, it is not required and seems to cause concurrency problems #2725

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

Mytherin
Copy link
Collaborator

@Mytherin Mytherin commented Dec 2, 2021

Follow up from #2691, apparently the current code still causes problems when concurrent reads happen in a multithreading context. I cannot figure out why, and nothing in the documentation states the way we use the Windows API is incorrect (in fact, the way we use the Windows API is almost exactly copied from Microsoft's own manual). Yet somehow the overlapped results still provide problems when used concurrently.

Removing the OVERLAPPED IO flag entirely seems to resolve the problem for me on my Windows machine. I had to pull ye olde steam powered laptop out of the attic, since the problem only seems to occur in low RAM situations. Thanks @SartorialOffense for providing an extensive example that I could use to track down this issue and fix it!

This should hopefully actually fix #2668, #2661, #2344.

@SartorialOffense
Copy link

Excellent! I will spin up tests tonight.

@Mytherin Mytherin merged commit e6cd30e into duckdb:master Dec 3, 2021
@Mytherin Mytherin deleted the removeoverlappedio branch December 3, 2021 14:23
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

Successfully merging this pull request may close these issues.

Odd behaviour in R - Windows
2 participants