In everyday life
Two people look at a paper calendar on the office wall, both see Friday free, walk off to invite their guests, and come back to write in the same slot.
One case
A concert app has 1 seat left. At 19:00:00.10 Ana’s phone checks: 1 free. At 19:00:00.12 Ben’s phone checks: still 1 free. Ana books at .20 and Ben books at .22, and the app sells the seat twice.
Every case
Whenever a program reads a value, decides, then writes, there is a gap between the read and the write. If someone else writes in that gap, the decision rests on old data. The bug needs the timing to line up, so it passes every test and appears under load, or once a week. Two AI coding agents in one folder hit the same problem: one undoes the other’s edits.
The word
Engineers call this
Stop the sharing first: give each actor its own copy or its own record. When you must share, make the check and the write one step, for example one database update that books the seat only if it is still free.