-
Notifications
You must be signed in to change notification settings - Fork 66
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
os.Stat() return error for socket file in 20H2 Windows image & does not work for symlink points to a dir (in all Windows version) #97
Comments
Another discovery is os.Stat() does not work (no matter which version of Windows) on symlink that points to a dir. |
looks like there are a number of issues related to the stdlib os.Stat: if alternatively, you can write your own local wrapper that imports and uses e.g. the |
@immuzz @vrapolinario Any updates here? |
Starting internal investigation on this. |
os.Stat() seems ok for symlink on ltsc 2019 I just tested. (will confirm 20H2 later). But for Windows container, if it checks symlink point to a different disk partition, it will not work. I put details in this doc https://docs.google.com/document/d/1hMn2LwFjXDbIzn3ZK_xiw4eNYnAajTIIyRXyQKaKa20/ |
Quick update that we're still investigating this issue internally. |
For internal MS folks: Bug filled: Bug 32905775 |
Sorry for the delay on this. Here's the result from the internal investigation: The os.Stat() implementation never should have worked. Windows had a short-term regression during which the os.Stat() implementation worked OK with socket files on some versions (Server 2019), accidentally. Current versions (20H2 and forward) of Windows function correctly. We strongly recommend that os.Stat() should handle the error case STATUS_IO_REPARSE_TAG_NOT_HANDLED and respond by opening the file with the FILE_OPEN_REPARSE_POINT flag specified.
|
While testing the new 20H2 windows image, we discovered that golang function os.Stat() always return error when checking a socket file. See the error message
The text was updated successfully, but these errors were encountered: