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

[release/8.0] [wasi] Work around WASI's mmap implementation not returning aligned m… #92061

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 14, 2023

Backport of #91761 to release/8.0

/cc @vargaz

Customer Impact

Enabling green CI when experimental feature is on - Only affects experimental WASI support. Mostly useful for fixing random CI failures like:
#86860

Testing

Tested by running a randomly failing test suite in a loop.

Risk

Low, only affects experimental WASI support.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

…memory.

Some code in sgen like sgen_los_free_object () expects the return address to be aligned.

Hopefully fixes #88501 and others.
@SamMonoRT SamMonoRT added this to the 8.0.0 milestone Sep 14, 2023
@SamMonoRT SamMonoRT added the Servicing-consider Issue for next servicing release review label Sep 14, 2023
@vargaz vargaz added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 14, 2023
@vargaz
Copy link
Contributor

vargaz commented Sep 14, 2023

@carlossanlop

@carlossanlop carlossanlop merged commit 0189dc4 into release/8.0 Sep 14, 2023
35 of 39 checks passed
@carlossanlop carlossanlop deleted the backport/pr-91761-to-release/8.0 branch September 14, 2023 17:49
@carlossanlop
Copy link
Member

Oh I see this got backported. Unfortunately, I'm still seeing this failure in the 8.0 branch:

Here's an example PR that hit it: #92374
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=413445&view=logs&j=f02b8cf9-dd4d-54fc-c292-2bb1d305b019&t=fd9015e5-cd94-57d7-8286-4fe749355863&l=56
Log: https://helixre107v0xd1eu3ibi6ka.blob.core.windows.net/dotnet-runtime-refs-heads-release-80-rc1-6a14376058b74ebebf/System.Collections.Tests/1/console.90d8fea5.log?helixlogtype=result
Output:

===========================================================================================================
/root/helix/work/workitem/e /root/helix/work/workitem/e /root/helix/work/workitem/e
[8.0.0-prerelease.23407.2+480b9159eb7e69b182a87581d5a336e97e0b6dae] XHarness command issued: wasi test --app=. --output-directory=/root/helix/work/workitem/uploads/xharness-output --engine-arg=--dir=. --timeout=00:30:00 -- dotnet.wasm WasmTestRunner managed/System.Collections.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
info: Using wasm engine WasmTime from path /root/helix/work/correlation/wasmtime/wasmtime
info: wasmtime-cli 5.0.0
info: 
info: Running /root/helix/work/correlation/wasmtime/wasmtime --dir=. dotnet.wasm WasmTestRunner managed/System.Collections.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
info: Discovering: managed/System.Collections.Tests.dll (method display = ClassAndMethod, method display options = None)
info: Discovered:  managed/System.Collections.Tests.dll (found 5666 of 7580 test cases)
info: Using random seed for test cases: 1986925510
info: Using random seed for collections: 1986925510
info: Starting:    managed/System.Collections.Tests.dll
info: Error: failed to run main module `dotnet.wasm`
info: 
info: Caused by:
info:     0: failed to invoke command default
info:     1: error while executing at wasm backtrace:
info:            0: 0x4ff1e - <unknown>!sgen_gray_object_queue_trim_free_list
info:            1: 0x4ffc3 - <unknown>!sgen_gray_object_queue_dispose
info:            2: 0x4b4fd - <unknown>!collect_nursery
info:            3: 0x4ada1 - <unknown>!sgen_perform_collection
info:            4: 0x4abd4 - <unknown>!sgen_ensure_free_space
info:            5: 0x49a0a - <unknown>!sgen_alloc_obj_nolock
info:            6: 0x4a0ea - <unknown>!sgen_alloc_obj
info:            7: 0x10e041 - <unknown>!mono_gc_alloc_obj
info:            8: 0xe617 - <unknown>!mono_interp_exec_method
info:            9: 0x8040 - <unknown>!interp_runtime_invoke
info:           10: 0x11d90f - <unknown>!mono_jit_runtime_invoke
info:           11: 0xe0f20 - <unknown>!do_runtime_invoke
info:           12: 0xe18ba - <unknown>!mono_runtime_try_invoke
info:           13: 0xe6101 - <unknown>!do_try_exec_main
info:           14: 0xe5ba0 - <unknown>!mono_runtime_run_main
info:           15: 0x68ac - <unknown>!main
info:           16: 0x272da8 - <unknown>!__main_void
info:           17: 0x5911 - <unknown>!_start
info:           18: 0x285f79 - <unknown>!_start.command_export
info:        note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information
info:     2: wasm trap: out of bounds memory access
info: Process wasmtime exited with 134
info: Waiting to flush log messages with a timeout of 120 secs ..
fail: Application has finished with exit code 134 but 0 was expected
XHarness exit code: 71 (GENERAL_FAILURE)
/root/helix/work/workitem/e /root/helix/work/workitem/e
----- end Wed 20 Sep 2023 09:20:08 PM UTC ----- exit code 71 ----------------------------------------------------------

@radical radical mentioned this pull request Sep 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-meta-mono Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants