Two threads each add 1 to the same `int64_t` one million times. The expected final value is 2,000,000; the observed value is closer to 520,000. The read–modify–write window swallows the lost updates.
Pitfall demolished — An increment on a shared integer is atomic, and `volatile` makes it so.