maxdraco

Race condition

A bug where the outcome depends on which of two things happens first.

Concept Programming and AI

A race condition is a bug where the result depends on which of two things happens first. When two programs, or two parts of one program, use the same thing at the same moment without taking turns, one can act on information the other has just changed. Races are hard to reproduce because they depend on timing, and some can be exploited, for example by slipping a change in between a security check and the action it was guarding.

See also

  • Polling Checking something over and over on a timer to see whether it has changed, instead of waiting to be told.
  • Kernel The core of an operating system, which controls the hardware and runs every other program.
  • AI Artificial intelligence: software that performs tasks usually thought to need human judgement.
  • API A defined way for one program to ask another for data or actions.
  • Endpoint (route) One specific address on a web service that a program can call to do one job.
  • Environment variable A named setting a running program inherits from whatever started it.
  • Exit code The number a program hands back when it finishes: zero for success, anything else for failure.
  • Git Free software that records every change to a set of files, used to keep the history of most software projects.

Sources

  1. CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')MITREofficial healthy, checked 2026-11-15 archived copy
  2. Race conditionWikipedia healthy, checked 2026-11-15 archived copy

In security catalogues