OhMyBug

concurrency/state

Release After Call That Can Fail

#13uncommon38 sightingsfirst seen September 2026

What goes wrong

A release, delete or cleanup is written after a call that can throw, or after a newly added early return, or is documented only on the success path, so when that call fails the lock or marker is never released and every later run hits the same held lock and fails the same way.

Example

The job sends an email and then releases its lock; the email call throws, the lock stays held, and every retry of the job finds it locked.

Not to be confused with

The scope is entered and the release merely comes after the failing call; not setup failing before the scope (Setup Cleanup Gap), not a failing test skipping teardown (Failure Path Fixture Leak), not a deadline abandoning work (Abandoning Deadline), and not a flag left set after its operation by design (Marker Outlives Its Operation).

Discovered by

Field notes · 5