Skip to content

Destroy nvexec ensure_started completion storage before freeing it - #2189

Open
fallintoplace wants to merge 2 commits into
NVIDIA:mainfrom
fallintoplace:fix/nvexec-ensure-started-destruction
Open

Destroy nvexec ensure_started completion storage before freeing it#2189
fallintoplace wants to merge 2 commits into
NVIDIA:mainfrom
fallintoplace:fix/nvexec-ensure-started-destruction

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • wait for the pending completion copy before destroying managed storage
  • destroy the managed completion variant before freeing its allocation
  • cover both consumed and detached senders with a non-trivial completion value

Why

ensure_started placement-constructs its completion storage in managed memory. The shared state freed that memory without running the variant destructor, so the active completion value was never destroyed.

The direct stream path copies the completion asynchronously. Its recorded event now synchronizes that copy before host destruction. If recording the event fails after the copy is queued, destruction synchronizes the stream instead.

@copy-pr-bot

copy-pr-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@fallintoplace
fallintoplace marked this pull request as draft August 11, 2026 16:44
@fallintoplace
fallintoplace force-pushed the fix/nvexec-ensure-started-destruction branch from d05453e to 639fe05 Compare August 11, 2026 19:45
@ericniebler

Copy link
Copy Markdown
Collaborator

why is this a draft PR?

@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test 639fe05

@fallintoplace

Copy link
Copy Markdown
Contributor Author

I want to check until I am sure that everything is working correctly and there is no hidden regression.

@fallintoplace
fallintoplace force-pushed the fix/nvexec-ensure-started-destruction branch from 639fe05 to 5f0df5b Compare August 11, 2026 20:07
@fallintoplace
fallintoplace marked this pull request as ready for review August 11, 2026 20:17
@fallintoplace
fallintoplace force-pushed the fix/nvexec-ensure-started-destruction branch from 5f0df5b to 02729eb Compare August 11, 2026 20:32
@fallintoplace
fallintoplace marked this pull request as draft August 11, 2026 20:32
@fallintoplace
fallintoplace marked this pull request as ready for review August 11, 2026 20:32
@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test 02729eb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants