ABSTRACT
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.
- packet-o-matic. http://www.packet-o-matic.org/.Google Scholar
- Squid: Optimising web delivery. http://www.squid-cache.org/.Google Scholar
- Red hat enterprise linux 6. Technical report, Red Hat, 2012.Google Scholar
- C. Bienia, S. Kumar, J. P. Singh, and K. Li. The PARSEC Benchmark Suite: Characterization and Architectural Implications. In Proc. of the 17th PACT, Oct. 2008. Google ScholarDigital Library
- H. J. Boehm. Space efficient conservative garbage collection. SIGPLAN Not., 39:490–501, April 2004. Google ScholarDigital Library
- M. Bond and K. McKinley. Tolerating memory leaks. In Proceedings of the 23rd ACM SIGPLAN OOPSLA. ACM, 2008. Google ScholarDigital Library
- M. D. Bond and K. McKinley. Leak pruning. In Proceeding of the 14th ASPLOS, pages 277–288. ACM, 2009. Google ScholarDigital Library
- M. D. Bond and K. S. McKinley. Bell: bit-encoding online memory leak detection. In Proc. of the 12th ASPLOS, New York, USA, 2006. Google ScholarDigital Library
- D. Bruening and Q. Zhao. Practical memory checking with dr. memory. In Proc. of the 9th CGO, 2011. Google ScholarDigital Library
- D. Chen, N. Vachharajani, R. Hundt, X. Li, S. Eranian, W. Chen, and W. Zheng. Taming hardware event samples for precise and versatile feedback directed optimizations. Computers, IEEE Transactions on. Google ScholarDigital Library
- S. Cherem, L. Princehouse, and R. Rugina. Practical memory leak detection using guarded value-flow analysis. In Proc. of 28th PLDI’07. Google ScholarDigital Library
- T. M. Chilimbi and M. Hauswirth. Low-overhead memory leak detection using adaptive statistical profiling. In Proc. of 11th ASPLOS’04. Google ScholarDigital Library
- J. Clause and A. Orso. Leakpoint: pinpointing the causes of memory leaks. In Proc. of the 32nd ICSE, New York, NY, USA, 2010. Google ScholarDigital Library
- CVE Details. Common Vulnerabilities and Exposures (CVE), 2013. http://www.cvedetails.com.Google Scholar
- CWE Details. Common Weakness Enumeration (CWE), 2013. http://cwe.mitre.org/data/definitions/401.html.Google Scholar
- J. Dean and S. Ghemawat. Mapreduce: simplified data processing on large clusters. In Proc. of 5th USENIX OSDI, 2004. Google ScholarDigital Library
- P. J. Drongowski. Instruction-based sampling: A new performance analysis technique for amd family 10h processors, 2007.Google Scholar
- S. Eranian. Perfmon2: a Standard Performance Monitoring Interface.Google Scholar
- R. Hastings and B. Joyce. Purify: Fast detection of memory leaks and access errors. In Proc. of the 1992 USENIX Winter Conference.Google Scholar
- D. L. Heine and M. S. Lam. A practical flow- and context-sensitive c/c++ memory leak detector. In Proc. of the 23rd PLDI, 2003. Google ScholarDigital Library
- Intel Corporation. Intel R Microarchitecture Codename Nehalem Performance Monitoring Unit Programming Guide, 2010.Google Scholar
- Journal of Instruction Level Parallelism. 3rd workshop on computer architecture competitions: Memory scheduling championship, 2012.Google Scholar
- C. Jung and N. Clark. Ddt: design and evaluation of a dynamic program analysis for optimizing data structure usage. In Proceedings of the 42nd Annual IEEE/ACM International Symposium on Microarchitecture, MICRO 42nd, 2009. Google ScholarDigital Library
- C. Jung, S. Rus, B. P. Railing, N. Clark, and S. Pande. Brainy: effective selection of data structures. In Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation, PLDI ’11, pages 86–97, New York, NY, USA, 2011. ACM. Google ScholarDigital Library
- C. Jung, D.-K. Woo, K. Kim, and S.-S. Lim. Performance characterization of prelinking and preloading for embedded systems. In Proc. of the 7th ACM & IEEE EMSOFT, New York, NY, USA, 2007. Google ScholarDigital Library
- Y. Jung and K. Yi. Practical memory leak detector based on parameterized procedural summaries. In Proc. of the 7th ISMM, 2008. Google ScholarDigital Library
- S. Lee, C. Jung, and S. Pande. Detecting memory leaks through introspective dynamic behavior modelling using machine learning. In Proceedings of the 36th International Conference on Software Engineering, 2014. Google ScholarDigital Library
- J. Mars, L. Tang, R. Hundt, K. Skadron, and M. L. Soffa. Bubble-up: Increasing utilization in modern warehouse scale computers via sensible co-locations. In MICRO ’11: Proceedings of The 44th Annual IEEE/ACM International Symposium on Microarchitecture, New York, NY, USA, 2011. ACM. Google ScholarDigital Library
- E. K. Maxwell, G. Back, and N. Ramakrishnan. Diagnosing memory leaks using graph mining on heap dumps. In Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’10, pages 115–124, 2010. Google ScholarDigital Library
- B. Meredith. Omega: An instant leak detector tool for Valgrind, 2008. http://www.brainmurders.eclipse.co.uk/omega.html.Google Scholar
- Michael Procopio. Cloud computing does not require virtualization, 2011. http://www.enterprisecioforum.com.Google Scholar
- Microsoft SharePoint Foundation. Hyper-V Performance Tests, 2010. http://technet.microsoft.com/en-us/library/gg454734.aspx.Google Scholar
- Mozilla.org. Mozilla Bugzilla, 2014. https://bugzilla.mozilla.org.Google Scholar
- N. Nagappan, E. M. Maximilien, T. Bhat, and L. Williams. Realizing quality improvement through test driven development: results and experiences of four industrial teams. Empirical Softw. Eng., 2008. Google ScholarDigital Library
- N. Nethercote and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In Proc. of the 28th PLDI, 2007. Google ScholarDigital Library
- R. Nikolaev and G. Back. Perfctr-xen: a framework for performance counter virtualization. In Proc. of the 7th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments, VEE ’11, 2011. Google ScholarDigital Library
- G. Novark, E. D. Berger, and B. G. Zorn. Efficiently and precisely locating memory leaks and bloat. In Proc. of the 30th PLDI, 2009. Google ScholarDigital Library
- M. Ovsiannikov, S. Rus, D. Reeves, P. Sutter, S. Rao, and J. Kelly. A the quantcast file system. PVLDB, 6(11):1092–1101, 2013. Google ScholarDigital Library
- F. Qin, S. Lu, and Y. Zhou. Safemem: Exploiting ecc-memory for detecting memory leaks and memory corruption during production runs. In Proc. of the 11th HPCA, 2005. Google ScholarDigital Library
- S. Eranian. Perfmon2: a flexible performance monitoring interface for linux. In In Ottawa Linux Symposium (OLS), 2006.Google Scholar
- K. Shvachko, H. Kuang, S. Radia, and R. Chansler. The hadoop distributed file system. In Proceedings of the 2010 IEEE 26th Symposium on Mass Storage Systems and Technologies (MSST), MSST ’10, pages 1–10, 2010. Google ScholarDigital Library
- J. Sundararaman and G. Back. Hdpv: Interactive, faithful, in-vivo runtime state visualization for c/c++ and java. In Proceedings of the 4th ACM Symposium on Software Visualization, SoftVis ’08, pages 47–56, 2008. Google ScholarDigital Library
- J. Whittaker. How to Break Software Security. Addision Wesley.Google Scholar
- R. Wilcox. Introduction to Robust Estimation and Hypothesis Testing. Elsevier Science & Technology, 2012.Google Scholar
- Y. Xie and A. Aiken. Context- and path-sensitive memory leak detection. In Proc. of FSE. ACM Press, 2005. Google ScholarDigital Library
- G. Xu, M. D. Bond, F. Qin, and A. Rountev. Leakchaser: helping programmers narrow down causes of memory leaks. In Proc. of the 32nd PLDI, 2011. Google ScholarDigital Library
- G. Xu and A. Rountev. Precise memory leak detection for java software using container profiling. In Proc. of ICSE, 2008. Google ScholarDigital Library
- G. Xu and A. Rountev. Precise memory leak detection for java software using container profiling. ACM Trans. Softw. Eng. Methodol., 22(3):17:1–17:28, July 2013. Google ScholarDigital Library
- D. Yan, G. Xu, S. Yang, and A. Rountev. LeakChecker: Practical static memory leak detection for managed languages. In International Symposium on Code Generation and Optimization, 2014. Google ScholarDigital Library
- J. Yang, P. Twohey, and D. Engler. Using model checking to find serious file system errors. In In Proc. OSDI 2004, pages 273–288, 2004. Google ScholarDigital Library
- J. Yang, P. Twohey, D. Engler, and M. Musuvathi. Using model checking to find serious file system errors. ACM Trans. Comput. Syst., 24(4):393–423, Nov. 2006. Google ScholarDigital Library
Index Terms
- Automated memory leak detection for production use
Recommendations
Efficiently and precisely locating memory leaks and bloat
PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and ImplementationInefficient use of memory, including leaks and bloat, remain a significant challenge for C and C++ developers. Applications with these problems become slower over time as their working set grows and can become unresponsive. At the same time, memory ...
Memory leak detection with context awareness
RACS '12: Proceedings of the 2012 ACM Research in Applied Computation SymposiumEmbedded applications with a long running life time particularly require a high degree of reliability. Many types of weaknesses residing in software can reduce the reliability, but memory leaks are prominent sources of software weaknesses for long ...
Memory Leak Detection in Sun Solaris OS
ISCSCT '08: Proceedings of the 2008 International Symposium on Computer Science and Computational Technology - Volume 02Memory leak has been exposed to be one of the most serious bugs which are hard to locate and fix in computer program. This paper describes three methods of detecting memory leaks in Solaris when programmers do applications. Using dbx can get specific ...
Comments