Skip to content

Remove subtask reparenting#12570

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:subtask-redux
Feb 23, 2026
Merged

Remove subtask reparenting#12570
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:subtask-redux

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

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::subtasks field and all relevant manipulations of it.

This field, however, powered the TaskExit abstraction returned from call_concurrent. This commit then subsequently deletes TaskExit and 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:

Closes #12544

@alexcrichton
Copy link
Copy Markdown
Member Author

This is a draft while WebAssembly/component-model#608 is being discussed to figure out the desired behavior here

@github-actions github-actions bot added fuzzing Issues related to our fuzzing infrastructure wasi Issues pertaining to WASI labels Feb 11, 2026
@github-actions
Copy link
Copy Markdown

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 .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton marked this pull request as ready for review February 20, 2026 20:35
@alexcrichton alexcrichton requested review from a team as code owners February 20, 2026 20:35
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team February 20, 2026 20:35
@alexcrichton
Copy link
Copy Markdown
Member Author

With WebAssembly/component-model#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 alexcrichton requested review from dicej and removed request for fitzgen February 20, 2026 20:36
This commit updates the implementation of component-model-async
primitives to remove the manual subtask reparenting process. This is
required to fix bytecodealliance#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::subtasks` field and all relevant
manipulations of it.

This field, however, powered the `TaskExit` abstraction returned from
`call_concurrent`. This commit then subsequently deletes `TaskExit` and
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 serve` has 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 bytecodealliance#12544

prtest:full
@alexcrichton alexcrichton added this pull request to the merge queue Feb 23, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 23, 2026
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::subtasks` field and all relevant
manipulations of it.

This field, however, powered the `TaskExit` abstraction returned from
`call_concurrent`. This commit then subsequently deletes `TaskExit` and
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 serve` has 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

prtest:full
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 23, 2026
@alexcrichton alexcrichton added this pull request to the merge queue Feb 23, 2026
Merged via the queue into bytecodealliance:main with commit 1e0b0b4 Feb 23, 2026
174 checks passed
@alexcrichton alexcrichton deleted the subtask-redux branch February 23, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure wasi Issues pertaining to WASI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic juggling subtasks in wasip3

2 participants