Skip to Main Content
Message races, which can cause nondeterministic executions of a message-passing program, should be detected for debugging. Especially it is more important to detect the first race that occurs for the first time in a process than to detect affected races that might be side effects of nondeterminism. The previous techniques are not efficient to detect those races because they require more than two runs of a program. This paper presents an efficient technique that requires only one execution to detect the first race in each process. For this, we use a new information, called message history, that consists of send/receive events related to the first race. Also we introduce an algorithm to detect the first races using message history. In the experiment, we show that our technique exactly detects the first race during an execution using several MPI programs.