Skip to content

Conversation

@dayshah
Copy link
Contributor

@dayshah dayshah commented Oct 6, 2025

Why are these changes needed?

Currently if the task_execution_handler in _raylet.pyx throws an exception before we can get into the actual task handling code that catches all exceptions, cython will end up just continuing execution to return Status::OK. This means that we could finish ExecuteTask with Status::OK and a return objects vector that has empty objects leading to the dreaded objects_valid check failure.

Instead of a check failure this will catch the exception, log an error, and return an UnexpectedSystemExit with the exception information so the worker can exit gracefully and the driver can get the exception information for better debuggability. For example: #57253 was hard to figure out for a long time because we didn't know why we were skipping the object storing phase in Cython. This would've made it much easier.

…h when task execution code throws an exception

Signed-off-by: dayshah <dhyey2019@gmail.com>
@dayshah dayshah added the go add ONLY when ready to merge, run all tests label Oct 6, 2025
@dayshah dayshah marked this pull request as ready for review October 7, 2025 05:53
@dayshah dayshah requested a review from a team as a code owner October 7, 2025 05:53
@dayshah dayshah merged commit 8f6c0f0 into ray-project:master Oct 7, 2025
5 checks passed
@dayshah dayshah deleted the exit-instead-objvalid branch October 7, 2025 07:07
@ray-gardener ray-gardener bot added the core Issues that should be addressed in Ray Core label Oct 7, 2025
aslonnie added a commit that referenced this pull request Oct 8, 2025
cherrypick #57247 #57253 #57138

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
aslonnie added a commit that referenced this pull request Oct 8, 2025
cherrypick #57247 #57253 #57138

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
liulehui pushed a commit to liulehui/ray that referenced this pull request Oct 9, 2025
joshkodi pushed a commit to joshkodi/ray that referenced this pull request Oct 13, 2025
…tion (ray-project#57247)

Signed-off-by: dayshah <dhyey2019@gmail.com>
Signed-off-by: Josh Kodi <joshkodi@gmail.com>
justinyeh1995 pushed a commit to justinyeh1995/ray that referenced this pull request Oct 20, 2025
xinyuangui2 pushed a commit to xinyuangui2/ray that referenced this pull request Oct 22, 2025
…tion (ray-project#57247)

Signed-off-by: dayshah <dhyey2019@gmail.com>
Signed-off-by: xgui <xgui@anyscale.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
…tion (ray-project#57247)

Signed-off-by: dayshah <dhyey2019@gmail.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
…tion (ray-project#57247)

Signed-off-by: dayshah <dhyey2019@gmail.com>
Signed-off-by: Future-Outlier <eric901201@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants