-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
SymLinksMayExistIndependentlyOfTarget failure #65119
Comments
Tagging subscribers to this area: @dotnet/area-system-io Issue Details
'System.IO.FileSystem.Tests' from job 3683fd05-6451-4dba-848b-64f9d459eac3 workitem 46af4fdd-dcb6-4ead-9081-44d83202df31 (windows.10.amd64.open.rt) executed on machine a009Z5S hit in #64677
|
// Now delete the symlink.
File.Delete(linkPath);
Assert.False(File.Exists(linkPath), "linkPath should no longer exist"); odd |
I was thinking on name collision but that can't be the case for this test, this is how
Even though |
The way Windows handles file deletes has been a bit unintuitive to me in the past, and I believe changed at one point. @JeremyKuhne may have thoughts. |
Another possibility perhaps is that the delete failed for some reason and we ate the error somehow |
FWIW the only error we eat on Delete is File Not Found. runtime/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Windows.cs Lines 99 to 106 in ccd67b0
|
For NTFS the name would not be freed for use until all file handles were closed. It changed in 1903- we have tests that check this behavior: runtime/src/libraries/System.IO.FileSystem/tests/FileStream/ctor_str_fm_fa_fs.delete.cs Lines 115 to 119 in 57bfe47
|
Maybe this is pre-1903 and it was a virus checker or something. |
@JeremyKuhne does this imply that @danmoseley CI says windows.10.amd64.open.rt, matching that to the list in https://helix.dot.net/ (ctrl+f) shows:
I don't know how to check if that is pre-1903 cc @dotnet/area-infrastructure-libraries |
I believe so. And 2016 is way before 1903 (2019 March). |
@JeremyKuhne, thanks. Will close this issue as it is non actionable for us IMO. |
@MattGal does anything like a virus checker run on these Server 2016 machines? Something that could grab random handles and potentially defeat deleting things. |
Any SKU that's effectively Windows 8 or newer has anti-virus stuff that you can't defeat even if it's a throwaway machine only used for testing. More recently, we've started allowing (because we absolutely must and it's unfortunately not up for debate... would that it were) Azure Security Pack and Geneva Monitoring onto the machines. These are services that can try to reconfigure antivirus as well as perform their own scans on the machine. When you combine this with enough executions, the behavior you're suspecting is pretty darn likely to be the case. See https://github.com/dotnet/core-eng/issues/15161 for more details. One thing to note though, is that people who would run this test locally are also likely to have some form of antivirus turned on, and hardening the tests to both understand and tolerate this is likely the only long term solution that keeps us off automatic-scanning radar. |
Thanks that makes it clear. OK if this happens again I'll put some retry around it. Right now there's zero evidence that this line is more likely to need a retry than any of the other places. |
@jozkee what do you recommend here? this is |
A retry should be the best. This kind of failure is not exclusive to this unit test. The same happens on this other one that exercises the same assert:
|
Only 1 hit in last 60 days (as of 7/22). |
Frequency:
Runfo query for last 60 days (incl. PRs) with less hits than Kusto (from unknown reason)
'System.IO.FileSystem.Tests' from job 3683fd05-6451-4dba-848b-64f9d459eac3 workitem 46af4fdd-dcb6-4ead-9081-44d83202df31 (windows.10.amd64.open.rt) executed on machine a009Z5S
hit in #64677
The text was updated successfully, but these errors were encountered: