Stream: git-wasmtime

Topic: wasmtime / PR #10024 Disable sigaltstack overriding in as...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2025 at 20:45):

alexcrichton requested pchickey for a review on PR #10024.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2025 at 20:45):

alexcrichton requested wasmtime-core-reviewers for a review on PR #10024.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2025 at 20:45):

alexcrichton opened PR #10024 from alexcrichton:fix-fuzz-issue to bytecodealliance:main:

This commit is an attempt to fix a number of flaky crashes that we've been seeing on OSS-Fuzz for some time now. These crashes only reproduce under ASAN and even then have been spotty to reproduce. The current thinking is that a test with threads (e.g. only wast_tests using some of the threads spec tests) is required to run some wasm which will register a sigaltstack. Destruction of this sigaltstack happens with TLS destructors which seems to have a bad interaction with ASAN state additionally being destroyed around that time.

This whole interaction means that no one test case is enough to reproduce the corruption. Many crashes on OSS-Fuzz are likely due to "some historical test case spawned a thread" which corrupted something to crash later. The test case that I can reproduce with locally requires rerunning it in the same process a few thousand times to get a reproduction.

The purpose of the sigaltstack is to ensure that we have a big enough stack, primarily in debug mode, for testing if a trap is wasm. The hope is that this extra size of the Rust-standard-library-default's stack size is not necessary in release mode with ASAN. In the end time will tell with OSS-Fuzz to see if we can keep this or if we need to both install a bigger sigaltstack in addition to managing them differently in ASAN builds.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2025 at 22:03):

cfallin submitted PR review:

LGTM -- Alex, Nick and I talked about this offline for a bit today. Thanks a bunch for root-causing this -- was very mysterious!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2025 at 22:33):

alexcrichton merged PR #10024.


Last updated: Feb 28 2025 at 02:27 UTC