Lune

ASPLOS2021Top-tier venue

Kard: lightweight data race detection with per-thread memory protection

Adil Ahmad, Sangho Lee, Pedro Fonseca, Byoungyoung Lee

Abstract

Finding data race bugs in multi-threaded programs has proven challenging. A promising direction is to use dynamic detectors that monitor the program's execution for data races. However, despite extensive work on dynamic data race detection, most proposed systems for commodity hardware incur prohibitive overheads due to expensive compiler instrumentation of memory accesses; hence, they are not efficient enough to be used in all development and testing settings.

Kard is a lightweight system that dynamically detects data races caused by inconsistent lock usage-when a program concurrently accesses the same memory object using different locks or only some of the concurrent accesses are synchronized using a common lock. Unlike existing detectors, Kard does not monitor memory accesses using expensive compiler instrumentation. Instead, Kard leverages commodity per-thread memory protection, Intel Memory Protection Keys (MPK). Using MPK, Kard ensures that a shared object is only accessible to a single thread in its critical section, and captures all violating accesses from other concurrent threads. Kard overcomes various limitations of MPK by introducing key-enforced race detection, employing consolidated unique page allocation, carefully managing protection keys, and automatically pruning out non-racy or redundant violations. Our evaluation shows that Kard detects all data races caused by inconsistent lock usage and has a low geometric mean execution time overhead: 7.0% on PARSEC and SPLASH-2x benchmarks and 5.3% on a set of real-world applications (NGINX, memcached, pigz, and Aget).

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A Comprehensive Study of Concurrency Bugs in the Linux Kernel cites Razzer: Finding Kernel Race Bugs through Fuzzing
  • A Comprehensive Study of Concurrency Bugs in the Linux Kernel cites KIT: Testing OS-Level Virtualization for Functional Interference Bugs
  • A Comprehensive Study of Concurrency Bugs in the Linux Kernel cites Snowboard: Finding Kernel Concurrency Bugs through Systematic Inter-thread Communication Analysis
  • KIT: Testing OS-Level Virtualization for Functional Interference Bugs cites Razzer: Finding Kernel Race Bugs through Fuzzing
  • KIT: Testing OS-Level Virtualization for Functional Interference Bugs cites Snowboard: Finding Kernel Concurrency Bugs through Systematic Inter-thread Communication Analysis
  • SpecMPK: Efficient In-Process Isolation with Speculative and Secure Permission Update Instruction cites ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
  • Snowboard: Finding Kernel Concurrency Bugs through Systematic Inter-thread Communication Analysis cites Razzer: Finding Kernel Race Bugs through Fuzzing
  • ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK) cites Enforcing Least Privilege Memory Views for Multithreaded Applications
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. Snowboard: Finding Kernel Concurrency Bugs through Systematic Inter-thread Communication AnalysisSishuai Gong, Deniz Altinbüken, Pedro Fonseca, Petros ManiatisSOSP 2021 · 26 citations
  2. Execution reconstruction: harnessing failure reoccurrences for failure reproductionGefei Zuo, Jiacheng Ma, Andrew Quinn, Pramod Bhatotia et al.PLDI 2021 · 23 citations
  3. KIT: Testing OS-Level Virtualization for Functional Interference BugsCongyu Liu, Sishuai Gong, Pedro FonsecaASPLOS 2023 · 16 citations
  4. SpecMPK: Efficient In-Process Isolation with Speculative and Secure Permission Update InstructionDebpratim Adak, Huiyang Zhou, Eric Rotenberg, Amro AwadHPCA 2025 · 3 citations
  5. A Comprehensive Study of Concurrency Bugs in the Linux KernelSishuai Gong, Chih-En Lin, Kevin Wu, Edwin Lu et al.ICSE 2026 · 1 citation

Builds on9

  1. T-SGX: Eradicating Controlled-Channel Attacks Against Enclave ProgramsMing-Wei Shih, Sangho Lee, Taesoo Kim, Marcus PeinadoNDSS 2017 · 431 citations
  2. ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler et al.USENIX Security 2019 · 247 citations
  3. Razzer: Finding Kernel Race Bugs through FuzzingDae R. Jeong, Kyungtae Kim, Basavesh Shivakumar, Byoungyoung Lee et al.S&P 2019 · 202 citations
  4. Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling PointersThurston H. Y. Dang, Petros Maniatis, David A. WagnerUSENIX Security 2017 · 77 citations
  5. Enforcing Least Privilege Memory Views for Multithreaded ApplicationsTerry Ching-Hsiang Hsu, Kevin J. Hoffman, Patrick Eugster, Mathias PayerCCS 2016 · 71 citations

Related papers

  1. Accurate Static Data Race Detection for CEmerson Sales, Omar Inverso, Emilio TuostoFM 2024 · 1 citation
  2. SuperCollider: Scalable and Effective Data Race Detection for CUDAMark Stephenson, Sana Damani, Mohamed Tarek Ibn Ziad, Anis Ladram et al.PLDI 2026
  3. ScoRD: A Scoped Race Detector for GPUsAditya K. Kamath, Alvin A. George, Arkaprava BasuISCA 2020 · 12 citations
  4. Fast, sound, and effectively complete dynamic race predictionAndreas PavlogiannisPOPL 2020 · 46 citations
  5. HiRace: Accurate and Fast Data Race Checking for GPU ProgramsJohn Jacobson, Martin Burtscher, Ganesh GopalakrishnanSC 2024 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines