A Workload-Related Software Aging Detection Method Based on Differential Analysis
Wenzhi XIE1, 2, Bin XU1, Kai JIA1, 2, Dongdong ZHAO1, 2, Jing TIAN1, Jianwen XIANG1, 2
Author information+
Show less
文章历史+
Received
Published
2022-09-30
2023-04-24
Issue Date
2026-07-23
PDF (1233K)
摘要
传统的基于趋势分析的老化检测方法可能存在较高的误报。虽然多版本检测方法将先前的健壮版本作为基准版本与待测软件版本进行差分分析,但基准版本是否存在软件老化问题被忽略。为了解决以上问题,提出了一种基于差分分析的负载相关方法来检测软件老化。该方法对待测软件施加不同强度的负载,通过监控不同负载下内存资源消耗(驻留集大小(resident set size,RSS))趋势的差异并分析其与负载差异之间的关系,帮助开发人员在软件开发过程中检测单个版本(无需先验知识)的软件老化。实验结果表明,本文的方法能够检测出由内存泄漏引发软件老化,并且能够应用到真实的商业软件Squid中。
Abstract
The traditional aging detection methods based on trend analysis may have high false alarms. In addition, the multi-version detection methods have been proposed to differentially analyze the previous robust version as the baseline version from the software version to be tested, the presence of software aging in the baseline version is ignored. To address the above issues, a workload-related software aging detection method based on differential analysis is proposed to detect software aging. The method applies different intensities of load to the software under test. It helps developers to detect software aging of a single version (without a priori knowledge) during the software development process by monitoring the difference of memory resource consumption (resident set size, RSS) trend and analyzing its relationship with the load difference. The results show that the proposed method is capable of detecting software aging caused by memory leaks, and can apply our method to existing commercial software Squid.
软件老化是指在长时间运行的系统中,残留的老化缺陷(aging related bugs,ARBs)被激活导致的性能下降或崩溃故障[1]。软件老化现象已经在许多系统中观测到,例如:Linux系统[2]、安卓操作系统[3]、Web服务[4]、边缘计算[5]和TensorFlow[6]等。ARBs主要包括内存泄漏、未释放的文件锁、存储问题、套接字异常、未释放的文件句柄和错误的积累[7]。其中内存泄漏是导致软件老化的重要原因之一。内存泄漏主要由应用程序内存管理使用中的软件故障引起的,它会导致长时间不断运行的系统中内存资源耗尽。Macêdo等[8]介绍了内存相关软件老化的机制。Andrzejak等[9]在C/C++中收集了分配的内存片段、大小和它们的生命周期,并使用机器学习分类器来检测C/C++代码中的内存泄漏。Ghanavati等[10]研究了Java中内存泄漏的机制,当应用程序不再使用对象但垃圾回收器(garbage collector, GC)无法将它们从工作内存中删除时,就会发生内存泄漏,从而导致应用程序消耗越来越多的资源。内存泄漏是研究最多的软件老化问题,因为它会影响系统可用性,并且在实际系统中经常出现,因此本文将侧重研究检测由内存泄漏引发的软件老化。
本文的方法流程如图1所示。使用负载生成器对单个版本软件施加不同的负载,以不同的时间间隔运行待测软件,时间间隔短的为高负载,时间间隔长的低负载。每隔一定的时间间隔,分别收集不同负载下软件的RSS(resident set size)使用情况。在不同的负载下,存在内存泄漏的软件与不存在内存泄漏的软件的行为不同:存在内存泄漏的软件在高负载下内存的积累比低负载下积累得多,所以在不同负载下资源的消耗差异很大;不存在内存泄漏的软件因为不存在内存的积累,所以在不同负载下资源消耗的差距会很小。用差异函数
HUANGY, KINTALAC, KOLETTISN, et al. Software rejuvenation: Analysis, module and applications[C]//25th International Symposium on Fault⁃Tolerant Computing. New York:IEEE, 1995: 381-390. DOI: 10.1109/FTCS.1995.466961 .
[2]
COTRONEOD, NATELLAR, PIETRANTUONOR, et al. Software aging analysis of the linux operating system[C]//2010 IEEE 21st International Symposium on Software Reliability Engineering. New York: IEEE Press, 2010: 71-80. DOI: 10.1109/ISSRE.2010.24 .
[3]
COTRONEOD, DE SIMONEL, NATELLAR, et al. A configurable software aging detection and rejuvenation agent for android[C]//2019 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW). New York: IEEE Press, 2020: 239-245. DOI: 10.1109/ISSREW.2019.00078 .
[4]
PARRIJ, SAMPIETROS, SCOMMEGNAL, et al. Evaluation of software aging in component-based Web Applications subject to soft errors over time[C]//2021 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW). New York: IEEE Press, 2022: 25-32. DOI: 10.1109/ISSREW53611.2021.00040 .
[5]
BAIJ, CHANGX L, MACHIDAF, et al. Impact of service function aging on the dependability for MEC service function chain [J]. IEEE (99)Transactions on Dependable and Secure Computing, 2022: 1. DOI: 10.1109/TDSC.2022.3150782 .
[6]
DUX T, XIAOG P, SUIY L. Fault triggers in the TensorFlow framework: An experience report[C]//2020 IEEE 31st International Symposium on Software Reliability Engineering (ISSRE). New York: IEEE Press, 2020: 1-12. DOI: 10.1109/ISSRE5003.2020.00010 .
[7]
徐斌. 跨项目软件老化缺陷预测[D]. 武汉: 武汉理工大学, 2021.
[8]
XUB. Cross-ProjectAging-RelatedBug Prediction [D]. Wuhan: Wuhan University of Technology, 2021(Ch).
[9]
MACÊDOA, FERREIRAT B, MATIASR. The mechanics of memory-related software aging[C]//2010 IEEE Second International Workshop on Software Aging and Rejuvenation. New York: IEEE Press, 2011: 1-5. DOI: 10.1109/WOSAR.2010.5722097 .
[10]
ANDRZEJAKA, EICHLERF, GHANAVATIM. Detection of memory leaks in C/C++ code via machine learning[C]//2017 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW). New York: IEEE Press, 2017: 252-258. DOI: 10.1109/ISSREW.2017.72 .
[11]
GHANAVATIM, COSTAD, SEBOEKJ, et al. Memory and resource leak defects and their repairs in Java Projects[J]. Empirical Software Engineering, 2020, 25(1): 678-718. DOI: 10.1007/s10664-019-09731-8 .
[12]
PIETRANTUONOR, ALONSOJ, VAIDYANATHANK. Measurements for software aging[M]//Handbook of Software Aging and Rejuvenation. Singapore: World Scientific Publishing Co Pte Ltd, 2020: 73-90. DOI: 10.1142/9789811214578_0004 .
[13]
ZHENGP F, XUQ G, QIY. An advanced methodology for measuring and characterizing software aging[C]//2012 IEEE 23rd International Symposium on Software Reliability Engineering Workshops. New York: IEEE Press, 2013: 253-258. DOI: 10.1109/ISSREW.2012.81 .
[14]
MACHIDAF, ANDRZEJAKA, MATIASR, et al. On the effectiveness of Mann-Kendall test for detection of software aging[C]//2013 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW). New York: IEEE Press, 2013: 269-274. DOI: 10.1109/ISSREW.2013.6688905 .
[15]
MATIASR, ANDRZEJAKA, MACHIDAF, et al. A systematic differential analysis for fast and robust detection of software aging[C]//2014 IEEE 33rd International Symposium on Reliable Distributed Systems. New York: IEEE Press, 2014: 311-320. DOI: 10.1109/SRDS.2014.38 .
[16]
LANGNERF, ANDRZEJAKA. Detecting software aging in a cloud computing framework by comparing development versions[C]//2013 IFIP/IEEE International Symposium on Integrated Network Management (IM 2013). New York: IEEE Press, 2013: 896-899.
[17]
LANGNERF, ANDRZEJAKA. Detection and root cause analysis of memory-related software aging defects by automated tests[C]//Proceedings of the 2013 IEEE 21st International Symposium on Modelling, & . New York: ACM, 2013: 365-369. DOI: 10.1109/MASCOTS.2013.53 .
[18]
GHANAVATIM, ANDRZEJAKA. Automated memory leak diagnosis by regression testing[C]//2015 IEEE 15th International Working Conference on Source Code Analysis and Manipulation (SCAM). New York: IEEE Press, 2015: 191-200. DOI: 10.1109/SCAM.2015.7335415 .
[19]
TODDL. THRIFT-873[EB/OL]. [2010-08-27].
[20]
FULLERC M, RAIZNERA E, VERANIM S, et al. Early post-myocardial infarction treadmill stress testing: An accurate predictor of multivessel coronary disease and subsequent cardiac events[J]. Annals of Internal Medicine, 1981, 94(6): 734-739. DOI: 10.7326/0003-4819-94-6-734 .
[21]
王思家. 基于SPC的软件老化检测方法研究[D]. 哈尔滨: 哈尔滨工程大学, 2020.
[22]
WANGS J. Research on Software Aging Detection Method Based on SPC[D]. Harbin: Harbin Engineering University, 2020(Ch).
[23]
MATIASR, DE SENAG O, ANDRZEJAKA, et al. Software aging detection based on differential analysis: An experimental study[C]//2016 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW). New York: IEEE Press, 2016: 71-77. DOI: 10.1109/ISSREW.2016.44 .