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: fix race condition that causes spurious failures while adopting buckets #1987

Merged
merged 2 commits into from
Mar 2, 2019

Conversation

MonsieurNicolas
Copy link
Contributor

Description

This PR fixes a race condition where file descriptors are inherited by child processes (such as "gzip"), which causes some operations, such as renaming buckets to fail with a "file in use" error.

The fix here is to move to Windows 7+ APIs, that allow to whitelist which descriptors to pass to the child process, in our case we only need the descriptor for standard output.

@MonsieurNicolas MonsieurNicolas added this to In progress in v10.3.0 via automation Mar 1, 2019
@graydon
Copy link
Contributor

graydon commented Mar 1, 2019

How fun.

@graydon
Copy link
Contributor

graydon commented Mar 1, 2019

r+ 484eee7

this removes risk of having files in use by child processes
@MonsieurNicolas
Copy link
Contributor Author

didn't see the first #ifdef was an #ifndef

@MonsieurNicolas
Copy link
Contributor Author

r+ 13e9306

latobarita added a commit that referenced this pull request Mar 1, 2019
Windows: fix race condition that causes spurious failures while adopting buckets

Reviewed-by: MonsieurNicolas
@latobarita latobarita merged commit 13e9306 into stellar:master Mar 2, 2019
v10.3.0 automation moved this from In progress to Done Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v10.3.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants