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 for resolving symlinks on Windows from multiple processes simultaneously #1465

Merged

Conversation

marktucker
Copy link
Contributor

Attempt to fix issue where two threads or processes may try to read a Windows
symlink location at the same time. The file handle was being created without
any sharing flag. And although we keep the file open only very briefly, this
could still disrupt another process from reading the same symlink at the
same time.

Description of Change(s)

Add a FILE_SHARE_READ flag to the CreateFile call that is used to open a symlink location on Windows. This failure was manifesting as a rare intermittent failure to properly resolve a file path inside a symlinked directory on Windows when running many simultaneous processes reading and writing USD files inside this symlinked directory.

… Windows

symlink location at the same time. The file handle was being created without
any sharing flag. And although we keep the file open only very briefly, this
could still disrupt another process from reading the same symlink at the
same time.
@jilliene
Copy link

jilliene commented Mar 2, 2021

Filed as internal issue #USD-6588

@pixar-oss pixar-oss merged commit 78666cd into PixarAnimationStudios:dev Mar 19, 2021
marktucker added a commit to sideeffects/USD that referenced this pull request Mar 12, 2022
…rAnimationStudios#1580 (presumably by accident).

Add a FILE_SHARE_READ flag to the CreateFile call that is used to open a symlink location on Windows. This failure was manifesting as a rare intermittent failure to properly resolve a file path inside a symlinked directory on Windows when running many simultaneous processes reading and writing USD files inside this symlinked directory.
marktucker added a commit to sideeffects/USD that referenced this pull request Mar 12, 2022
…rAnimationStudios#1580 (presumably by accident).

Add a FILE_SHARE_READ flag to the CreateFile call that is used to open a symlink location on Windows. This failure was manifesting as a rare intermittent failure to properly resolve a file path inside a symlinked directory on Windows when running many simultaneous processes reading and writing USD files inside this symlinked directory.
pixar-oss added a commit that referenced this pull request Mar 31, 2022
Reapply fix from #1465 that was reverted by #1580

(Internal change: 2223690)
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.

5 participants