Computer Science ›› 2020, Vol. 47 ›› Issue (9): 31-39.doi: 10.11896/jsjkx.200100075

• Computer Software • Previous Articles     Next Articles

Memory Leak Test Acceleration Based on Script Prediction and Reconstruction

LI Yin1,2, LI Bi-xin1   

  1. 1 School of Computer Science and Engineering,Southeast University,Nanjing 211189,China
    2 Jiangsu Automation Research Institute,Lianyungang,Jiangsu 222006,China
  • Received:2020-01-10 Published:2020-09-10
  • About author:LI Yin,born in 1988,master.His main research interests include bigdata,software reliability and software testing,etc.
    LI Bi-xin,born in 1969,Ph.D,professor.His main research interests include software analysis,testing and verification,and empirical software engineering,etc.

Abstract: Memory leak is a common defect in continuous working software,such as cloud applications,web service,middleware,etc.It can affect the stability of software applications,lead to run in bad performance and even crash.To clearly observe memory leaks,the test cases toward them need to execute longer time in order to generate significant memory pressure.The cost of memory leaks testing is expensive.If the execution orders of test cases are not optimized,we may waste lots of time on the test cases that are not likely to reveal faults before finding test cases that really containing memory leaks.This seriously reduces the efficiency of fault discovery.In order to make up for the shortcomings of the existing technology and solve the problems of the me-mory leak of Java Web program while running for a long time,which is not easy to find,diagnose and repair,this paper studies the memory leak detection technology,proposes the memory leak test script prediction method based on machine learning.The methodtrains and predicts the script with memory leak by building the memory feature model.Then,based on the training model,it predicts the risk value of script memory leak,and gives the corresponding parameter scores,to guide the subsequent script reorganization,can predict and obtain the function test script that is more likely to cause memory leak.At the same time,a script reorganization optimization method is proposed to improve its defect revealing ability.Priority testing of predicted and recombined scripts can accelerate the detection of leakage defects.Finally,a case study shows that the proposed framework has strong leak detection ability.The speed of defect detection of the optimized test script can be more than twice as fast as that of the common script,thus accelerating the exposure time of memory expansion problem,achieving the purpose of improving test efficiency and ensuring software quality.

Key words: Memory leak, Memory leak prediction model, Machine learning, Test script, test script reconstruction

CLC Number: 

  • TP311.5
[1] ŠOR V,SRIRAMAS N.Memory leak detection in Java:Taxonomy and classification of approaches[J].Journal of Systems and Software (JSS),2014,96:139-151.
[2] VALENTIM N A,MACEDO A,MATIASR.A SystematicMapping Review of the First 20 Years of Software Aging and Rejuvenation Research[C]//IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW).2016.
[3] HEINE D L,LAM M S.A practical flow-sensitive and context-sensitive C and C++ memory leak detector[C]//ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI).2003.
[4] XIE Y,AIKEN A.Context- and path-sensitive memory leak detection[C]//13th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE).2005:115-125.
[5] XU Z,ZHANG J,XU Z.Memory leak detection based on me-mory state transition graph[C]//Proceedings of the Asia-Pacific Software Engineering Conference (APSEC).2011:33-40.
[6] SUI Y,YE D,XUE J.Static memory leak detection using full-sparse value-flow analysis[C]//Proceedings of the International Symposium on Software Testing and Analysis.2012.
[7] LI Q,PAN M X,LIX D.Benchmark of tools for memory leak[J].Computer Science and Exploration,2010,4(1):29-35.
[8] JUMP M,MCKINLEY K S.Detecting memory leaks inma-naged languages with Cork[J].Software:Practice and Expe-rience,2010,40(1):1-22.
[9] MAXWELL E K,BACK G,RAMAKRISHNANN.Diagnosingmemory leaks using graph mining on heap dumps[C]//Procee-dings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD).2010:115-124.
[10] RAYSIDE D,MENDE L L.Object ownership profiling:a technique for finding and fixing memory leaks [C]//The 22nd IEEE/ACM International Conference on Automated Software Engineering (ASE).2007:194-203.
[11] ŠOR V,SRIRAMAS N,SALNIKOV-TARNOVSKI N.Memory leak detection in Plumbr.Software[M].Practice and Expe-rience (SPE),2014.
[12] CHILIMBI T,HAUSWIRTHM.Low-overhead memory leakdetection using adaptive statistical profiling[C]//The 11th International Conference on Architectural Support for Programming Languages and Operating Systems.2004.
[13] BOND M D,MCKINLEY K S.Bell:bit-encoding online memory leak detection[C]//The 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS).2006:61-72.
[14] XU G,ROUNTEV A.Precise memory leak detection for Java software using container profiling[J].ACM Transactions on Software Engineering and Methodology (TOSEM),2013,22(3):17.
[15] JUNG C,LEE S,RAMAN E,et al.Automated memory leak detection for production use[C]//International Conference on Software Engineering (ICSE).2014.
[16] LEE S,JUNG C,PANDES.Detecting memory leaks through introspective dynamic behavior modelling using machine learning[C]//International Conference on Software Engineering (ICSE).2014.
[17] JIA X X,WU J,JIN M Z,et al.Overviewon memory leak of Java program [J].Computer Research and Application,2006(9):1-4.
[18] SHAHRIAR H,NORTH S,MAWANG I E.Testing of Memory Leak in Android Applications[C]//International Symposium on High-Assurance Systems Engineering (HASE).2014.
[19] YAN D,YANG S,ROUNTEV A.Systematic testing for re-source leaks in Android applications[C]//24th International Symposium on Software Reliability Engineering (ISSRE).2013.
[20] GUNDECHA U.Selenium Testing Tools Cookbook (2 edition) [M].Packt Publishing,2015.
[21] BODDEN E.Invoke Dynamic support in Soot.ACM SIGPLAN[C]//International Workshop on the State of the Art in Java Program Analysis.2012:51-55.
[1] DING Yu, WEI Hao, PAN Zhi-song, LIU Xin. Survey of Network Representation Learning [J]. Computer Science, 2020, 47(9): 52-59.
[2] SU Chang, ZHANG Ding-quan, XIE Xian-zhong, TAN Ya. NFV Memory Resource Management in 5G Communication Network [J]. Computer Science, 2020, 47(9): 246-251.
[3] WANG Hui, LE Zi-chun, GONG Xuan, WU Yu-kun, ZUO Hao. Review of Link Prediction Methods Based on Feature Classification [J]. Computer Science, 2020, 47(8): 302-312.
[4] YUAN Ye, HE Xiao-ge, ZHU Ding-kun, WANG Fu-lee, XIE Hao-ran, WANG Jun, WEI Ming-qiang, GUO Yan-wen. Survey of Visual Image Saliency Detection [J]. Computer Science, 2020, 47(7): 84-91.
[5] PENG Wei, HU Ning and HU Jing-Jing. Overview of Research on Image Steganalysis Algorithms [J]. Computer Science, 2020, 47(6A): 325-331.
[6] BAO Zhen-shan, GUO Jun-nan, XIE Yuan and ZHANG Wen-bo. Model for Stock Price Trend Prediction Based on LSTM and GA [J]. Computer Science, 2020, 47(6A): 467-473.
[7] ZHU Lin-li, HUA Gang, GAO Wei. Stability Analysis of Ontology Learning Algorithm in Decision Graph Setting [J]. Computer Science, 2020, 47(5): 43-50.
[8] JIAN Song-lei, LU Kai. Survey on Representation Learning of Complex Heterogeneous Data [J]. Computer Science, 2020, 47(2): 1-9.
[9] LIU Miao-miao,HU Qing-cui,GUO Jing-feng,CHEN Jing. Survey of Link Prediction Algorithms in Signed Networks [J]. Computer Science, 2020, 47(2): 21-30.
[10] LIU Yun,YIN Chuan-huan,HU Di,ZHAO Tian,LIANG Yu. Communication Satellite Fault Detection Based on Recurrent Neural Network [J]. Computer Science, 2020, 47(2): 227-232.
[11] YANG Li, MA Jia-jia, JIANG Hua-xi, MA Xiao-xiao, LIANG Geng, ZUO Chun. Requirements Modeling and Decision-making for Machine Learning Systems [J]. Computer Science, 2020, 47(12): 42-49.
[12] WANG Ying, ZHENG Li-wei, ZHANG Yu-yao, ZHANG Xiao-yun. Software Requirement Mining Method for Chinese APP User Review Data [J]. Computer Science, 2020, 47(12): 56-64.
[13] GUO Mao-zu, YANG Shuai, ZHAO Ling-ling. Transcriptome Analysis Method Based on RNA-Seq [J]. Computer Science, 2020, 47(11A): 35-39.
[14] JING Li, LI Man-man, HE Ting-ting. Sentiment Classification of Network Reviews Combining Extended Dictionary and Self-supervised Learning [J]. Computer Science, 2020, 47(11A): 78-82.
[15] BIAN Yu-ning, LU Li-kun, LI Ye-li, ZENG Qing-tao, SUN Yan-xiong. Implementation of Financial Venture Capital Score Card Model Based on Logistic Regression [J]. Computer Science, 2020, 47(11A): 116-118.
Full text



[1] SUN Qi, JIN Yan, HE Kun and XU Ling-xuan. Hybrid Evolutionary Algorithm for Solving Mixed Capacitated General Routing Problem[J]. Computer Science, 2018, 45(4): 76 -82 .
[2] ZHANG Jia-nan and XIAO Ming-yu. Approximation Algorithm for Weighted Mixed Domination Problem[J]. Computer Science, 2018, 45(4): 83 -88 .
[3] ZHOU Yan-ping and YE Qiao-lin. L1-norm Distance Based Least Squares Twin Support Vector Machine[J]. Computer Science, 2018, 45(4): 100 -105 .
[4] LIU Bo-yi, TANG Xiang-yan and CHENG Jie-ren. Recognition Method for Corn Borer Based on Templates Matching in Muliple Growth Periods[J]. Computer Science, 2018, 45(4): 106 -111 .
[5] HAN Kui-kui, XIE Zai-peng and LV Xin. Fog Computing Task Scheduling Strategy Based on Improved Genetic Algorithm[J]. Computer Science, 2018, 45(4): 137 -142 .
[6] WU Shu, ZHOU An-min and ZUO Zheng. PDiOS:Private API Call Detection in iOS Applications[J]. Computer Science, 2018, 45(4): 163 -168 .
[7] LIU Qin. Study on Data Quality Based on Constraint in Computer Forensics[J]. Computer Science, 2018, 45(4): 169 -172 .
[8] LUO Xiao-yang, HUO Hong-tao, WANG Meng-si and CHEN Ya-fei. Passive Image-splicing Detection Based on Multi-residual Markov Model[J]. Computer Science, 2018, 45(4): 173 -177 .
[9] GUO Jun-xia, GUO Ren-fei, XU Nan-shan and ZHAO Rui-lian. Study on Construction of EFSM Model for Web Application Based on Session[J]. Computer Science, 2018, 45(4): 203 -207 .
[10] WENG Li-guo, KONG Wei-bin, XIA Min and CHOU Xue-fei. Satellite Imagery Cloud Fraction Based on Deep Extreme Learning Machine[J]. Computer Science, 2018, 45(4): 227 -232 .