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

Blazor WebAssembly AOT condition `table_size < 65000' not met #85917

Closed
1 task done
SeanLeitzinger opened this issue May 7, 2023 · 4 comments · Fixed by #85952
Closed
1 task done

Blazor WebAssembly AOT condition `table_size < 65000' not met #85917

SeanLeitzinger opened this issue May 7, 2023 · 4 comments · Fixed by #85952
Assignees
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono

Comments

@SeanLeitzinger
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When publishing a Blazor wasm app on .NET 7 using AOT the following error is encountered:

Precompiling failed for obj\Release\net7.0\linked\Microsoft.Graph.dll with exit code -1073740791.
Mono Ahead of Time compiler - compiling assembly obj\Release\net7.0\linked\Microsoft.Graph.dll

  • Assertion at D:\a_work\1\s\src\mono\mono\mini\aot-compiler.c:11219, condition `table_size < 65000' not met

Expected Behavior

App should compile successfully. The issue did not exist on .NET 6. All nuget packages are latest version.

Steps To Reproduce

Compile a Blazor WebAssembly project with Microsoft Graph on .NET 7.

Exceptions (if any)

No response

.NET Version

7.0.203

Anything else?

Visual Studio 17.5.5

.NET SDK:
 Version:   7.0.203
 Commit:    5b005c19f5

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.203\

Host:
  Version:      7.0.5
  Architecture: x64
  Commit:       8042d61b17

.NET SDKs installed:
  7.0.203 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

`

<PropertyGroup>
	<TargetFramework>net7.0</TargetFramework>
	<Nullable>disable</Nullable>
	<PublishTrimmed>true</PublishTrimmed>
	<UseBlazorWebAssembly>true</UseBlazorWebAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
  <RunAOTCompilation>False</RunAOTCompilation>
  <NoWarn>1701;1702;BL0005;BL0007;</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
  <RunAOTCompilation>True</RunAOTCompilation>
  <NoWarn>1701;1702;BL0005;BL0007;</NoWarn>
</PropertyGroup>

<ItemGroup>
  <None Include="wwwroot\app.css" />
</ItemGroup>

<ItemGroup>
	<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
	<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="6.4.12" />
	<PackageReference Include="Enums.NET" Version="4.0.1" />
	<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.5" />
	<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.5" PrivateAssets="all" />
	<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="7.0.5" />
	<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
	<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
	<PackageReference Include="Microsoft.Graph" Version="5.9.0" />
	<PackageReference Include="MudBlazor" Version="6.2.3" />
	<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
	<PackageReference Include="TinyMCE.Blazor" Version="1.0.4" />
</ItemGroup>
<ItemGroup>
	<TrimmerRootAssembly Include="Microsoft.Authentication.WebAssembly.Msal" />
</ItemGroup>
<ItemGroup>
	<ProjectReference Include="..\EdgesideSystems.Application\EdgesideSystems.Application.csproj" />
	<ProjectReference Include="..\EdgesideSystems.Core\EdgesideSystems.Core.csproj" />
</ItemGroup>
<ItemGroup>
  <Content Update="wwwroot\decode.min.js">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Content>
</ItemGroup>

`

@javiercn javiercn transferred this issue from dotnet/aspnetcore May 8, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 8, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label May 8, 2023
@radical radical added arch-wasm WebAssembly architecture area-Codegen-AOT-mono labels May 8, 2023
@ghost
Copy link

ghost commented May 8, 2023

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

Issue Details

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When publishing a Blazor wasm app on .NET 7 using AOT the following error is encountered:

Precompiling failed for obj\Release\net7.0\linked\Microsoft.Graph.dll with exit code -1073740791.
Mono Ahead of Time compiler - compiling assembly obj\Release\net7.0\linked\Microsoft.Graph.dll

  • Assertion at D:\a_work\1\s\src\mono\mono\mini\aot-compiler.c:11219, condition `table_size < 65000' not met

Expected Behavior

App should compile successfully. The issue did not exist on .NET 6. All nuget packages are latest version.

Steps To Reproduce

Compile a Blazor WebAssembly project with Microsoft Graph on .NET 7.

Exceptions (if any)

No response

.NET Version

7.0.203

Anything else?

Visual Studio 17.5.5

.NET SDK:
 Version:   7.0.203
 Commit:    5b005c19f5

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.203\

Host:
  Version:      7.0.5
  Architecture: x64
  Commit:       8042d61b17

.NET SDKs installed:
  7.0.203 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

`

<PropertyGroup>
	<TargetFramework>net7.0</TargetFramework>
	<Nullable>disable</Nullable>
	<PublishTrimmed>true</PublishTrimmed>
	<UseBlazorWebAssembly>true</UseBlazorWebAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
  <RunAOTCompilation>False</RunAOTCompilation>
  <NoWarn>1701;1702;BL0005;BL0007;</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
  <RunAOTCompilation>True</RunAOTCompilation>
  <NoWarn>1701;1702;BL0005;BL0007;</NoWarn>
</PropertyGroup>

<ItemGroup>
  <None Include="wwwroot\app.css" />
</ItemGroup>

<ItemGroup>
	<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
	<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="6.4.12" />
	<PackageReference Include="Enums.NET" Version="4.0.1" />
	<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.5" />
	<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.5" PrivateAssets="all" />
	<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="7.0.5" />
	<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
	<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
	<PackageReference Include="Microsoft.Graph" Version="5.9.0" />
	<PackageReference Include="MudBlazor" Version="6.2.3" />
	<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
	<PackageReference Include="TinyMCE.Blazor" Version="1.0.4" />
</ItemGroup>
<ItemGroup>
	<TrimmerRootAssembly Include="Microsoft.Authentication.WebAssembly.Msal" />
</ItemGroup>
<ItemGroup>
	<ProjectReference Include="..\EdgesideSystems.Application\EdgesideSystems.Application.csproj" />
	<ProjectReference Include="..\EdgesideSystems.Core\EdgesideSystems.Core.csproj" />
</ItemGroup>
<ItemGroup>
  <Content Update="wwwroot\decode.min.js">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Content>
</ItemGroup>

`

Author: SeanLeitzinger
Assignees: -
Labels:

arch-wasm, untriaged, area-Codegen-AOT-mono, needs-area-label

Milestone: -

@radical
Copy link
Member

radical commented May 8, 2023

cc @vargaz

@lewing
Copy link
Member

lewing commented May 8, 2023

looks like #81271

@vargaz
Copy link
Contributor

vargaz commented May 8, 2023

This is fixable, but having 65k AOTed methods will probably mean that both compile times and executable sizes will be unacceptable.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 8, 2023
vargaz added a commit to vargaz/runtime that referenced this issue May 9, 2023
@ghost ghost removed in-pr There is an active PR which will close this issue when it is merged untriaged New issue has not been triaged by the area owner labels May 10, 2023
@am11 am11 removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants