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

Microsoft.Extensions.FileProviders.Physical.Tests disabled on Unix systems #56190

Closed
tarekgh opened this issue Jul 22, 2021 · 5 comments · Fixed by #56915
Closed

Microsoft.Extensions.FileProviders.Physical.Tests disabled on Unix systems #56190

tarekgh opened this issue Jul 22, 2021 · 5 comments · Fixed by #56915
Assignees
Labels
area-Extensions-FileSystem disabled-test The test is disabled in source code against the issue
Milestone

Comments

@tarekgh
Copy link
Member

tarekgh commented Jul 22, 2021

https://github.com/dotnet/runtime/pull/56183/checks?check_run_id=3138813912
https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-56183-merge-f78074ea8e6047b2a6/Microsoft.Extensions.FileProviders.Physical.Tests/console.ac3f3b03.log?sv=2019-07-07&se=2021-08-11T22%3A22%3A03Z&sr=c&sp=rl&sig=ywBXxPkq8EuFYEZl2jIf5dvaPIqJDBOgm1Phou2QmU0%3D

Console log: 'Microsoft.Extensions.FileProviders.Physical.Tests' from job f78074ea-8e60-47b2-a6e4-961f30f8afa1 workitem 7254ea10-54b1-48a3-9672-5fbd419dfa26 (osx.1013.amd64.open) executed on machine dci-mac-build-083.local
+ ./RunTests.sh --runtime-path /tmp/helix/working/AB72097D/p
----- start Thu Jul 22 15:24:05 PDT 2021 =============== To repro directly: =====================================================
pushd .
/tmp/helix/working/AB72097D/p/dotnet exec --runtimeconfig Microsoft.Extensions.FileProviders.Physical.Tests.runtimeconfig.json --depsfile Microsoft.Extensions.FileProviders.Physical.Tests.deps.json xunit.console.dll Microsoft.Extensions.FileProviders.Physical.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================
/private/tmp/helix/working/AB72097D/w/A0CB0914/e /private/tmp/helix/working/AB72097D/w/A0CB0914/e
  Discovering: Microsoft.Extensions.FileProviders.Physical.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  Microsoft.Extensions.FileProviders.Physical.Tests (found 76 of 92 test cases)
  Starting:    Microsoft.Extensions.FileProviders.Physical.Tests (parallel test collections = on, max threads = 4)
Unhandled exception. System.IO.FileNotFoundException: Could not find file '/var/folders/vn/knn7pvpd2y12gn_qhnnzqps80000gy/T/nnep5noo.kpg/e4a4s2kc.z55'.
File name: '/var/folders/vn/knn7pvpd2y12gn_qhnnzqps80000gy/T/nnep5noo.kpg/e4a4s2kc.z55'
   at System.IO.FileSystem.ResolveLinkTarget(String linkPath, Boolean returnFinalTarget, Boolean isDirectory) in /_/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Unix.cs:line 603
   at Microsoft.Extensions.FileProviders.Physical.FileSystemInfoHelper.GetFileLinkTargetLastWriteTimeUtc(FileInfo fileInfo) in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/FileSystemInfoHelper.cs:line 54
   at Microsoft.Extensions.FileProviders.Physical.PollingFileChangeToken.GetLastWriteTimeUtc() in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs:line 57
   at Microsoft.Extensions.FileProviders.Physical.PollingFileChangeToken.get_HasChanged() in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs:line 101
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.RaiseChangeEvents(Object state) in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFilesWatcher.cs:line 437
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Timer.cs:line 673
   at System.Threading.TimerQueue.FireNextTimers() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Timer.cs:line 326
@dotnet-issue-labeler dotnet-issue-labeler bot added area-Extensions-FileSystem untriaged New issue has not been triaged by the area owner labels Jul 22, 2021
@ghost
Copy link

ghost commented Jul 22, 2021

Tagging subscribers to this area: @maryamariyan, @dotnet/area-extensions-filesystem
See info in area-owners.md if you want to be subscribed.

Issue Details

https://github.com/dotnet/runtime/pull/56183/checks?check_run_id=3138813912
https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-56183-merge-f78074ea8e6047b2a6/Microsoft.Extensions.FileProviders.Physical.Tests/console.ac3f3b03.log?sv=2019-07-07&se=2021-08-11T22%3A22%3A03Z&sr=c&sp=rl&sig=ywBXxPkq8EuFYEZl2jIf5dvaPIqJDBOgm1Phou2QmU0%3D

Console log: 'Microsoft.Extensions.FileProviders.Physical.Tests' from job f78074ea-8e60-47b2-a6e4-961f30f8afa1 workitem 7254ea10-54b1-48a3-9672-5fbd419dfa26 (osx.1013.amd64.open) executed on machine dci-mac-build-083.local
+ ./RunTests.sh --runtime-path /tmp/helix/working/AB72097D/p
----- start Thu Jul 22 15:24:05 PDT 2021 =============== To repro directly: =====================================================
pushd .
/tmp/helix/working/AB72097D/p/dotnet exec --runtimeconfig Microsoft.Extensions.FileProviders.Physical.Tests.runtimeconfig.json --depsfile Microsoft.Extensions.FileProviders.Physical.Tests.deps.json xunit.console.dll Microsoft.Extensions.FileProviders.Physical.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================
/private/tmp/helix/working/AB72097D/w/A0CB0914/e /private/tmp/helix/working/AB72097D/w/A0CB0914/e
  Discovering: Microsoft.Extensions.FileProviders.Physical.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  Microsoft.Extensions.FileProviders.Physical.Tests (found 76 of 92 test cases)
  Starting:    Microsoft.Extensions.FileProviders.Physical.Tests (parallel test collections = on, max threads = 4)
Unhandled exception. System.IO.FileNotFoundException: Could not find file '/var/folders/vn/knn7pvpd2y12gn_qhnnzqps80000gy/T/nnep5noo.kpg/e4a4s2kc.z55'.
File name: '/var/folders/vn/knn7pvpd2y12gn_qhnnzqps80000gy/T/nnep5noo.kpg/e4a4s2kc.z55'
   at System.IO.FileSystem.ResolveLinkTarget(String linkPath, Boolean returnFinalTarget, Boolean isDirectory) in /_/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Unix.cs:line 603
   at Microsoft.Extensions.FileProviders.Physical.FileSystemInfoHelper.GetFileLinkTargetLastWriteTimeUtc(FileInfo fileInfo) in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/FileSystemInfoHelper.cs:line 54
   at Microsoft.Extensions.FileProviders.Physical.PollingFileChangeToken.GetLastWriteTimeUtc() in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs:line 57
   at Microsoft.Extensions.FileProviders.Physical.PollingFileChangeToken.get_HasChanged() in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs:line 101
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.RaiseChangeEvents(Object state) in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFilesWatcher.cs:line 437
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Timer.cs:line 673
   at System.Threading.TimerQueue.FireNextTimers() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Timer.cs:line 326
Author: tarekgh
Assignees: -
Labels:

area-Extensions-FileSystem, untriaged

Milestone: -

@jozkee jozkee self-assigned this Jul 22, 2021
@jozkee jozkee removed the untriaged New issue has not been triaged by the area owner label Jul 22, 2021
@jozkee jozkee added this to the 6.0.0 milestone Jul 22, 2021
@jozkee
Copy link
Member

jozkee commented Jul 22, 2021

I think this is because retrieval of the link is not atomic and happens when the file no longer exists between the call to LinkTarget and ResolveLinkTarget.

if (fileInfo.LinkTarget != null)
{
FileSystemInfo targetInfo = fileInfo.ResolveLinkTarget(returnFinalTarget: true);
if (targetInfo.Exists)
{
return targetInfo.LastWriteTimeUtc;

A couple of options:

cc @adamsitnik @carlossanlop @jeffhandley

@ericstj
Copy link
Member

ericstj commented Jul 23, 2021

To be clear, my suggestion also involves public APIs for getting the modified time on the target of link. The prototype i shared did it internally which should be avoided if we’re making IO changes. If we need it customers should get it too.

@hoyosjs hoyosjs added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jul 23, 2021
@hoyosjs
Copy link
Member

hoyosjs commented Jul 23, 2021

This started in the last two days: https://runfo.azurewebsites.net/search/tests/?q=started%3A%7E7+definition%3Aruntime+name%3A%22Microsoft.Extensions.FileProviders.Physical.Tests%22 Somehow it's able to crash XUnit. @jozkee is it possible to disable anything that will unblock this? It's quickly becoming a heavy hitter.

@jozkee
Copy link
Member

jozkee commented Jul 23, 2021

is it possible to disable anything that will unblock this?

Yes.

Seems that all the errors are on OSX and Linux, can we just disable the tests for those platforms? I still would like to see what issues could occur in windows since local repro is hard.

@hoyosjs hoyosjs changed the title CI failure in Microsoft.Extensions.FileProviders.Physical.Tests Microsoft.Extensions.FileProviders.Physical.Tests disabled on Unix systems Jul 23, 2021
@hoyosjs hoyosjs added disabled-test The test is disabled in source code against the issue and removed blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' labels Jul 23, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Aug 5, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 10, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-FileSystem disabled-test The test is disabled in source code against the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants