-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Draft: Try to identify the scenario that causes stat throw EINVAL in OSX #57502
Conversation
Tagging subscribers to this area: @maryamariyan, @dotnet/area-extensions-filesystem Issue DetailsRelated to #57221
|
which syscall gives us an EINVAL? |
@adamsitnik I suspect is stat since the call-stack in #57221 is related to validation of lstat and stat caches in FileSystem.Unix.cs. However I find it strange since there is no documentation stating that stat is capable of throwing EINVAL. You can look at the conversation I had with Dan for context #57221 (comment). I also find it very strange that it only fails in macOS/OSX. |
Based on the latest helix log, I think we can be more certain that the issue is in the stat performed in
And judging by the filename which shows the test in which is being created (UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink_TargetDeleted_133_4d15e445), it might have something to do with the symlink ceasing to exist between lstat (line 354) and stat (line 365). cc @carlossanlop runtime/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.Unix.cs Lines 345 to 369 in c0fc818
I'm still curious why this happens only on macOS 1014 and 1015, I've stressed calling stat with multiple invalid paths on macOS BigSur 11.5.2 but none has returned me the error "Invalid argument"/EINVAL. |
Closing as I was finally able to repro locally, see #57221 (comment). |
Related to #57221