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

WasmTemplateTests.ConsolePublishAndRun fails with exit code 137 #87414

Closed
sbomer opened this issue Jun 12, 2023 · 11 comments · Fixed by #87544
Closed

WasmTemplateTests.ConsolePublishAndRun fails with exit code 137 #87414

sbomer opened this issue Jun 12, 2023 · 11 comments · Fixed by #87544
Assignees
Labels
arch-wasm WebAssembly architecture area-Build-mono Known Build Error Use this to report build issues in the .NET Helix tab test-failure
Milestone

Comments

@sbomer
Copy link
Member

sbomer commented Jun 12, 2023

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=301956
Build error leg or test failing: Wasm.Build.Tests.WasmTemplateTests.ConsolePublishAndRun
Pull request: #87156

Failures in Build browser-wasm linux Release WasmBuildTests, in WasmTemplateTests:

Expected 42 exit code but got 137
 Stack Trace:
        /_/src/mono/wasm/Wasm.Build.Tests/Common/CommandResult.cs(44,0): at Wasm.Build.Tests.CommandResult.EnsureExitCode(Int32 expectedExitCode, String messagePrefix, Boolean suppressOutput)
        /_/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs(409,0): at Wasm.Build.Tests.WasmTemplateTests.ConsolePublishAndRun(String config, Boolean aot, Boolean relinking)
           at InvokeStub_WasmTemplateTests.ConsolePublishAndRun(Object, Object, IntPtr*)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs(409,0): at Wasm.Build.Tests.WasmTemplateTests.ConsolePublishAndRun",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Report

Build Definition Test Pull Request
307611 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87570
307434 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution
307389 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87575
307377 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87285
307369 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87573
307349 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87570
307341 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87566
307309 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87549
307283 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87567
307101 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87272
307035 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87260
305791 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #84191
306947 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87555
306922 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87522
306721 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87260
306714 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87549
306691 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86895
306673 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87170
306616 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution
305840 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87403
306439 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87540
306186 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87065
305747 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87507
305305 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86546
305683 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87503
305573 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87497
305551 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87495
305495 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87436
305393 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87260
305088 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87473
305323 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87403
305194 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86255
305259 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87375
305054 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87403
304987 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87274
304949 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87469
304945 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87170
304881 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution
303588 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87375
304493 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87436
304333 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #74623
304226 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87425
304201 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution
304188 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86722
304179 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87274
304175 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87326
304019 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86255
304112 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87065
304096 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87422
301835 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86875
303868 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #84229
303807 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87406
303799 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86759
303474 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87124
303734 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87403
301956 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87156
303566 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86546
303546 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86759
303335 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87308
303285 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
22 60 60
@sbomer sbomer added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Jun 12, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 12, 2023
@sbomer sbomer changed the title WsasmTemplateTests.ConsolePublishAndRun fails with exit code 137 WasmTemplateTests.ConsolePublishAndRun fails with exit code 137 Jun 12, 2023
@radical radical added this to the 8.0.0 milestone Jun 12, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jun 12, 2023
@radical
Copy link
Member

radical commented Jun 12, 2023

This is node exiting with 137 even though the app seems to have run correctly.
cc @pavelsavara @maraf

@ghost
Copy link

ghost commented Jun 12, 2023

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

Issue Details

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=301956
Build error leg or test failing: Wasm.Build.Tests.WasmTemplateTests.ConsolePublishAndRun
Pull request: #87156

Failures in Build browser-wasm linux Release WasmBuildTests, in WasmTemplateTests:

Expected 42 exit code but got 137
 Stack Trace:
        /_/src/mono/wasm/Wasm.Build.Tests/Common/CommandResult.cs(44,0): at Wasm.Build.Tests.CommandResult.EnsureExitCode(Int32 expectedExitCode, String messagePrefix, Boolean suppressOutput)
        /_/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs(409,0): at Wasm.Build.Tests.WasmTemplateTests.ConsolePublishAndRun(String config, Boolean aot, Boolean relinking)
           at InvokeStub_WasmTemplateTests.ConsolePublishAndRun(Object, Object, IntPtr*)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs(409,0): at Wasm.Build.Tests.WasmTemplateTests.ConsolePublishAndRun",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Report

Build Definition Test Pull Request
304179 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87274
304175 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87326
304019 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86255
304112 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87065
304096 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87422
301835 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86875
303868 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #84229
303807 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87406
303799 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86759
303474 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87124
303734 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87403
301956 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87156
303588 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87375
303566 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86546
303546 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86759
303335 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87308

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
16 16 16
Author: sbomer
Assignees: -
Labels:

arch-wasm, blocking-clean-ci, area-Build-mono, test-failure, Known Build Error

Milestone: 8.0.0

@pavelsavara
Copy link
Member

Where the 137 is coming from? What does it mean ?

@lewing
Copy link
Member

lewing commented Jun 13, 2023

Where the 137 is coming from? What does it mean ?

maybe

exitcode_list[137]="SIGKILL Killed eg by kill"
are we hitting container limits or something?

@radical
Copy link
Member

radical commented Jun 13, 2023

exitcode_list[137]="SIGKILL Killed eg by kill"

The exit code is from /root/helix/work/workitem/e/dotnet-latest/dotnet run --no-build -c Debug x y z.

are we hitting container limits or something?

I couldn't reproduce this locally. I will try again on helix.

@radical
Copy link
Member

radical commented Jun 13, 2023

Also, when node starts to run:

        [Debug_jqhgdlu5.udi] Running: node --experimental-wasm-simd --experimental-wasm-eh main.mjs x y z
        [Debug_jqhgdlu5.udi] Using working directory: /root/helix/work/workitem/e/wbt/Debug_jqhgdlu5.udi/bin/Debug/net8.0/browser-wasm/AppBundle
        [Debug_jqhgdlu5.udi] still waiting on run dependencies:
        [Debug_jqhgdlu5.udi] dependency: wasm-instantiate
        [Debug_jqhgdlu5.udi] dependency: instantiate_wasm_module
        [Debug_jqhgdlu5.udi] (end of list)
        [Debug_jqhgdlu5.udi] still waiting on run dependencies:
        [Debug_jqhgdlu5.udi] dependency: wasm-instantiate
        [Debug_jqhgdlu5.udi] dependency: instantiate_wasm_module
        [Debug_jqhgdlu5.udi] (end of list)
        [Debug_jqhgdlu5.udi] still waiting on run dependencies:
        [Debug_jqhgdlu5.udi] dependency: wasm-instantiate
        [Debug_jqhgdlu5.udi] dependency: instantiate_wasm_module
        [Debug_jqhgdlu5.udi] (end of list)
        [Debug_jqhgdlu5.udi] still waiting on run dependencies:
        [Debug_jqhgdlu5.udi] dependency: wasm-instantiate
        [Debug_jqhgdlu5.udi] dependency: instantiate_wasm_module
        [Debug_jqhgdlu5.udi] (end of list)
        [Debug_jqhgdlu5.udi] still waiting on run dependencies:
        [Debug_jqhgdlu5.udi] dependency: wasm-instantiate
        [Debug_jqhgdlu5.udi] dependency: instantiate_wasm_module
        [Debug_jqhgdlu5.udi] (end of list)

Are these messages expected? What do they mean?

@radical radical self-assigned this Jun 14, 2023
@radical
Copy link
Member

radical commented Jun 14, 2023

It's nodejs exiting with 137. I added some debug stuff and tried it on CI:
log:

        [Debug_rrbxktg5.22r] [MONO] AOT: FOUND method (wrapper managed-to-native) Interop/Runtime:MarshalPromise (void*) [0x2ebf - 0x2ec0 0x553750]
        [Debug_rrbxktg5.22r] NodeJS exited with 137

@radical
Copy link
Member

radical commented Jun 14, 2023

        [Debug_rrbxktg5.22r]   Compiling native assets with emcc with -O0. This may take a while ...
        [Debug_rrbxktg5.22r]   [1/3] pinvoke.c -> pinvoke.o [took 0.236s]
        [Debug_rrbxktg5.22r]   [2/3] driver.c -> driver.o [took 0.310s]
        [Debug_rrbxktg5.22r]   [3/3] corebindings.c -> corebindings.o [took 0.172s]
        [Debug_rrbxktg5.22r]   Compiling assembly bitcode files with -O0 ...
        [Debug_rrbxktg5.22r]   [1/5] Debug_rrbxktg5.22r.dll.bc -> Debug_rrbxktg5.22r.dll.o [took 0.451s]
        [Debug_rrbxktg5.22r]   [2/5] System.Console.dll.bc -> System.Console.dll.o [took 0.478s]
        [Debug_rrbxktg5.22r]   [3/5] System.Runtime.InteropServices.JavaScript.dll.bc -> System.Runtime.InteropServices.JavaScript.dll.o [took 0.414s]
        [Debug_rrbxktg5.22r]   [4/5] System.Private.CoreLib.dll.bc -> System.Private.CoreLib.dll.o [took 14.280s]
        [Debug_rrbxktg5.22r]   [5/5] aot-instances.dll.bc -> aot-instances.dll.o [took 96.256s]
        [Debug_rrbxktg5.22r]   Linking for initial memory $(EmccInitialHeapSize)=16777216 bytes. Set this msbuild property to change the value.
        [Debug_rrbxktg5.22r]   Linking with emcc with -O0. This may take a while ...

This is using -O0 for compiling, and linking.

aot-instances.dll.bc took 96secs to compile. Could the generated code be too big, and thus also causing the still waiting on run dependencies from node?
I'll try dumping the files sizes to check. And see if I can get some timing info also.

Where do we measure, and track app startup times?

@radical
Copy link
Member

radical commented Jun 14, 2023

Debug+aot: 65834408 ./dotnet.native.wasm
Release+aot: 20177440 ./dotnet.native.wasm

Release uses -Oz, and -O2 for compiling, and linking respectively.

@radical
Copy link
Member

radical commented Jun 14, 2023

I'll turn off _WasmDevel for this. I don't know if this warrants any other concern over possible big size increase.

@radical
Copy link
Member

radical commented Jun 14, 2023

<_WasmDevel Condition="'$(_WasmDevel)' == '' and '$(WasmBuildNative)' == 'true' and '$(Configuration)' == 'Debug'">true</_WasmDevel>

  • this is the current default setting. Maybe this should also include and $(RunAOTCompilation) != 'true'.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 14, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 15, 2023
@radical radical removed the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jun 15, 2023
@radical radical added Known Build Error Use this to report build issues in the .NET Helix tab and removed Known Build Error Use this to report build issues in the .NET Helix tab labels Jun 15, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 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-Build-mono Known Build Error Use this to report build issues in the .NET Helix tab test-failure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants