Penguin
Note: You are viewing an old revision of this page. View the current version.

A RaceCondition is a Synchronisation bug in which the results of some computation or action depend in an unsafe way upon the the actions of other threads or processes.

Several security-related RaceConditions have occurred when a program checks file permissions and ownership before reading the file. The obvious implementation of this has a RaceCondition which allows the file to be changed between the check and the reading. File operations should if at all possible be Atomic.

A DeadLock is perfered to a RaceCondition, because with a DeadLock, something is obviously wrong, whereas a RaceCondition can give no indication of a problem until someone notices corrupt data or a security breach.