HMTRace: Hardware-Assisted Memory-Tagging based Dynamic Data Race Detection (2404.19139v1)
Abstract: Data race, a category of insidious software concurrency bugs, is often challenging and resource-intensive to detect and debug. Existing dynamic race detection tools incur significant execution time and memory overhead while exhibiting high false positives. This paper proposes HMTRace, a novel Armv8.5-A memory tag extension (MTE) based dynamic data race detection framework, emphasizing low compute and memory requirements while maintaining high accuracy and precision. HMTRace supports race detection in userspace OpenMP- and Pthread-based multi-threaded C applications. HMTRace showcases a combined f1-score of 0.86 while incurring a mean execution time overhead of 4.01% and peak memory (RSS) overhead of 54.31%. HMTRace also does not report false positives, asserting all reported races.
- Aget – multithreaded http download. https://www.gnutoolbox.com/aget/.
- Kard: Lightweight data race detection with per-thread memory protection. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’21, page 647–660, New York, NY, USA, 2021. Association for Computing Machinery.
- Apache http server. https://github.com/apache/httpd.
- Archer: effectively spotting data races in large openmp applications. In 2016 IEEE international parallel and distributed processing symposium (IPDPS), pages 53–62. IEEE, 2016.
- The parsec benchmark suite: characterization and architectural implications. In Proceedings of the 17th International Conference on Parallel Architectures and Compilation Techniques, PACT ’08, page 72–81, New York, NY, USA, 2008. Association for Computing Machinery.
- Racerd: Compositional static race detection. Proc. ACM Program. Lang., 2(OOPSLA), oct 2018.
- Pacer: Proportional detection of data races. PLDI ’10, page 255–268, New York, NY, USA, 2010. Association for Computing Machinery.
- Llov: A fast static data-race checker for openmp programs. ACM Trans. Archit. Code Optim., 17(4), dec 2020.
- A deployable sampling strategy for data race detection. FSE 2016, page 810–821, New York, NY, USA, 2016. Association for Computing Machinery.
- Parallel programming in OpenMP. Morgan kaufmann, 2001.
- Ifrit: Interference-free regions for dynamic data-race detection. SIGPLAN Not., 47(10):467–484, oct 2012.
- Effective data-race detection for the kernel. In Proceedings of the 9th USENIX Conference on Operating Systems Design and Implementation, OSDI’10, page 151–162, USA, 2010. USENIX Association.
- Edward A Feustel. On the advantages of tagged architecture. IEEE Transactions on Computers, 100(7):644–656, 1973.
- AFL++ : Combining incremental steps of fuzzing research. In 14th USENIX Workshop on Offensive Technologies (WOOT 20). USENIX Association, August 2020.
- Fasttrack: Efficient and precise dynamic race detection. PLDI ’09, page 121–133, New York, NY, USA, 2009. Association for Computing Machinery.
- Vincenzo Frascino. Arm v8.5 memory tagging extension. In Proceedings of the Linux Plumbers Conference, Lisbon, Portugal, volume 10, 2019.
- llvm’s getelementptr. https://llvm.org/docs/GetElementPtr.html.
- A survey on parallelism and determinism. ACM Comput. Surv., 55(10), feb 2023.
- Cpufreq governor. https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt.
- Grapheneos-14. https://grapheneos.org/releases#shiba-stable.
- Dynamic data race detection for openmp programs. In SC18: International Conference for High Performance Computing, Networking, Storage and Analysis, pages 767–778, 2018.
- What is iaas? https://aws.amazon.com/what-is/iaas/.
- Iaas cost scaling. https://redmonk.com/rstephens/2023/04/11/iaaspricing2022/.
- jemalloc: malloc implemention with fragmentation handling. https://github.com/jemalloc/jemalloc.
- Drddr: a lightweight method to detect data races in linux kernel. The Journal of Supercomputing, 72(4):1645–1659, Apr 2016.
- Private communication. .
- CORD: A collaborative framework for distributed data race detection. In Eighth Workshop on Hot Topics in System Dependability (HotDep 12), Hollywood, CA, October 2012. USENIX Association.
- Racemob: Crowdsourced data race detection. In Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles, SOSP ’13, page 406–422, New York, NY, USA, 2013. Association for Computing Machinery.
- Kernel concurrency sanitizer. https://docs.kernel.org/dev-tools/kcsan.html.
- Leslie Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21(7):558–565, jul 1978.
- LLVM: A compilation framework for lifelong program analysis and transformation. pages 75–88, San Jose, CA, USA, Mar 2004.
- Efficient scalable thread-safety-violation detection: Finding thousands of concurrency bugs during testing. SOSP ’19, page 162–180, New York, NY, USA, 2019. Association for Computing Machinery.
- High-precision evaluation of both static and dynamic tools using dataracebench. In 2021 IEEE/ACM 5th International Workshop on Software Correctness for HPC Applications (Correctness), pages 1–8, 2021.
- When threads meet events: Efficient and precise static race detection with origins. PLDI 2021, page 725–739, New York, NY, USA, 2021. Association for Computing Machinery.
- Finding concurrency bugs with context-aware communication graphs. In 2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO), pages 553–563, 2009.
- Literace: Effective sampling for lightweight data-race detection. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’09, page 134–143, New York, NY, USA, 2009. Association for Computing Machinery.
- The complexity of dynamic data race prediction. In Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 713–727, 2020.
- Memcached in-memory database. https://memcached.org/about.
- Enabling mte in linux kernel. https://docs.kernel.org/arm64/memory-tagging-extension.html.
- Armv8.5-a memory tagging extension. https://developer.arm.com/media/ArmDeveloperCommunity/PDF/Arm_Memory_Tagging_Extension_Whitepaper.pdf.
- Murphy’s law. https://en.wikipedia.org/wiki/Murphys_law.
- What are race conditions? some issues and formalizations. ACM Letters on Programming Languages and Systems (LOPLAS), 1(1):74–88, 1992.
- Nginx web server. https://docs.nginx.com/.
- Aikido: Accelerating shared data dynamic analyses. In Proceedings of the Seventeenth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XVII, page 173–184, New York, NY, USA, 2012. Association for Computing Machinery.
- Parsec/splash-2x repo. https://github.com/cirosantilli/parsec-benchmark.
- pigz, unpigz - compress or expand files. https://linux.die.net/man/1/pigz.
- Pixel 8 specification. https://store.google.com/us/product/pixel_8_specs?hl=en-US.
- Efficient on-the-fly data race detection in multithreaded c++ programs. SIGPLAN Not., 38(10):179–190, jun 2003.
- Posix threads. https://man7.org/linux/man-pages/man7/pthreads.7.html.
- Redis in-memory database. https://redis.io/docs/.
- Precise detection of kernel data races with probabilistic lockset analysis.
- Eraser: A dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst., 15(4):391–411, nov 1997.
- Threadsanitizer: Data race detection in practice. In Proceedings of the Workshop on Binary Instrumentation and Applications, WBIA ’09, page 62–71, New York, NY, USA, 2009. Association for Computing Machinery.
- Racez: a lightweight and non-invasive race detection tool for production applications. In 2011 33rd International Conference on Software Engineering (ICSE), pages 401–410, 2011.
- Sqlite3 database engine. https://www.sqlite.org/docs.html.
- Svf: interprocedural static value-flow analysis in llvm. In Proceedings of the 25th international conference on compiler construction, pages 265–266. ACM, 2016.
- Ompracer: A scalable and precise static race detector for openmp programs. In SC20: International Conference for High Performance Computing, Networking, Storage and Analysis, pages 1–14, 2020.
- Openrace: An open source framework for statically detecting data races. 2021 IEEE/ACM 5th International Workshop on Software Correctness for HPC Applications (Correctness), pages 25–32, 2021.
- Dynamic race detection with o(1) samples. Proc. ACM Program. Lang., 7(POPL), jan 2023.
- Thread id. https://man7.org/linux/man-pages/man2/gettid.2.html.
- https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags.
- Userland. https://userland.tech/.
- Prorace: Practical data race detection for production use. SIGPLAN Not., 52(4):149–162, apr 2017.
- Txrace: Efficient data race detection using commodity hardware transactional memory. SIGARCH Comput. Archit. News, 44(2):159–173, mar 2016.
- Push: Data race detection based on hardware-supported prevention of unintended sharing. In Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture, MICRO ’52, page 886–898, New York, NY, USA, 2019. Association for Computing Machinery.