Skip to content

fix: Improve behavior for OOM-killed tasks#11477

Merged
anthonyshew merged 3 commits into
mainfrom
shew/0a2af
Jan 15, 2026
Merged

fix: Improve behavior for OOM-killed tasks#11477
anthonyshew merged 3 commits into
mainfrom
shew/0a2af

Conversation

@anthonyshew
Copy link
Copy Markdown
Contributor

@anthonyshew anthonyshew commented Jan 15, 2026

Summary

Behavioral change: Previously ChildExit::KilledExternal, ChildExit::Finished(None), and ChildExit::Failed returned internal errors (InternalError::ExternalKill, InternalError::UnknownChildExit). Now they're handled as normal task failures with proper exit codes, error logging, and respect for --continue flags.

Changes:

  • KilledExternal → task failure with exit code 137 (SIGKILL convention)
  • Finished(None) / Failed → task failure with exit code 1
  • Add OOM detection hints for Windows NT status codes and Unix exit code 137
  • Remove InternalError::ExternalKill variant

This means externally-killed tasks now behave consistently with tasks that exit non-zero rather than causing internal errors.

- Add Windows OOM detection for NT status codes (STATUS_NO_MEMORY,
  STATUS_STACK_OVERFLOW, STATUS_COMMITMENT_LIMIT)
- Add Unix OOM detection for SIGKILL (exit code 137)
- Handle ChildExit::Finished(None), ChildExit::Failed, and
  ChildExit::KilledExternal as task failures with proper error messages
- Remove ExternalKill error variant in favor of proper task failure handling
- Provide clearer error messages indicating likely OOM conditions
@anthonyshew anthonyshew requested a review from a team as a code owner January 15, 2026 17:33
@anthonyshew anthonyshew requested a review from tknickman January 15, 2026 17:33
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
examples-basic-web Ready Ready Preview, Comment Jan 15, 2026 5:49pm
examples-designsystem-docs Ready Ready Preview, Comment Jan 15, 2026 5:49pm
examples-gatsby-web Ready Ready Preview, Comment Jan 15, 2026 5:49pm
examples-kitchensink-blog Ready Ready Preview, Comment Jan 15, 2026 5:49pm
examples-nonmonorepo Ready Ready Preview, Comment Jan 15, 2026 5:49pm
examples-svelte-web Ready Ready Preview, Comment Jan 15, 2026 5:49pm
examples-tailwind-web Ready Ready Preview, Comment Jan 15, 2026 5:49pm
examples-vite-web Ready Ready Preview, Comment Jan 15, 2026 5:49pm
turbo-site Ready Ready Preview, Comment Jan 15, 2026 5:49pm

Comment thread crates/turborepo-task-executor/src/exec.rs Outdated
@anthonyshew anthonyshew changed the title fix(turbo): Improve error messages for OOM-killed tasks fix: Improve behavior for OOM-killed tasks Jan 15, 2026
Comment thread crates/turborepo-task-executor/src/exec.rs Outdated
@anthonyshew anthonyshew merged commit 182fe22 into main Jan 15, 2026
101 checks passed
@anthonyshew anthonyshew deleted the shew/0a2af branch January 15, 2026 18:06
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