Skip to content

MONO_WASM: jit_call code generation failed in Blazor WASM project #113657

Open
@Dona278

Description

@Dona278

Description

We have a Blazor wasm project which after upgrade to net9 (same build with net8 works well) throws this type of error during normal usage BUT ONLY in production.

MONO_WASM: jit_call code generation failed: CompileError: WebAssembly.Module(): Compiling function #4 failed: Invalid tag index: 0 @+122
Pe @ dotnet.runtime.qrl1fuqt3c.js.br:3
Qi @ dotnet.runtime.qrl1fuqt3c.js.br:3
$func96526 @ dotnet.native.pysfeifdhn.wasm.br:0x202053f
$func96521 @ dotnet.native.pysfeifdhn.wasm.br:0x201368c
$mono_jiterp_interp_entry @ dotnet.native.pysfeifdhn.wasm.br:0x201176a
$54e83e8_ctions>d__52:MoveNext___ @ 172be272:0xab
$func74358 @ dotnet.native.pysfeifdhn.wasm.br:0x19d9b84
$func12856 @ dotnet.native.pysfeifdhn.wasm.br:0x533e45
$func73323 @ dotnet.native.pysfeifdhn.wasm.br:0x19ad5aa
$func12799 @ dotnet.native.pysfeifdhn.wasm.br:0x52f942
invoke_iii @ dotnet.native.2kf7ulbwqd.js.br:8
$func12868 @ dotnet.native.pysfeifdhn.wasm.br:0x534edb
$func73343 @ dotnet.native.pysfeifdhn.wasm.br:0x19ae0a6
$func74070 @ dotnet.native.pysfeifdhn.wasm.br:0x19cefc1
invoke_viii @ dotnet.native.2kf7ulbwqd.js.br:8
$func69795 @ dotnet.native.pysfeifdhn.wasm.br:0x18efb84
$func73349 @ dotnet.native.pysfeifdhn.wasm.br:0x19ae477
$func73348 @ dotnet.native.pysfeifdhn.wasm.br:0x19ae30e
$func74046 @ dotnet.native.pysfeifdhn.wasm.br:0x19cc31b
$func12676 @ dotnet.native.pysfeifdhn.wasm.br:0x524700
$func74070 @ dotnet.native.pysfeifdhn.wasm.br:0x19cef6b
$func70116 @ dotnet.native.pysfeifdhn.wasm.br:0x18fe697
$func69659 @ dotnet.native.pysfeifdhn.wasm.br:0x18e6e41
$func69650 @ dotnet.native.pysfeifdhn.wasm.br:0x18e683b
$func69646 @ dotnet.native.pysfeifdhn.wasm.br:0x18e602c
invoke_jji @ dotnet.native.2kf7ulbwqd.js.br:8
$func69645 @ dotnet.native.pysfeifdhn.wasm.br:0x18e5cd1
$func74146 @ dotnet.native.pysfeifdhn.wasm.br:0x19d266e
$mono_wasm_execute_timer @ dotnet.native.pysfeifdhn.wasm.br:0x20f93a7
mono_wasm_schedule_timer_tick @ dotnet.runtime.qrl1fuqt3c.js.br:3
callUserCallback @ dotnet.native.2kf7ulbwqd.js.br:8
(anonymous) @ dotnet.native.2kf7ulbwqd.js.br:8Understand this errorAI
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: Disabling jiterpreter after 2 failures
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: // 2 jit call wrappers generated, blob follows //
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: // #0 === jcp_15e0c_c hasThis=true hasRet=false wasmArgTypes=
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: // #1 === jcp_13e1e_d hasThis=false hasRet=false wasmArgTypes=127
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 0	00 61 73 6d 01 00 00 00 01 14 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 10	04 60 01 7f 00 60 04 7f 7f 7f 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 20	7f 00 60 00 00 60 02 7f 7f 00 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 30	02 20 05 01 69 01 30 00 03 01 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 40	69 01 31 00 03 01 69 01 32 00 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 50	00 01 69 01 33 00 02 01 6d 01 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 60	68 02 00 01 03 03 02 01 01 07 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 70	1d 02 0b 6a 63 70 5f 31 35 65 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 80	30 63 5f 63 00 04 0b 6a 63 70 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 90	5f 31 33 65 31 65 5f 64 00 05 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 100	0a 45 02 21 01 01 7f 06 40 20 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 110	01 28 00 00 20 02 28 00 04 10 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 120	00 07 00 10 02 10 03 20 03 41 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 130	01 36 02 00 0b 0f 0b 21 01 01 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 140	7f 06 40 20 01 28 00 00 20 02 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 150	28 00 04 10 01 07 00 10 02 10 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 160	03 20 03 41 01 36 02 00 0b 0f 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: 170	0b 
dotnet.runtime.qrl1fuqt3c.js.br:3 MONO_WASM: // end blob //

I thought immediatly that could be related to trimming which is full for the main project and partial for library with components.
The strange thing is that even with the error the render seems to work and after some of these error during normal usage this type of error doesn't appear anymore so I ask to discord channel for any suggestion and someone told me that this is the best place to file this issue.
With other exceptions I always investigated but with this "wasm error" I don't know where to start.. any suggestion?

Reproduction Steps

I can't reproduce in local and to prepare a minimal repro starting from our huge project it will take a long time, and I don't have this time now :(

Expected behavior

No errors

Actual behavior

Throws errors during normal usage

Regression?

Since this is an old issue, I remember that the day of the upgrade to net9 the same build with net8 works well, updated to net9 sdk and nuget packages and the error appear.

Known Workarounds

No response

Configuration

dotnet version: 9.0.201
dotnet nuget packages: 9.0.3
browser: chrome and edge got errors

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions