-
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
[dotnet-runtime-perf][wasm] Perf_File.CopyToOverwrite
benchmark failing with System.IO.IOException: File exists
#74104
Comments
@radical This particular benchmark should overwrite any existing files: So it looks like a product bug? |
How do I run a single benchmark locally? I know how to run the whole thing or partitions. |
You need to specify filter, which is a glob pattern applied to --filter '*CopyToOverwrite' (remember to escape asterisk on Unixes) |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsWith wasm/aot (build 20220817.1):
Full run:
|
@adamsitnik could this be a regression in 7.0? |
.. and all the failing benchmarks are using this setup method: GlobalSetup(Targets = new[] { nameof(ReadAllBytes), "ReadAllBytesAsync", nameof(CopyTo), nameof(CopyToOverwrite) })] The same issue on main shows the file name
I will debug the issue on CI. |
Possibly, though here it runs with v8 instead of nodejs. |
On wasm/aot, `System.IO.FileSystem/Perf.File`'s `CopyTo`, `CopyToOverride`, and `ReadAllBytes` benchmarks fail randomly with: ``` ---> System.IO.IOException: The file '/tmp/' already exists. at BenchmarkDotNet.Autogenerated.Runnable_48.Run(IHost host, String benchmarkName) at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) --- End of inner exception stack trace --- at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args) ``` .. due to `Path.GetTempFileName()` being buggy - dotnet/runtime#73721. In `SetupReadAllBytes`, we are building the test file path as: ```csharp _testFilePath = Path.Combine(baseDir, Path.GetTempFileName()) ``` .. but the `Path.GetTempFileName()` is not appropriate here, as it will return a full path, and it will create the file. Instead we can use `Path.GetRandomFileName()` which should avoid the underlying issue completely. Fixes dotnet/runtime#74104 .
On wasm/aot, `System.IO.FileSystem/Perf.File`'s `CopyTo`, `CopyToOverride`, and `ReadAllBytes` benchmarks fail randomly with: ``` ---> System.IO.IOException: The file '/tmp/' already exists. at BenchmarkDotNet.Autogenerated.Runnable_48.Run(IHost host, String benchmarkName) at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) --- End of inner exception stack trace --- at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args) ``` .. due to `Path.GetTempFileName()` being buggy - dotnet/runtime#73721. In `SetupReadAllBytes`, we are building the test file path as: ```csharp _testFilePath = Path.Combine(baseDir, Path.GetTempFileName()) ``` .. but the `Path.GetTempFileName()` is not appropriate here, as it will return a full path, and it will create the file. Instead we can use `Path.GetRandomFileName()` which should avoid the underlying issue completely. Fixes dotnet/runtime#74104 .
With wasm/aot (build 20220817.1):
Full run:
cc @adamsitnik @LoopedBard3
The text was updated successfully, but these errors were encountered: