Title: fix(core): retry TASK_PROCESS_SIGSEGV under the user's retry policy by matt-aitken · Pull Request #3552 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: fix(core): retry TASK_PROCESS_SIGSEGV under the user's retry policy by matt-aitken · Pull Request #3552 · triggerdotdev/trigger.dev
X Title: fix(core): retry TASK_PROCESS_SIGSEGV under the user's retry policy by matt-aitken · Pull Request #3552 · triggerdotdev/trigger.dev
Description: Closes TRI-9234 What this changes SIGSEGV crashes (TASK_PROCESS_SIGSEGV) will now be retried when an attempt fails, in line with the task's configured retry settings (retry.maxAttempts etc.) — the same path SIGTERM and uncaught exceptions already use. Previously SIGSEGV was hard-classified as non-retriable and failed the run on the first segfault, ignoring the user's retry policy. Tasks without a retry policy still fail fast on the first SIGSEGV. Behaviour is unchanged for OOM kills (separate machine-bump retry path) and SIGKILL_TIMEOUT. Deploy Only the webapp needs to ship. The retry decision lives entirely in the webapp: V2 path: internal-packages/run-engine (bundled into the webapp) V1 path: apps/webapp/app/v3/services/completeAttempt.server.ts No supervisor, CLI, SDK, or customer-task-image changes required. Customers do not need to redeploy. The @trigger.dev/core changeset is just keeping the public package in sync — the published npm version isn't what makes the fix work. Why retry SIGSEGV in Node tasks is frequently non-deterministic across processes: Native addon races (sharp, canvas, better-sqlite3, node-rdkafka, bcrypt, …) — libuv thread-pool work stepping on V8 handles. Different heap layout / thread schedule on a fresh process → retry often succeeds. JIT / GC interaction — V8 turbofan deopt or GC during a native callback. Timing-dependent. Near-OOM in native code — when RSS approaches the cgroup limit, native allocations fail and poorly-written addons dereference NULL → SIGSEGV instead of clean OOM-kill. Host / hardware issues — bit flips, kernel quirks. Retry lands on a different host. The genuinely deterministic case (a user-code bug always tripping the same addon) is real, but a subset — and maxAttempts bounds the damage. Pre-existing inconsistency this resolves shouldRetryError returned false for TASK_PROCESS_SIGSEGV → fail_run. shouldLookupRetrySettings already listed TASK_PROCESS_SIGSEGV as retry-config-aware — but that branch was unreachable because shouldRetryError short-circuited first in retrying.ts:86-90. We already retry TASK_RUN_UNCAUGHT_EXCEPTION (clearly a user-code bug) under the user's retry policy; refusing to retry SIGSEGV was the odd one out. Test plan pnpm exec vitest run test/errors.test.ts in packages/core — 26/26 pass (4 new) pnpm run build --filter @trigger.dev/core CI green on PR 🤖 Generated with Claude Code
Open Graph Description: Closes TRI-9234 What this changes SIGSEGV crashes (TASK_PROCESS_SIGSEGV) will now be retried when an attempt fails, in line with the task's configured retry settings (retry.maxAttempts etc.) — ...
X Description: Closes TRI-9234 What this changes SIGSEGV crashes (TASK_PROCESS_SIGSEGV) will now be retried when an attempt fails, in line with the task's configured retry settings (retry.maxAttempts etc....
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/3552
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:fd2d78d4-1553-bce1-6b93-9aef6e457abc |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A78C:3FB3E8:2CB0045:3FE16C1:6AFAE417 |
| html-safe-nonce | 8c19192d811fca6034d686fc962cf91e40a5b2e59a5243407d1a1c55c0839076 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzhDOjNGQjNFODoyQ0IwMDQ1OjNGRTE2QzE6NkFGQUU0MTciLCJ2aXNpdG9yX2lkIjoiNDk2NzcwNDgwMTUwOTU2NTQ2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0fde137dd93e7719cf3ab553d2221ffd9cab1bd1dec3ff37d836106b96c6f277 |
| hovercard-subject-tag | pull_request:3662924308 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/3552/files |
| twitter:image | https://avatars.githubusercontent.com/u/10635986?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10635986?s=400&v=4 |
| og:image:alt | Closes TRI-9234 What this changes SIGSEGV crashes (TASK_PROCESS_SIGSEGV) will now be retried when an attempt fails, in line with the task's configured retry settings (retry.maxAttempts etc.) — ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d9bd51a568909a83d1abb9d6f74d68f0c87ca85fe3a56d3f5d70d8b89add9f2 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a7ae932999cc6d511008dbf980ff9efad2a31f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width