Categories//de/The Subtle Bug

The Subtle Bug

advanced10 min140 pts

Your team's transfer service has been in production for 3 months. A senior engineer reviewing a related PR noticed something concerning.

I think there's a race condition in the transfer logic. Can you audit the whole service? I'm seeing occasional balance discrepancies.

What you're being evaluated on

Concurrency understanding - Identifying the TOCTOU race condition.
Transaction boundary awareness - What should and shouldn't be inside the transaction.
Edge case thinking - Batch processing, retry logic, and reconciliation gaps.

3 hints available (using hints reduces your score)

About this scenario

A senior flagged a concurrency bug in the transfer service. Can you find it? Your team's transfer service has been in production for 3 months. A senior engineer reviewing a related PR noticed something concerning.

advanced · 140 points · 10 min · Code Reasoning

What you will practice

Play the full scenario above for free. More Code Reasoning scenarios · Create a free account to save your progress.