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

wasm library test failure EnableAggressiveTrimming - System.ArgumentNullException #46758

Closed
1 task
mdh1418 opened this issue Jan 8, 2021 · 6 comments
Closed
1 task
Assignees
Labels
Milestone

Comments

@mdh1418
Copy link
Member

mdh1418 commented Jan 8, 2021

In effort to run library tests with AOT compilation and EnableAggressiveTrimming enabled on CI #48226 these errors are hit.

EnableAggressiveTrimming related

  • System.ArgumentNullException : Value cannot be null. (Parameter 'method')
    System.ComponentModel.TypeConverter.Tests log
    Microsoft.Extensions.Http.Tests log
    System.Diagnostics.DiagnosticSource.Tests log

Repro:
Check out changes in
4f17c4e without this, many tests are not discovered.
4e7ab85 this one helps avoid some AOT compilation errors with this exception filter. There shouldn't be exception filter issues anymore.

./build.sh -os Browser -arch wasm -c Release
./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true src/libraries/<path-to-test-proj>

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Jan 8, 2021
@ghost
Copy link

ghost commented Jan 8, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

In effort to run library tests with AOT compilation on CI #46633, there are a number of failures arising from #46651.

Test suite Microsoft.Extensions.FileSystemGlobbing.Tests.csproj fails with

System.ArgumentNullException : ArgumentNull_Generic Arg_ParamName_Name, type

microsoft_extensions_filesystemglobbing_fail.txt

Repro:
Check out changes in #46651
./build.sh -os Browser -arch wasm -c Release
Remove

<!-- Temporary until https://github.com/mono/linker/issues/1713 is resolved -->
<assembly fullname="Microsoft.DotNet.RemoteExecutor">
<type fullname="Microsoft.DotNet.RemoteExecutor.Program">
<method signature="System.Int32 Main(System.String[])" />
</type>
</assembly>

Modify
catch (Exception e) when (IsIoRelatedException(e) && !disposing)
to be an empty catch

catch
{
}

./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/Microsoft.Extensions.FileSystemGlobbing.Tests.csproj

Author: mdh1418
Assignees: -
Labels:

arch-wasm, area-Infrastructure-libraries

Milestone: -

@radical radical self-assigned this Jan 12, 2021
@radical
Copy link
Member

radical commented Jan 12, 2021

I'm unable to reproduce this:

  XHarness command issued: wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=runtime.js --output-directory=/Users/radical/dev/r2/artifacts/bin/Microsoft.Extensions.FileSystemGlobbing.Tests/net6.0-Release/browser-wasm/AppBundle/xharness-output
-- --run WasmTestRunner.dll Microsoft.Extensions.FileSystemGlobbing.Tests.dll -notrait category=OuterLoop -notrait category=failing

  info: 15:35:57.4842150 v8 --expose_wasm --stack-trace-limit=1000 runtime.js -- --run WasmTestRunner.dll Microsoft.Extensions.FileSystemGlobbing.Tests.dll -notrait category=OuterLoop -notrait category=failing

  info: Arguments: --run,WasmTestRunner.dll,Microsoft.Extensions.FileSystemGlobbing.Tests.dll,-notrait,category=OuterLoop,-notrait,category=failing
  info: console.debug: MONO_WASM: Initializing mono runtime
  info: console.debug: MONO_WASM: ICU data archive(s) loaded, disabling invariant mode
  info: console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
  info: Initializing.....
  info: Discovering: Microsoft.Extensions.FileSystemGlobbing.Tests.dll (method display = ClassAndMethod, method display options = None)
  info: Discovered:  Microsoft.Extensions.FileSystemGlobbing.Tests.dll (found 53 of 53 test cases)
  info: Starting:    Microsoft.Extensions.FileSystemGlobbing.Tests.dll
  info: Finished:    Microsoft.Extensions.FileSystemGlobbing.Tests.dll
  info:
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 53, Errors: 0, Failed: 0, Skipped: 0, Time: 1.665764s
  info:
  info: 15:36:00.5108090 Process v8 exited with 0

  info: Application has finished with exit code: 0
  XHarness exit code: 0
  XHarness artifacts: /Users/radical/dev/r2/artifacts/bin/Microsoft.Extensions.FileSystemGlobbing.Tests/net6.0-Release/browser-wasm/AppBundle/xharness-output

@radical radical removed their assignment Jan 12, 2021
@mdh1418 mdh1418 changed the title wasm AOT library test failure - System.ArgumentNullException wasm library test failure EnableAggressiveTrimming - System.ArgumentNullException Mar 5, 2021
@naricc naricc self-assigned this Mar 16, 2021
@naricc
Copy link
Member

naricc commented Mar 16, 2021

I will take this one now; I will assign more of these to myself once I do this one and get a better estimate for the work involved.

@SamMonoRT SamMonoRT removed the untriaged New issue has not been triaged by the area owner label Mar 16, 2021
@SamMonoRT SamMonoRT added this to the 6.0.0 milestone Mar 16, 2021
@SamMonoRT
Copy link
Member

@radical - this should be fixed, Please confirm if so, and close the issue

@naricc
Copy link
Member

naricc commented Jun 21, 2021

I believe this is fixed by: #50645

@radical
Copy link
Member

radical commented Jun 21, 2021

AFAICS, this is fixed.

@radical radical closed this as completed Jun 21, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants