Skip to content

Report schedule_all start errors#2122

Open
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix-schedule-all-start-errors
Open

Report schedule_all start errors#2122
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix-schedule-all-start-errors

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

Fix exec::schedule_all on static_thread_pool so exceptions thrown while preparing item operations are reported with set_error(std::exception_ptr) instead of escaping from start().

set_next is allowed to throw, and schedule_all advertises set_error(std::exception_ptr), but the previous start() noexcept implementation called set_next and connect without a catch boundary. The operation now constructs all child operations before starting any of them, catches preparation failures, and sends the current exception to the receiver. It also tracks how many child operations were actually constructed so partially built operations are cleaned up correctly.

Testing

  • cmake --build build --target test.exec
  • ./build/test/exec/test.exec "schedule_all on static_thread_pool sends errors from set_next"
  • ./build/test/exec/test.exec "[types][static_thread_pool]"
  • ASAN_OPTIONS=abort_on_error=0:symbolize=1 ./build-asan/test/exec/test.exec "schedule_all on static_thread_pool sends errors from set_next"
  • ./build/test/exec/test.exec

@copy-pr-bot

copy-pr-bot Bot commented Jun 19, 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.

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.

1 participant