Skip to content

[wasi] wasi-socket sample fails with single file bundle #110337

Open
@jsturtevant

Description

@jsturtevant

Description

When enabling with Wasi Socket sample with Single File bundle it fails with:

  /home/jstur/projects/runtime/src/mono/sample/wasi/sockets-p2/bin/wasi-wasm/AppBundle/> /home/jstur/projects/runtime/artifacts/obj/wasmtime/wasmtime  --env DOTNET_WASI_PRINT_EXIT_CODE=1 --wasi http --wasi inherit-network --wasi tcp --wasi udp --wasi allow-ip-name-lookup --dir . dotnet.wasm Wasip2.Sockets.Console.Sample
EXEC : [MONO] error : * Assertion at /home/jstur/projects/runtime/src/mono/mono/metadata/method-builder-ilgen.c:631, condition `ctor' not met [/home/jstur/projects/runtime/src/mono/sample/wasi/sockets-p2/Wasip2.Sockets.Console.Sample.csproj]

Reproduction Steps

Uncomment lines the Socket sample and run ./dotnet.sh build /p:TargetOS=wasi /p:Configuration=Debug /t:RunSample src/mono/sample/wasi/sockets-p2/

    <WasmSingleFileBundle>true</WasmSingleFileBundle>
    <InvariantGlobalization>true</InvariantGlobalization>

<!--
<WasmSingleFileBundle>true</WasmSingleFileBundle>
<InvariantGlobalization>true</InvariantGlobalization>
-->

Expected behavior

it should build and run

Actual behavior

fails with

EXEC : [MONO] error : * Assertion at /home/jstur/projects/runtime/src/mono/mono/metadata/method-builder-ilgen.c:631, condition `ctor' not met 

Regression?

It was working a couple weeks ago

Known Workarounds

No response

Configuration

main branch of runtime
Ubuntu 24.04.1 LTS
x64

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