mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## Why Creating the telemetry shutdown thread during shutdown can fail under resource pressure, including when the native thread guard page cannot be allocated. ## What changed - Start and verify a dedicated shutdown worker when `OtelProvider` is created. - Send the provider to the prepared worker for bounded shutdown, while preserving timeout behavior and avoiding a potentially blocking destructor if worker preparation failed. - Rename the fallible provider constructor to `try_new`. ## Testing Add Unix regression coverage that injects guard-page allocation failures, plus coverage for worker preparation failure, successful shutdown, and timeouts. GitOrigin-RevId: 3656298078a800a7fa392437c2ee4a68753092e3