Automated Statistical Approach for Memory Leak Detection: Case Studies

  • Vladimir Šor
  • Nikita Salnikov-Tarnovski
  • Satish Narayana Srirama
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7045)


Applications written in JavaTM language, and in other programming languages running on JavaTM Virtual Machine (JVM) are widely used in cloud environments. Although JVM features garbage collection, memory leaks can still happen in these applications. Current solutions for finding memory leaks have several drawbacks which become critical when deployed in distributed and dynamic environments like cloud. Statistical approach for memory leak detection gives good results in terms of false positives and we have implemented automatic statistical approach for memory leak detection in JavaTM applications. To test its correctness and performance we have conducted several experiments by finding memory leaks in a large web-application and searching for related bugs in open source projects from Apache Software Foundation. This paper presents the results of these experiments and concludes that automated statistical method for memory leak detection is efficient and can be used also in production systems to find hardly reproducible leaks.


Memory leak troubleshooting JavaTM cloud computing 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Active mq issue tracker, ticket 3021 (2011),
  2. 2.
    Amazon Inc.: Elastic Compute Cloud (EC2) (2011),
  3. 3.
    Apache Software Foundation: ActiveMQ (2011),
  4. 4.
    Apache Software Foundation: Apache Software Foundation issue tracker (2011),
  5. 5.
    Apache Software Foundation: JMeter (2011),
  6. 6.
    AppDynamics: home page (2011),
  7. 7.
    Armbrust, M., et al.: Above the Clouds, A Berkeley View of Cloud Computing. Technical report UCB/EECS-2009-28, University of California (February 2009)Google Scholar
  8. 8.
    CA Wily Introscope: Home page (2010),
  9. 9.
    Chen, K., Chen, J.B.: Aspect-based instrumentation for locating memory leaks in java programs. In: 31st Annual International Computer Software and Applications Conference, COMPSAC 2007, vol. 2, pp. 23–28 (July 2007)Google Scholar
  10. 10.
    Chilimbi, T.M., Hauswirth, M.: Low-overhead memory leak detection using adaptive statistical profiling. In: 11th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, pp. 156–164 (2004)Google Scholar
  11. 11.
    Ellahi, T., Hudzia, B., Li, H., Lindner, M.A., Robinson, P.: The Enterprise Cloud Computing Paradigm. In: Cloud Computing: Principles and Paradigms. John Wiley & Sons, Inc. (2011)Google Scholar
  12. 12.
    Jump, M., McKinley, K.S.: Cork: dynamic memory leak detection for garbage-collected languages. In: 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2007), pp. 31–38. ACM (2007)Google Scholar
  13. 13.
    Maxwell, E.K.: Graph Mining Algorithms for Memory Leak Diagnosis and Biological Database Clustering. Master’s thesis, Virginia Polytechnic Institute and State University (2010)Google Scholar
  14. 14. NetBeans profiler (2011),
  15. 15.
    Sun Microsystems Inc.: JvmTM tool interface (2006),
  16. 16.
    The Eclipse Foundation: Memory analyzer (2011),
  17. 17.
    Šor, V., Srirama, S.N.: A statistical approach for identifying memory leaks in cloud applications. In: First International Conference on Cloud Computing and Services Science (CLOSER 2011), pp. 623–628. SciTePress (May 2011)Google Scholar
  18. 18.
    Xu, G., Rountev, A.: Precise memory leak detection for java software using container profiling. In: ACM/IEEE 30th International Conference on Software Engineering, ICSE 2008, pp. 151–160 (May 2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Vladimir Šor
    • 1
    • 2
  • Nikita Salnikov-Tarnovski
    • 2
  • Satish Narayana Srirama
    • 1
  1. 1.Institute of Computer ScienceUniversity of TartuTartuEstonia
  2. 2.AS Webmedia R&DTartuEstonia

Personalised recommendations