---
title: "Testing race conditions with memory access tracing and stack-based delay injection"
description: "MAccConc is a set of tools for exploring thread interleavings of multi-threaded Linux kernel test cases to confirm, regression-test and eventually fuzz race condition bugs."
url: "https://swe.quest/articles/testing-race-conditions-with-memory-access-tracing-and-stack-based-delay-a9851e9c2152e266"
canonical: "https://projectzero.google/2026/09/maccconc-race-condition.html"
source: "Google Project Zero"
published: "2026-09-08"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 16
tags: ["concurrency","linux","vulnerability-research","testing","debugging"]
---

# Testing race conditions with memory access tracing and stack-based delay injection

A post on [Google Project Zero](https://swe.quest/sources/project-zero.md), published 2026-09-08, 16 min read, Deep dive. Original: [https://projectzero.google/2026/09/maccconc-race-condition.html](https://projectzero.google/2026/09/maccconc-race-condition.html)

## Summary

MAccConc is a set of tools for exploring thread interleavings of multi-threaded Linux kernel test cases to confirm, regression-test and eventually fuzz race condition bugs. It records memory accesses via KASAN outline instrumentation fed through KCOV, finds communication points (overlapping accesses where at least one is a write), and identifies accesses stably across runs with count-augmented stack traces built from a new LLVM SanitizerCoverage function entry/exit feature. A new KCOV\_SET\_DI ioctl injects wait/wake actions at specific accesses, supporting both happens-before constraints and fully specified context-switch orderings. An automatic A-B-A interleaving tester, a terminal UI and a GUI are demonstrated on a dup-vs-close race.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Vulnerability research](https://swe.quest/tags/vulnerability-research.md) (Security)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)

## Prerequisites

- Linux kernel internals ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- race conditions
- KASAN and sanitizers
- KCOV coverage

## Keywords

MAccConc, KCOV, KASAN, SanitizerCoverage, LLVM, SKI, Project Zero

## Related posts

- [On the Effectiveness of Mutational Grammar Fuzzing](https://swe.quest/articles/on-the-effectiveness-of-mutational-grammar-fuzzing-edf57a83d5fa06c9.md): Google Project Zero · 2026-03-05 · Hard · 9 min read · Vulnerability research, Testing
  Coverage-guided mutational grammar fuzzing has two weaknesses.
- [GPT-5.5-Cyber built a zlib fuzzing lab in a day](https://swe.quest/articles/gpt-5-5-cyber-built-a-zlib-fuzzing-lab-in-a-day-34216d52ce035220.md): Trail of Bits · 2026-07-02 · Medium · 5 min read · Vulnerability research, AI agents, Testing, Open source, C & C++
  GPT-5.5-Cyber, driven through Codex's /goal command, independently chose dynamic testing over static review of heavily audited zlib and built a full fuzzing campaign in a day.
- [Magic-trace: Diagnosing tricky performance issues easily with Intel Processor Trace](https://swe.quest/articles/magic-trace-diagnosing-tricky-performance-issues-easily-with-intel-processor-bf89d988f02b1230.md): Jane Street Tech Blog · 2022-01-11 · Hard · 14 min read · Performance engineering, Hardware, Linux, Debugging, Functional programming
  Magic-trace is an open-source tool that uses Intel Processor Trace in circular-buffer mode to capture roughly the last 10ms of execution before a chosen function call, then renders every function call on a nanosecond-resolution timeline in a forked Perfetto UI.
- [A thousand fewer paths to root](https://swe.quest/articles/a-thousand-fewer-paths-to-root-c8474fd0ac7978f5.md): OpenAI · 2026-11-04 · Medium · 18 min read · Vulnerability research, Linux, AI agents, Security
  An autonomous five-stage pipeline (scouting, static analysis, KASAN-based dynamic validation, exploit development, patch generation, then human review) scanned the Linux kernel and produced 948 distinct working local privilege escalation exploits plus 291 info-leak PoCs from 2,308 candidate findings, at about $1.2M in API cost (~$1,279 per LPE).
- [The case of the vanishing CPU: A Linux kernel debugging story](https://swe.quest/articles/the-case-of-the-vanishing-cpu-a-linux-kernel-debugging-story-3db1aa1b81ec8319.md): ClickHouse · 2025-03-05 · Hard · 32 min read · Linux, Memory management, Debugging, Performance engineering, Incidents & postmortems
  Intermittent, indefinite CPU saturation of ClickHouse Cloud pods, seen only on GCP, turned out to be a Linux kernel memory-management livelock.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
