Understanding Real-World Ordering-Related Concurrency Bugs under Weak-Memory and Cross-Architecture Settings
Abstract
Modern systems software is increasingly deployed across heterogeneous architectures such as x86, ARM, and RISC‑V, which provide substantially different memory-ordering guarantees. Under weak memory models, hardware and compilers may reorder memory operations or delay their visibility, causing concurrent code that appears correct on x86 to fail in subtle and security-critical ways. In real systems, however, such failures are not limited to instruction-level reorderings: cross-architecture execution can also expose higher-level ordering assumptions about object lifecycle and protocol state. To study this gap, we curate a dataset of 58 manually confirmed real-world concurrency bugs from the Linux Kernel and open-source projects (e.g., MySQL, MariaDB, DPDK, and sofa-pbrpc). We propose Multi-Granularity Ordering (MGO), a taxonomy that organizes these bugs into three layers: micro-instruction, resource lifecycle, and semantic-logic ordering violations. Our analysis shows that micro‑instruction bugs form the largest category in the dataset (32/58, 55.2%) and typically manifest as stale reads or missed signals, whereas resource lifecycle bugs (24/58, 41.4%) are frequently associated with severe memory-safety failures such as use‑after‑free. We further show that these layers differ in architectural exposure and repair strategies: micro-instruction bugs directly capture weak-memory anomalies, while lifecycle and semantic bugs reflect macro-level failures whose manifestation can be amplified in cross-architecture execution. Finally, we identify common mismatches between root causes and repair strategies, and summarize practical implications for future concurrency analysis tools for cross-architecture safety and reliability.