Skip to content

Avoid destroying in-memory alarm tasks while running - #7215

Open
xThreeh wants to merge 1 commit into
cloudflare:mainfrom
xThreeh:fix-inmemory-alarm-self-destruction
Open

Avoid destroying in-memory alarm tasks while running#7215
xThreeh wants to merge 1 commit into
cloudflare:mainfrom
xThreeh:fix-inmemory-alarm-self-destruction

Conversation

@xThreeh

@xThreeh xThreeh commented Sep 2, 2026

Copy link
Copy Markdown

When an in-memory Durable Object alarm completes, cleanup can clear the preview task while its callback is still running. That destroys the active promise callback and aborts workerd with Promise callback destroyed itself. Defer the task cleanup to the next event-loop turn instead. Added a regression test covering an empty alarm handler with in-memory storage. Tests: bazel test //src/workerd/api/tests:actor-alarms-in-memory-test@; bazel test //src/workerd/api/tests:actor-alarms-test@; python tools/cross/format.py --check git. Fixes #7190

@xThreeh
xThreeh requested review from a team as code owners September 2, 2026 02:20
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@xThreeh

xThreeh commented Sep 2, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Sep 2, 2026
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.

Bug: Durable Object alarm firing under durableObjectStorage = (inMemory = void) crashes the workerd process

1 participant