Repository navigation
[wasm][aot] gsharedvt_out_sig - RegularExpressions.Symbolic.SymbolicRegexBuilder #117557
Copy link
Copy link
Closed
Closed
Copy link
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tabarch-wasmWebAssembly architectureWebAssembly architecturearea-Codegen-AOT-monoregression-from-last-release
Milestone
Description
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1107614
Build error leg or test failing: [wasm][aot] gsharedvt_out_sig - RegularExpressions.Symbolic.SymbolicRegexBuilder
Error Message
Fill the error message using step by step known issues guidance.
{
"ErrorMessage": "interp.c:2737",
"BuildRetry": false,
"ExcludeConsoleLog": false
}[18:17:27] fail: [MONO] * Assertion at D:/a/_work/1/s/src/mono/mono/mini/interp/interp.c:2737,
condition `is_ok (error)' not met, function:init_jit_call_info,
Attempting to JIT compile method '(wrapper other)
void object:gsharedvt_out_sig (intptr,System.Text.RegularExpressions.Symbolic.SymbolicRegexBuilder`1/NodeCacheKey<object>&,intptr)'
while running in aot-only mode. See https://learn.microsoft.com/xamarin/ios/internals/limitations for more information.
assembly:<unknown assembly> type:<unknown type> member:(null)
Error
at Mc (http://127.0.0.1:49169/_framework/dotnet.runtime.js:3:172233)
at wasm_trace_logger (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[149696]:0x2a41ac1)
at eglib_log_adapter (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[141965]:0x285016a)
at monoeg_g_logv_nofree (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[141891]:0x284e0fa)
at monoeg_assertion_message (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[141894]:0x284e1f8)
at do_jit_call (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[141263]:0x2823cab)
at mono_interp_exec_method (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[141258]:0x2816d50)
at interp_entry (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[141337]:0x28270bc)
at interp_entry_instance_ret_2 (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[141348]:0x282791b)
at aot_instances_aot_wrapper_gsharedvt_in_sig_u1_this_cl26_Mono_dValueTuple_602_3cint_2c_20int_3e_cl26_Mono_dValueTuple_602_3cint_2c_20int_3e_ (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[104406]:0x1f108f7)
at System_Text_RegularExpressions_System_Text_RegularExpressions_Symbolic_SymbolicRegexNode_1_TSet_REF_Create_System_Text_RegularExpressions_Symbolic_SymbolicRegexBuilder_1_TSet_REF_System_Text_RegularExpressions_Symbolic_SymbolicRegexNodeKind_System_Text_RegularExpressions_Symbolic_SymbolicRegexNode_1_TSet_REF_System_Text_RegularExpressions_Symbolic_SymbolicRegexNode_1_TSet_REF_int_int_TSet_REF_System_Text_RegularExpressions_Symbolic_SymbolicRegexInfo (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[94120]:0x1a8bd5c)
at System_Text_RegularExpressions_System_Text_RegularExpressions_Symbolic_SymbolicRegexNode_1_TSet_REF_CreateLoop_System_Text_RegularExpressions_Symbolic_SymbolicRegexBuilder_1_TSet_REF_System_Text_RegularExpressions_Symbolic_SymbolicRegexNode_1_TSet_REF_int_int_bool (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[94141]:0x1a8cea7)
at System_Text_RegularExpressions_System_Text_RegularExpressions_Symbolic_SymbolicRegexBuilder_1_TSet_REF_CreateLoop_System_Text_RegularExpressions_Symbolic_SymbolicRegexNode_1_TSet_REF_bool_int_int (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[94071]:0x1a87de6)
at System_Text_RegularExpressions_System_Text_RegularExpressions_Symbolic_RegexNodeConverter_ConvertToSymbolicRegexNode_System_Text_RegularExpressions_RegexNode (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[94067]:0x1a86cf0)
at System_Text_RegularExpressions_System_Text_RegularExpressions_Symbolic_SymbolicRegexRunnerFactory__ctor_System_Text_RegularExpressions_RegexTree_System_Text_RegularExpressions_RegexOptions_System_TimeSpan (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[93494]:0x1a4d068)
at System_Text_RegularExpressions_System_Text_RegularExpressions_Regex__ctor_string_System_Text_RegularExpressions_RegexOptions_System_TimeSpan_System_Globalization_CultureInfo (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[93487]:0x1a4cc8e)
at System_Text_RegularExpressions_System_Text_RegularExpressions_Regex__ctor_string_System_Text_RegularExpressions_RegexOptions (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[93486]:0x1a4cbe3)
at System_Text_RegularExpressions_Tests_System_Text_RegularExpressions_Tests_GetGroupNamesTests_GroupNumberFromName_InvalidName_ReturnsMinusOne_string_string_System_Text_RegularExpressions_RegexOptions (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[95850]:0x1b9c7a8)
at aot_instances_aot_wrapper_gsharedvt_out_sig_void_this_objobji4 (http://127.0.0.1:49169/_framework/dotnet.native.wasm:wasm-function[105794]:0x1f6037e)
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1107614
Error message validated: [interp.c:2737]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/29/2025 10:27:18 AM UTC
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 4 | 22 | 72 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tabarch-wasmWebAssembly architectureWebAssembly architecturearea-Codegen-AOT-monoregression-from-last-release
Activity
lewing commentedon Jul 11, 2025
Appears to be a regular failure in runtime-extra-platforms rolling build in the high-resource AOT lane
lewing commentedon Jul 11, 2025
cc @BrzVlad
pavelsavara commentedon Jul 18, 2025
runtime/src/mono/mono/mini/interp/interp.c
Lines 2734 to 2738 in d55770b
Maybe we can print the actual error here ^^
And I wonder what makes this WASM only error, maybe this ?
runtime/src/mono/mono/mini/mini-runtime.c
Lines 2842 to 2851 in 4f82fe7
[-][wasm][aot] System.Text.RegularExpressions failure[/-][+][wasm][aot] gsharedvt_out_sig - RegularExpressions.Symbolic.SymbolicRegexBuilder[/+]5 remaining items
pavelsavara commentedon Aug 6, 2025
[MONO] AOT NOT FOUND: (wrapper other) object:gsharedvt_out_sig (intptr,System.Text.RegularExpressions.Symbolic.SymbolicRegexBuilder'1/NodeCacheKey<object>&,intptr).jit_call:
SymbolicRegexBuilder.NodeCacheKey.Equals()Ideal call stack (captured on windows)
Minimal repro is
new Regex("[a-z0-9]+", RegexOptions.NonBacktracking);pavelsavara commentedon Aug 6, 2025
There are following methods in the AOT's .wasm file
pavelsavara commentedon Aug 11, 2025
pavelsavara commentedon Aug 11, 2025
lewing commentedon Aug 16, 2025
@lambdageek just in case you have any ideas
pavelsavara commentedon Aug 18, 2025
Compilation log
execution log
pavelsavara commentedon Aug 18, 2025
Note that
object:gsharedvt_out_sig (intptr,Builder`1/Key<object>&,intptr)is added during AOT but not found during execution.pavelsavara commentedon Aug 18, 2025
Possibly this could be solved by adding
classconstraintSymbolicRegexBuilder<TSet> where TSet : class, IComparable<TSet>, IEquatable<TSet>.Unfortunately
System.Text.RegularExpressions.Symbolic.BitVectoris a struct and makes theNodeCacheKeytruly variable size.pavelsavara commentedon Aug 19, 2025
Repro that doesn't depend on special treatment of
System.Collections.Genericin the Mono AOT.It also reproduces with
<WasmDedup>false</WasmDedup>pavelsavara commentedon Aug 21, 2025
We can't compile the
gsharedvt_out_sig (intptr,Sample.Builder`1/Key<object>&,intptr)or
gsharedvt_in_sig (Sample.Builder`1/Key<object>,Sample.Builder`1/Key<object>,intptr)because
Sample.Builder`1/Key<object>->has_failure == 1runtime/src/mono/mono/metadata/class-init.c
Lines 2617 to 2618 in 00f1d43
Field 'Left' is an invalid generic instantiation of type Sample.Builder`1+Node[System.Object]This is because
System.Objectparameter doesn't satisfyIFoo<T>constraint of theBuilder<TSet> where TSet : IFoo<TSet>But that is non-sense
BrzVlad commentedon Aug 21, 2025
We try to share gsharedvt wrappers as much as possible, so I believe we reduce all the reference type arguments to Object, because it doesn't impact the signature in any way. So for these wrappers you should aim to ignore the type constraints.
pavelsavara commentedon Aug 21, 2025
I believe that
mini_get_underlying_signatureviaget_wrapper_shared_type_fullis responsible for creating the new signature.So possibly I can strip constraints there.
@BrzVlad how do I do it ?
runtime/src/mono/mono/mini/mini-generic-sharing.c
Lines 1395 to 1414 in d342502
BrzVlad commentedon Aug 22, 2025
The easiest approach I think would be to add a new bit field to
MonoClass, something likeskip_generic_constraints. When we artificially inflate the generic type with object here we could set this flag here. Then when we do class init we could skip the type constraint checks. I believe this should work ?