Automated memory leak detection for production use

This paper presents Sniper, an automated memory leak detection tool for C/C++ production software. To track the staleness of allocated memory (which is a clue to potential leaks) with little overhead (mostly <3%), Sniper leverages instruction sampling using performance monitoring units available in commodity processors. It also offloads the time- and space-consuming analyses, and works on the original software without modifying the underlying memory allocator; it neither perturbs the application execution nor increases the heap size. The Sniper can even deal with multithreaded applications with very low overhead. In particular, it performs a statistical analysis, which views memory leaks as anomalies, for automated and systematic leak determination. Consequently, it accurately detected real-world memory leaks with no false positive, and achieved an F-measure of 81% on average for 17 benchmarks stress-tested with various memory leaks.

[1]  Yuanyuan Zhou,et al.  SafeMem: exploiting ECC-memory for detecting memory leaks and memory corruption during production runs , 2005, 11th International Symposium on High-Performance Computer Architecture.

[2]  Sanjay Ghemawat,et al.  MapReduce: Simplified Data Processing on Large Clusters , 2004, OSDI.

[3]  Alessandro Orso,et al.  LEAKPOINT: pinpointing the causes of memory leaks , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[4]  Emery D. Berger,et al.  Efficiently and precisely locating memory leaks and bloat , 2009, PLDI '09.

[5]  Matthias Hauswirth,et al.  Low-overhead memory leak detection using adaptive statistical profiling , 2004, ASPLOS XI.

[6]  Godmar Back,et al.  HDPV: interactive, faithful, in-vivo runtime state visualization for C/C++ and Java , 2008, SOFTVIS.

[7]  Robert O. Hastings,et al.  Fast detection of memory leaks and access errors , 1991 .

[8]  Michael D. Bond,et al.  LeakChaser: helping programmers narrow down causes of memory leaks , 2011, PLDI '11.

[9]  Hairong Kuang,et al.  The Hadoop Distributed File System , 2010, 2010 IEEE 26th Symposium on Mass Storage Systems and Technologies (MSST).

[10]  Sung-Soo Lim,et al.  Performance characterization of prelinking and preloadingfor embedded systems , 2007, EMSOFT '07.

[11]  Laurie A. Williams,et al.  Realizing quality improvement through test driven development: results and experiences of four industrial teams , 2008, Empirical Software Engineering.

[12]  Monica S. Lam,et al.  A practical flow-sensitive and context-sensitive C and C++ memory leak detector , 2003, PLDI '03.

[13]  Santosh Pande,et al.  Detecting memory leaks through introspective dynamic behavior modelling using machine learning , 2014, ICSE.

[14]  Atanas Rountev,et al.  LeakChecker: Practical Static Memory Leak Detection for Managed Languages , 2014, CGO '14.

[15]  Atanas Rountev,et al.  Precise memory leak detection for java software using container profiling , 2013, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[16]  Kai Li,et al.  The PARSEC benchmark suite: Characterization and architectural implications , 2008, 2008 International Conference on Parallel Architectures and Compilation Techniques (PACT).

[17]  Alexander Aiken,et al.  Context- and path-sensitive memory leak detection , 2005, ESEC/FSE-13.

[18]  S. Eranian Perfmon2: a flexible performance monitoring interface for Linux , 2010 .

[19]  Julia Kastner,et al.  Introduction to Robust Estimation and Hypothesis Testing , 2005 .

[20]  できるシリーズ編集部 Red Hat Enterprise Linux 7 , 2015 .

[21]  Sriram Rao,et al.  A The Quantcast File System , 2013, Proc. VLDB Endow..

[22]  Kwangkeun Yi,et al.  Practical memory leak detector based on parameterized procedural summaries , 2008, ISMM '08.

[23]  Godmar Back,et al.  Perfctr-Xen: a framework for performance counter virtualization , 2011, VEE '11.

[24]  Naren Ramakrishnan,et al.  Diagnosing memory leaks using graph mining on heap dumps , 2010, KDD.

[25]  Sigmund Cherem,et al.  Practical memory leak detection using guarded value-flow analysis , 2007, PLDI '07.

[26]  Michael D. Bond,et al.  Bell: bit-encoding online memory leak detection , 2006, ASPLOS XII.

[27]  Nathan Clark,et al.  DDT: Design and evaluation of a dynamic program analysis for optimizing data structure usage , 2009, 2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[28]  Santosh Pande,et al.  Brainy: effective selection of data structures , 2011, PLDI '11.

[29]  Wenguang Chen,et al.  Taming Hardware Event Samples for Precise and Versatile Feedback Directed Optimizations , 2013, IEEE Transactions on Computers.

[30]  Michael D. Bond,et al.  Tolerating memory leaks , 2008, OOPSLA.

[31]  Qin Zhao,et al.  Practical memory checking with Dr. Memory , 2011, International Symposium on Code Generation and Optimization (CGO 2011).

[32]  Kevin Skadron,et al.  Bubble-up: Increasing utilization in modern warehouse scale computers via sensible co-locations , 2011, 2011 44th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[33]  Junfeng Yang,et al.  Using model checking to find serious file system errors , 2004, TOCS.

[34]  Nicholas Nethercote,et al.  Valgrind: a framework for heavyweight dynamic binary instrumentation , 2007, PLDI '07.

[35]  B. Ramakrishna Rau,et al.  Instruction-level Parallelism , 2001 .

[36]  James A. Whittaker,et al.  How to Break Software Security , 2003 .

[37]  Michael D. Bond,et al.  Leak pruning , 2009, ASPLOS.