Repository navigation
Closed
dotnet/performance
#2601Labels
arch-wasmWebAssembly architecturearea-System.IOblocking-clean-ci-optionalBlocking optional rolling runsin-prThere is an active PR which will close this issue when it is merged
Milestone
Description
With wasm/aot (build 20220817.1):
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.IOException: File 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)
Full run:
// Found 1 benchmarks:
// Perf_File.CopyToOverwrite: Job-AFOGNL(PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1) [size=104857600]
// **************************
// Benchmark: Perf_File.CopyToOverwrite: Job-AFOGNL(PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1) [size=104857600]
// *** Execute ***
// Launch: 1 / 1
// Execute: /home/helixbot/.jsvu/v8 --expose_wasm test-main.js -- --run 372a2e50-2c5c-4b96-b4d4-9fdc4d0208d3.dll --benchmarkName "System.IO.Tests.Perf_File.CopyToOverwrite(size: 104857600)" --job "PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1" --benchmarkId 48 in /home/helixbot/work/AD350993/w/A75B092C/e/performance/artifacts/bin/for-running/MicroBenchmarks/372a2e50-2c5c-4b96-b4d4-9fdc4d0208d3/bin/net7.0/browser-wasm/AppBundle
Failed to set up high priority. Make sure you have the right permissions. Message: Permission denied
Incoming arguments: --run 372a2e50-2c5c-4b96-b4d4-9fdc4d0208d3.dll --benchmarkName System.IO.Tests.Perf_File.CopyToOverwrite(size: 104857600) --job PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1 --benchmarkId 48
Application arguments: --run 372a2e50-2c5c-4b96-b4d4-9fdc4d0208d3.dll --benchmarkName System.IO.Tests.Perf_File.CopyToOverwrite(size: 104857600) --job PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1 --benchmarkId 48
console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
console.info: Initializing.....
// BeforeAnythingElse
// Benchmark Process Environment Information:
// Runtime=.NET Core (Mono) 7.0.0-ci, Wasm NativeAOT
// GC=Non-concurrent Workstation
// Job: Job-SSXSXT(PowerPlanMode=00000000-0000-0000-0000-000000000000, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1)
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.IOException: File 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)
// AfterAll
{"name":"ExitStatus","message":"Program terminated with exit(-1)","status":-1}
No Workload Results were obtained from the run.
// Benchmark Process 7089 has exited with code 255.
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architecturearea-System.IOblocking-clean-ci-optionalBlocking optional rolling runsin-prThere is an active PR which will close this issue when it is merged
Activity
adamsitnik commentedon Aug 17, 2022
@radical This particular benchmark should overwrite any existing files:
https://github.com/dotnet/performance/blob/3edf4c3149f5c903777f13af9b08b562b1672302/src/benchmarks/micro/libraries/System.IO.FileSystem/Perf.File.cs#L272
So it looks like a product bug?
radical commentedon Aug 17, 2022
How do I run a single benchmark locally? I know how to run the whole thing or partitions.
adamsitnik commentedon Aug 17, 2022
You need to specify filter, which is a glob pattern applied to
namespace.typeName.methodName. In your case the simplest one will be:(remember to escape asterisk on Unixes)
jozkee commentedon Aug 19, 2022
@adamsitnik could this be a regression in 7.0?
adamsitnik commentedon Aug 19, 2022
@jozkee It could, but this benchmark runs on CLR on Unix pretty fine, so I am sure that it's wasm-specific issue.
@radical is someone from the WASM Team going to investigate it?
radical commentedon Sep 7, 2022
CopyTo,CopyToOverride, andReadAllBytes, but not alwayswasm/AOTSetupReadAllBytesmethod:https://github.com/dotnet/performance/blob/5f63e8dcf81a0f9ddf5a80bd791d1fbaf0babd61/src/benchmarks/micro/libraries/System.IO.FileSystem/Perf.File.cs#L92-L113
.. and all the failing benchmarks are using this setup method:
The same issue on main shows the file name
/tmp/:I will debug the issue on CI.
danmoseley commentedon Sep 7, 2022
@radical Dupe of #73721 ?
radical commentedon Sep 7, 2022
Possibly, though here it runs with v8 instead of nodejs.
The code here just needs a random name for the file, but
Path.GetTempFileNamewill try to create the file, and is probably running into this issue. I'll open a PR to update that.Thanks @danmoseley!
Fix some randomly failing Perf.File tests on wasm/aot
Fix some randomly failing Perf.File tests on wasm/aot (#2601)