Abstract:In large-scale parallel computing scenarios, failures such as node anomalies or process hangs can easily lead to a decline in system performance, seriously affecting the execution efficiency and stability of tasks. Existing call stack analysis tools often suffer from high overhead, strong intrusiveness, and inability to perform continuous sampling, making them difficult to meet the lightweight detection requirements of large-scale parallel computing scenarios. To address these challenges, this study designs and implements a lightweight, non-intrusive call stack sampling and analysis tool based on eBPF technology, named StackProfiler, for call stack sampling and performance anomaly detection in parallel programs. StackProfiler accurately captures system-wide function call relationships with low overhead, without modifying application source code. By analyzing high-frequency functions, anomalous nodes or problematic processes can be rapidly identified. Combined with call context information, deeper analysis of anomaly causes can be further conducted. Experimental evaluations on multiple benchmark programs and typical parallel applications show that the runtime overhead of the proposed tool is less than 3%, and the continuous data collection volume of a single node does not exceed 6 MB, demonstrating excellent lightweight characteristics and practicality. In simulated real-world scenarios including degraded node computational efficiency, interference from residual processes, and program logic errors, anomalies are accurately identified. StackProfiler provides an efficient new solution for performance diagnosis, analysis, and fault localization of large-scale parallel programs.