The Daily WTF
Follow
Racing Trains
Robert G experienced a travel disruption when his train car was unexpectedly detached. He needed to rebook his journey, which caused a thirty-minute delay. To avoid further inconvenience, Robert used the train company's app to secure a reservation on the next train, receiving a confirmation. While waiting, he had coffee, expecting a smooth transition. Upon boarding the next train, he encountered another passenger who claimed the same reserved seat. Both passengers presented their phone app confirmations, showing the identical seat reservation with the same timestamp. They also checked their email confirmations, which further corroborated their conflicting reservations. Fortunately, the train was not full, so everyone found a seat without issue. This incident highlighted a critical race condition in the train company's reservation system, where the check-and-reserve process was not atomic. The author speculates that the bug persists due to a lack of prioritization, either due to indifference or the overwhelming number of other software issues. The system likely allows two users to book the same seat simultaneously because the check-and-reserve actions are not performed as a single, indivisible operation.