一句话:通过58个真实并发缺陷的实证研究,提出三层次的多粒度顺序(MGO)分类法,揭示弱内存与跨架构下的缺陷模式与修复错配。
现代系统软件日益部署在 x86、ARM、RISC-V 等异构架构上,它们提供的内存顺序保证差异显著。在弱内存模型下,硬件与编译器可能重排内存操作或延迟其可见性,使在 x86 上看似正确的并发代码出现微妙且涉及安全性的错误。然而真实系统中的此类失败并不仅限于指令级重排:跨架构执行还会暴露关于对象生命周期与协议状态的更高层顺序假设。为研究这一缺口,作者从 Linux 内核及 MySQL、MariaDB、DPDK、sofa-pbrpc 等开源项目中人工确认了 58 个真实并发缺陷,构建数据集,并提出多粒度顺序(MGO)分类法,将缺陷划分为微指令层、资源生命周期层与语义逻辑层三类顺序违例。分析显示,微指令缺陷占比最大(32/58,55.2%),常表现为过期读或丢失唤醒;资源生命周期缺陷(24/58,41.4%)则常伴随 use-after-free 等严重内存安全失败。进一步表明,这些层次在架构暴露程度与修复策略上各不相同:微指令缺陷直接刻画弱内存异常,而生命周期与语义缺陷反映宏观层面的失败,其表现会在跨架构执行中被放大。最后,作者指出根因与修复策略之间常见的错配,并总结了面向跨架构安全与可靠性的未来并发分析工具的实践启示。
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.
@inproceedings{paperbot12447,
title = {Understanding Real-World Ordering-Related Concurrency Bugs under Weak-Memory and Cross-Architecture Settings},
author = {Shaohao Wang and Cheng Wen and Yuandao Cai and Shengchao Qin and Jie Su and Mengda He and Xiaoxue Ma and Cong Tian},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834494}
}