-
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
Microsoft.Extensions.FileProviders.Physical.Tests crashing on CI in FileSystemInfo API #57221
Comments
Tagging subscribers to this area: @maryamariyan, @dotnet/area-extensions-filesystem Issue DetailsConfiguration: Dump is available: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-56974-merge-9155b3b7ae8e44c498/Microsoft.Extensions.FileProviders.Physical.Tests/1/how-to-debug-dump.md?sv=2019-07-07&se=2021-08-31T15%3A39%3A48Z&sr=c&sp=rl&sig=Z1XxeIsGVGHUGWG6t0bfozd05lMZIHaZ%2BpmuqDJbn08%3D, https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-56974-merge-9155b3b7ae8e44c498/Microsoft.Extensions.FileProviders.Physical.Tests/1/core.22560?sv=2019-07-07&se=2021-08-31T15%3A39%3A48Z&sr=c&sp=rl&sig=Z1XxeIsGVGHUGWG6t0bfozd05lMZIHaZ%2BpmuqDJbn08%3D
cc @adamsitnik
|
Again there's a dump available. ``´
|
#57322 also OSX |
This failed 71 times in 3 days, we need to disable or work around. WorkItems
| where FriendlyName == "Microsoft.Extensions.FileProviders.Physical.Tests"
| where ExitCode == "134"
| join kind= inner (
Jobs | project QueueName , JobId, Build, Type, Source,
Branch,
Pipeline = tostring(parse_json(Properties).DefinitionName),
Pipeline_Configuration = tostring(parse_json(Properties).configuration),
OS = QueueName,
Arch = tostring(parse_json(Properties).architecture)
) on JobId
| where Queued > ago (7d)
| summarize count() by ExitCode, Pipeline, Pipeline_Configuration, Arch, bin(Finished, 1d)
| order by Finished asc
|
@jozkee thoughts? Do you know what test/s this is so we can disable? Or should we add some catch in the product code meantime instead? |
@danmoseley This one is weird since the call-stack shows the failure coming from And the scenario is quite rare as well: Exists returns true but LastWriteTime throws I've been trying to investigate the dump but I'm not quite familiar with that process. |
This apparently means stat/lstat is returning EINVAL. That's not listed in the man pages: |
It's both 10.14 and 10.15
|
Thanks, I wonder why it only fails in macOS, same code runs in Linux distros without issues. |
I was able to confirm that this is an issue on FileSystemInfo and not on PhysicalFileProvider, it was introduced in #52235. using System;
using System.IO;
using System.Threading.Tasks;
namespace test_writetime
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
var info = new FileInfoWrapper();
for (int i = 0; i < 1_000_000; i++){
Parallel.Invoke(
() => info.PrintLastWriteTime(),
() => info.Delete()
);
}
}
class FileInfoWrapper
{
const string _linkPath = "/home/jozky/test-writetime/bar";
const string _targetPath = "/home/jozky/test-writetime/foo";
private FileInfo _fileInfo;
public FileInfoWrapper()
{
CreateSymlink();
}
public void CreateSymlink()
{
_fileInfo = (FileInfo)File.CreateSymbolicLink(_linkPath, _targetPath);
}
public void Delete()
{
File.Delete(_linkPath);
}
public void PrintLastWriteTime()
{
// return _fileInfo.Exists ? _fileInfo.LastWriteTimeUtc : DateTime.MinValue;
_fileInfo.Refresh();
if (!_fileInfo.Exists)
{
Console.WriteLine("Had to re-create");
CreateSymlink();
}
else
{
Console.WriteLine("Already created");
}
Console.WriteLine(_fileInfo.LastWriteTimeUtc);
}
}
}
} Will send a PR that fixes the error. |
Build: https://dev.azure.com/dnceng/public/_build/results?buildId=1288068&view=ms.vss-test-web.build-test-results-tab&runId=38025328&resultId=194160&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab
Configuration:
net6.0-OSX-Debug-x64-CoreCLR_release-OSX.1015.Amd64.Open
Dump is available: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-56974-merge-9155b3b7ae8e44c498/Microsoft.Extensions.FileProviders.Physical.Tests/1/how-to-debug-dump.md?sv=2019-07-07&se=2021-08-31T15%3A39%3A48Z&sr=c&sp=rl&sig=Z1XxeIsGVGHUGWG6t0bfozd05lMZIHaZ%2BpmuqDJbn08%3D, https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-56974-merge-9155b3b7ae8e44c498/Microsoft.Extensions.FileProviders.Physical.Tests/1/core.22560?sv=2019-07-07&se=2021-08-31T15%3A39%3A48Z&sr=c&sp=rl&sig=Z1XxeIsGVGHUGWG6t0bfozd05lMZIHaZ%2BpmuqDJbn08%3D
cc @adamsitnik
The text was updated successfully, but these errors were encountered: