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

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

Open
jsturtevant opened this issue Dec 2, 2024 · 5 comments
Open

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

jsturtevant opened this issue Dec 2, 2024 · 5 comments
Labels
arch-wasm WebAssembly architecture area-Infrastructure-mono os-wasi Related to WASI variant of arch-wasm
Milestone

Comments

@jsturtevant
Copy link
Contributor

jsturtevant commented Dec 2, 2024

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Dec 2, 2024
Copy link
Contributor

Tagging subscribers to this area: @akoeplinger, @matouskozak
See info in area-owners.md if you want to be subscribed.

@jsturtevant
Copy link
Contributor Author

This also occurs when I add just

    <!-- to strip wasi:http dependency -->
    <PublishTrimmed>true</PublishTrimmed>
    <WasmBuildNative>true</WasmBuildNative>

@maraf maraf added arch-wasm WebAssembly architecture os-wasi Related to WASI variant of arch-wasm labels Dec 5, 2024
@maraf
Copy link
Member

maraf commented Dec 5, 2024

cc @pavelsavara

Copy link
Contributor

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

@maraf maraf added this to the 10.0.0 milestone Dec 5, 2024
@maraf maraf removed the untriaged New issue has not been triaged by the area owner label Dec 5, 2024
@pavelsavara
Copy link
Member

pavelsavara commented Dec 6, 2024

I think I had a similar problem recently. I don't know why. @maraf let's debug it together. I guess this is some msbuild mess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Infrastructure-mono os-wasi Related to WASI variant of arch-wasm
Projects
None yet
Development

No branches or pull requests

3 participants