Lightweight control-flow instrumentation and postmortem analysis in support of debugging

Debugging is difficult and costly. As a human programmer looks for a bug, it would be helpful to see a complete trace of events leading to the point of failure. Unfortunately, full tracing is simply too slow to use in deployment, and may even be impractical during testing. We aid post-deployment debugging by giving programmers additional information about program activity shortly before failure. We use latent information in post-failure memory dumps, augmented by low-overhead, tunable run-time tracing. Our results with a realistically-tuned tracing scheme show low enough overhead (0-5%) to be used in production runs. We demonstrate several potential uses of this enhanced information, including a novel postmortem static slice restriction technique and a reduced view of potentially-executed code. Experimental evaluation shows our approach to be very effective, such as shrinking stack-sensitive interprocedural static slices by 49-78% in larger applications.

[1]  Vikram S. Adve,et al.  LLVM: a compilation framework for lifelong program analysis & transformation , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[2]  Eugene H. Spafford,et al.  Dynamic slicing in the presence of unconstrained pointers , 1991, TAV4.

[3]  Alessandro Orso,et al.  Gamma system: continuous evolution of software after deployment , 2002, ISSTA '02.

[4]  Mark Harman,et al.  An empirical study of static program slice size , 2007, TSEM.

[5]  Rajiv Gupta,et al.  FULLDOC: A Full Reporting Debugger for Optimized Code , 2000, SAS.

[6]  Alessandro Orso,et al.  Monitoring deployed software using software tomography , 2002, PASTE '02.

[7]  Alessandro Orso,et al.  A Technique for Enabling and Supporting Debugging of Field Failures , 2007, 29th International Conference on Software Engineering (ICSE'07).

[8]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1988, SIGP.

[9]  Jens Krinke,et al.  Context-sensitivity matters, but context does not , 2004, Source Code Analysis and Manipulation, Fourth IEEE International Workshop on.

[10]  Jean Utke,et al.  Control flow reversal for adjoint code generation , 2004 .

[11]  Susan L. Graham,et al.  Non-Transparent Debugging of Optimized Code , 1999 .

[12]  Ricardo Bianchini,et al.  Striking a new balance between program instrumentation and debugging time , 2011, EuroSys '11.

[13]  George Candea,et al.  Execution synthesis: a technique for automated software debugging , 2010, EuroSys '10.

[14]  Thomas W. Reps,et al.  Interprocedural Path Profiling , 1999, CC.

[15]  Manu Sridharan,et al.  PSE: explaining program failures via postmortem static analysis , 2004, SIGSOFT '04/FSE-12.

[16]  Yu Cao,et al.  SymCrash: selective recording for reproducing crashes , 2014, ASE.

[17]  Paul Anderson,et al.  Design and Implementation of a Fine-Grained Software Inspection Tool , 2003, IEEE Trans. Software Eng..

[18]  Ding Yuan,et al.  SherLog: error diagnosis by connecting clues from run-time logs , 2010, ASPLOS 2010.

[19]  Michael D. Bond,et al.  Probabilistic calling context , 2007, OOPSLA.

[20]  Katsuro Inoue,et al.  Dependence-cache slicing: a program slicing method using lightweight dynamic information , 2002, Proceedings 10th International Workshop on Program Comprehension.

[21]  Janusz W. Laski,et al.  Dynamic Program Slicing , 1988, Inf. Process. Lett..

[22]  Mary Jean Harrold,et al.  Selective path profiling , 2002, PASTE '02.

[23]  Xiangyu Zhang,et al.  Cost effective dynamic program slicing , 2004, PLDI '04.

[24]  Ben Liblit,et al.  Adaptive bug isolation , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[25]  James R. Larus,et al.  Exploiting hardware performance counters with flow and context sensitive profiling , 1997, PLDI '97.

[26]  Xiaoguang Mao,et al.  Effective Statistical Fault Localization Using Program Slices , 2012, 2012 IEEE 36th Annual Computer Software and Applications Conference.

[27]  Trishul M. Chilimbi,et al.  Preferential path profiling: compactly numbering interesting paths , 2007, POPL '07.

[28]  Xiangyu Zhang,et al.  Analyzing multicore dumps to facilitate concurrency bug reproduction , 2010, ASPLOS 2010.

[29]  Ding Yuan,et al.  Improving Software Diagnosability via Log Enhancement , 2012, TOCS.

[30]  Susan Horwitz,et al.  Better Debugging via Output Tracing and Callstack-Sensitive Slicing , 2010, IEEE Transactions on Software Engineering.

[31]  Andreas Zeller,et al.  Reconstructing Core Dumps , 2013, 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation.

[32]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984 .

[33]  Shinji Kusumoto,et al.  Call-mark slicing: an efficient and economical way of reducing slice , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[34]  Alessandro Orso,et al.  BugRedux: Reproducing field failures for in-house debugging , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[35]  Brent Hailpern,et al.  Software debugging, testing, and verification , 2002, IBM Syst. J..

[36]  Janusz W. Laski,et al.  Dynamic slicing of computer programs , 1990, J. Syst. Softw..

[37]  Xiangyu Zhang,et al.  Precise Calling Context Encoding , 2010, IEEE Transactions on Software Engineering.

[38]  Mark Weiser,et al.  Program Slicing , 1981, IEEE Transactions on Software Engineering.

[39]  John Howard,et al.  Hybrid slicing: integrating dynamic information with static analysis , 1997, TSEM.

[40]  James R. Larus,et al.  Efficient path profiling , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[41]  Gregg Rothermel,et al.  Supporting Controlled Experimentation with Testing Techniques: An Infrastructure and its Potential Impact , 2005, Empirical Software Engineering.

[42]  Mark Harman,et al.  A formalisation of the relationship between forms of program slicing , 2006, Sci. Comput. Program..

[43]  Jason Mars,et al.  Scenario Based Optimization: A Framework for Statically Enabling Online Optimizations , 2009, 2009 International Symposium on Code Generation and Optimization.

[44]  G. A. Venkatesh,et al.  The semantic approach to program slicing , 1991, PLDI '91.

[45]  Peter Fritzson,et al.  Three approaches to interprocedural dynamic slicing , 1993, Microprocess. Microprogramming.

[46]  Joseph Robert Horgan,et al.  Dynamic program slicing , 1990, PLDI '90.