Skip to content

fix(serve): stop logging InterruptedException as a 500 query error#440

Merged
tinder-maxwellelliott merged 2 commits into
Tinder:masterfrom
maxwellE:claude/error-investigation-testing-q463bd
Jul 19, 2026
Merged

fix(serve): stop logging InterruptedException as a 500 query error#440
tinder-maxwellelliott merged 2 commits into
Tinder:masterfrom
maxwellE:claude/error-investigation-testing-q463bd

Conversation

@maxwellE

@maxwellE maxwellE commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Production logs showed "[Error] error computing impacted targets" with a java.lang.InterruptedException stack out of BuildGraphHasher's runBlocking. That interrupt is not an application failure: it comes from stop()'s computeExecutor.shutdownNow() tearing down an in-flight request during JVM shutdown (HttpServer.stop's grace period is shorter than a hash generation), or from a timed-out request's future.cancel(true) leaving a stale interrupt flag on a pooled compute thread that then poisons an unrelated request's first blocking call.

  • handleQuery now maps InterruptedException to a 503 with a warn-level log instead of the generic 500 + error-level stack trace.
  • computeWithTimeout clears any leaked interrupt flag before running a task, so a cancelled request that never observed its interrupt (e.g. blocked in synchronized on the generation lock) cannot fail the next request served by the same pool thread.

claude and others added 2 commits July 18, 2026 12:39
Production logs showed "[Error] error computing impacted targets" with a
java.lang.InterruptedException stack out of BuildGraphHasher's runBlocking.
That interrupt is not an application failure: it comes from stop()'s
computeExecutor.shutdownNow() tearing down an in-flight request during
JVM shutdown (HttpServer.stop's grace period is shorter than a hash
generation), or from a timed-out request's future.cancel(true) leaving a
stale interrupt flag on a pooled compute thread that then poisons an
unrelated request's first blocking call.

- handleQuery now maps InterruptedException to a 503 with a warn-level
  log instead of the generic 500 + error-level stack trace.
- computeWithTimeout clears any leaked interrupt flag before running a
  task, so a cancelled request that never observed its interrupt (e.g.
  blocked in `synchronized` on the generation lock) cannot fail the next
  request served by the same pool thread.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014uD7fwXvjPfYipBf7pnhP5
@tinder-maxwellelliott
tinder-maxwellelliott merged commit 84a122f into Tinder:master Jul 19, 2026
15 checks passed
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.

3 participants