alexcrichton opened PR #12570 from alexcrichton:subtask-redux to bytecodealliance:main:
This commit updates the implementation of component-model-async primitives to remove the manual subtask reparenting process. This is required to fix #12544 at a semantic level because a subtask isn't ever actually reparented, even if its parent exits. The first part of this change is to remove the
GuestTask::subtasksfield and all relevant manipulations of it.This field, however, powered the
TaskExitabstraction returned fromcall_concurrent. This commit then subsequently deletesTaskExitand all related infrastructure as it's no longer directly applicable as-is. The rest of this change is then updating tests/bindings/etc to account for these two changes.The main semantic changes related to tests are:
wasmtime run, with and without--invoke, no longer waits for all subtasks. This instead only waits for the main task returning before exiting. Whether or not this is the correct behavior is under discussion in WebAssembly/component-model#608
wasmtime servehas been updated to keep the store alive at least until the response body has been fully transmitted. This is also part of WebAssembly/component-model#608.Some
component-async-tests-related tests were updated to either avoid blocking the store as it wasn't needed or yield enough times to ensure that the test passes.Closes #12544
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton commented on PR #12570:
This is a draft while https://github.com/WebAssembly/component-model/issues/608 is being discussed to figure out the desired behavior here
alexcrichton updated PR #12570.
github-actions[bot] added the label fuzzing on PR #12570.
github-actions[bot] added the label wasi on PR #12570.
github-actions[bot] commented on PR #12570:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "fuzzing", "wasi"Thus the following users have been cc'd because of the following labels:
- fitzgen: fuzzing
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton has marked PR #12570 as ready for review.
alexcrichton requested fitzgen for a review on PR #12570.
alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #12570.
alexcrichton requested wasmtime-wasi-reviewers for a review on PR #12570.
alexcrichton requested wasmtime-core-reviewers for a review on PR #12570.
alexcrichton commented on PR #12570:
With https://github.com/WebAssembly/component-model/issues/608 closed now the conclusion is that this, as-is, implements the desired semantics of "things aggresively zapped". Given that I think this sould be ready to go, so r? @dicej
alexcrichton requested dicej for a review on PR #12570.
alexcrichton unassigned fitzgen from PR #12570 Remove subtask reparenting.
dicej submitted PR review.
dicej created PR review comment:
Is this still the plan of record, i.e. to wait on the store?
alexcrichton updated PR #12570.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Oops no, forgot to remove this
alexcrichton has enabled auto merge for PR #12570.
alexcrichton added PR #12570 Remove subtask reparenting to the merge queue.
github-merge-queue[bot] removed PR #12570 Remove subtask reparenting from the merge queue.
alexcrichton added PR #12570 Remove subtask reparenting to the merge queue.
alexcrichton merged PR #12570.
alexcrichton removed PR #12570 Remove subtask reparenting from the merge queue.
Last updated: Feb 24 2026 at 04:36 UTC