skip to main content
article

Bell: bit-encoding online memory leak detection

Published:20 October 2006Publication History
Skip Abstract Section

Abstract

Memory leaks compromise availability and security by crippling performance and crashing programs. Leaks are difficult to diagnose because they have no immediate symptoms. Online leak detection tools benefit from storing and reporting per-object sites (e.g., allocation sites) for potentially leaking objects. In programs with many small objects, per-object sites add high space overhead, limiting their use in production environments.This paper introduces Bit-Encoding Leak Location (Bell), a statistical approach that encodes per-object sites to a single bit per object. A bit loses information about a site, but given sufficient objects that use the site and a known, finite set of possible sites, Bell uses brute-force decoding to recover the site with high accuracy.We use this approach to encode object allocation and last-use sites in Sleigh, a new leak detection tool. Sleigh detects stale objects (objects unused for a long time) and uses Bell decoding to report their allocation and last-use sites. Our implementation steals four unused bits in the object header and thus incurs no per-object space overhead. Sleigh's instrumentation adds 29% execution time overhead, which adaptive profiling reduces to 11%. Sleigh's output is directly useful for finding and fixing leaks in SPEC JBB2000 and Eclipse, although sufficiently many objects must leak before Bell decoding can report sites with confidence. Bell is suitable for other leak detection approaches that store per-object sites, and for other problems amenable to statistical per-object metadata.

References

  1. D. Bacon, P. Cheng, and V. Rajan. A Real-Time Garbage Collector with Low Overhead and Consistent Utilization. In Symposium on Principles of Programming Languages, pages 285--298, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. BEA. JRockit. http://dev2dev.bea.com/jrockit/.]]Google ScholarGoogle Scholar
  3. BEA. JRockit Mission Control. http://dev2dev.bea.com/jrockit/-tools.html.]]Google ScholarGoogle Scholar
  4. E.D. Berger, B.G. Zorn, and K.S. McKinley. Reconsidering Custom Memory Allocation. In Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 1--12, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S.M. Blackburn, P. Cheng, and K. S. McKinley. Oil and Water? High Performance Garbage Collection in Java with MMTk. In International Conference on Software Engineering, pages 137--146, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S.M. Blackburn, R. Garner, C. Hoffman, A.M. Khan, K.S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S.Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J.E.B. Moss, A. Phansalkar, D. Stefanovíc, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S.M. Blackburn and A.L. Hosking. Barriers: Friend or Foe? In International Symposium on Memory Management, pages 143--151, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Briggs and K.D. Cooper. Effective Partial Redundancy Elimination. In Conference on Programming Language Design and Implementation, pages 159--170, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. CERT/CC. CERT/CC Advisories. http://www.cert.org/advisories/.]]Google ScholarGoogle Scholar
  10. T.M. Chilimbi and M. Hauswirth. Low-Overhead Memory Leak Detection Using Adaptive Statistical Profiling. In International Conference on Architectural Support for Programming Languages and Operating Systems, pages 156--164, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. B. Chor and O. Goldreich. Unbiased Bits from Sources of Weak Randomness and Probabilistic Communication Complexity. SIAM J. Comput., 17(2):230--261, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Commons-Math: The Jakarta Mathematics Library. http://jakarta.-apache.org/commons/math/.]]Google ScholarGoogle Scholar
  13. T.M. Cover and J.A. Thomas. Elements of Information Theory. John Wiley & Sons, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Dieckmann and U. Hölzle. A Study of the Allocation Behavior of the SPECjvm98 Java Benchmarks. In European Conference on Object-Oriented Programming, pages 92--115, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Eclipse.org Home. http://www.eclipse.org/.]]Google ScholarGoogle Scholar
  16. J. Fenn and A. Linden. Hype Cycle Special Report for 2005. Gartner Group.]]Google ScholarGoogle Scholar
  17. N. Grcevski, A. Kielstra, K. Stoodley, M. G. Stoodley, and V. Sundaresan. Java Just-in-Time Compiler and Virtual Machine Improvements for Server and Middleware Applications. In Virtual Machine Research and Technology Symposium, pages 151--162, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Hastings and B. Joyce. Purify: Fast Detection of Memory Leaks and Access Errors. In Winter USENIX Conference, pages 125--136, 1992.]]Google ScholarGoogle Scholar
  19. D.L. Heine and M.S. Lam. A Practical Flow-Sensitive and Context-Sensitive C and C++ Memory Leak Detector. In Conference on Programming Language Design and Implementation, pages 168--181, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Jikes RVM Research Archive. http://jikesrvm.sourceforge.net/info/-research-archive.shtml.]]Google ScholarGoogle Scholar
  21. M. Jump, S.M. Blackburn, and K.S. McKinley. Dynamic Object Sampling for Pretenuring. In International Symposium on Memory Management, pages 152--162, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Jump and K.S. McKinley. Cork: Dynamic Memory Leak Detection for Java. Technical Report TR-06-07, The University of Texas at Austin, 2006. Under submission.]]Google ScholarGoogle Scholar
  23. E. Kushilevitz and N. Nisan. Communication Complexity. Cambridge University Press, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. N. Mitchell and G. Sevitsky. LeakBot: An Automated and Lightweight Tool for Diagnosing Memory Leaks in Large Java Applications. In European Conference on Object-Oriented Programming, pages 351--377, 2003.]]Google ScholarGoogle Scholar
  25. N. Nethercote and J. Seward. Valgrind: A Program Supervision Framework. Electronic Notes in Theoretical Computer Science, 89(2), 2003.]]Google ScholarGoogle Scholar
  26. F. Qin, S. Lu, and Y. Zhou. SafeMem: Exploiting ECC-Memory for Detecting Memory Leaks and Memory Corruption During Production Runs. In International Symposium on High-Performance Computer Architecture, pages 291--302, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Quest. JProbe Memory Debugger. http://www.quest.com/jprobe/-debugger.asp.]]Google ScholarGoogle Scholar
  28. SciTech Software. .NET Memory Profiler. http://www.scitech.se/-memprofiler/.]]Google ScholarGoogle Scholar
  29. D. Scott. Assessing the Costs of Application Downtime. Gartner Group, 1998.]]Google ScholarGoogle Scholar
  30. Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 edition, 1999.]]Google ScholarGoogle Scholar
  31. Standard Performance Evaluation Corporation. SPECjbb2000 Documentation, release 1.01 edition, 2001.]]Google ScholarGoogle Scholar
  32. US-CERT. US-CERT Vulnerability Notes Database. http://www.kb.cert.org/vuls/.]]Google ScholarGoogle Scholar
  33. B. Zorn. Barrier Methods for Garbage Collection. Technical Report CU-CS-494-90, University of Colorado at Boulder, 1990.]]Google ScholarGoogle Scholar

Index Terms

  1. Bell: bit-encoding online memory leak detection

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 41, Issue 11
          Proceedings of the 2006 ASPLOS Conference
          November 2006
          425 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1168918
          Issue’s Table of Contents
          • cover image ACM Conferences
            ASPLOS XII: Proceedings of the 12th international conference on Architectural support for programming languages and operating systems
            October 2006
            440 pages
            ISBN:1595934510
            DOI:10.1145/1168857

          Copyright © 2006 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 20 October 2006

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!