Detecting resource leaks through dynamical mining of resource usage patterns

  • Authors:
  • Huxing Zhang;Gang Wu;Kingsum Chow;Zhidong Yu;XueZhi Xing

  • Affiliations:
  • School of Software, Shanghai Jiao Tong University, Shanghai, 200240, China;School of Software, Shanghai Jiao Tong University, Shanghai, 200240, China;Intel Corporation;Intel Corporation;Intel Corporation

  • Venue:
  • DSNW '11 Proceedings of the 2011 IEEE/IFIP 41st International Conference on Dependable Systems and Networks Workshops
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Resource management is crucial to software productions. Resources must be carefully acquired and released, or a resource leak might occur. For open source projects, resource leaks can be easily introduced during code check-in, and it is laborious to review, identify, report, and fix such leaks. Recently, there has been a growing interest in data mining API usage patterns to discover potential bugs such as resource leaks. However, the usage patterns mined are specific to a certain library, which cannot be applied to detect bugs in other libraries. In this paper, we present an idea called MODE, "Mine Once, Detect Everywhere", to address the universality of such patterns, and use them to detect potential resource leaks automatically before code check-in. We propose an efficient algorithm to record the most valuable API calls that are related to resource usage during program execution, and mine resource usage patterns from the traces with a sequence miner. To verify the effectiveness of the patterns, experiments are given to use them to detect real resource leaks in large open source projects.