SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
SherLog: Error Diagnosis by Connecting Clues from
Run-time Logs
Ding Yuan1 Haohui Mai1 Weiwei Xiong1 Lin Tan1 Yuanyuan
Zhou2 Shankar Pasupathy3
1University of Illinois at Urbana-Champaign
2University of California, San Diego
3NetApp, Inc.
ASPLOS’10, March 13-17, 2010, Pittsburgh, Pennsylvania, USA.
July 18, 2013
Lisong Guo (LIP6/REGAL) July 18, 2013 1 / 13
Introduction
Scenario — Postmortem In-Production Debugging with Logs
postmortem VS. prediction (model checking, static analysis etc.)
in-production VS. in-house (runtime instrumentation etc.)
log VS. others (bug reports, deployment configuration etc.)
Lisong Guo (LIP6/REGAL) July 18, 2013 2 / 13
Introduction
Scenario — Postmortem In-Production Debugging with Logs
postmortem VS. prediction (model checking, static analysis etc.)
in-production VS. in-house (runtime instrumentation etc.)
log VS. others (bug reports, deployment configuration etc.)
Subtasks of Debugging
reproduce the bug (procedure non-related to source code)
infer the failure-inducing execution path
infer the conditions along the failure-inducing execution path
Lisong Guo (LIP6/REGAL) July 18, 2013 2 / 13
Introduction
Scenario — Postmortem In-Production Debugging with Logs
postmortem VS. prediction (model checking, static analysis etc.)
in-production VS. in-house (runtime instrumentation etc.)
log VS. others (bug reports, deployment configuration etc.)
Subtasks of Debugging
reproduce the bug (procedure non-related to source code)
infer the failure-inducing execution path
infer the conditions along the failure-inducing execution path
Research Question
How can we help a developer to debug in the scenario above ?
Lisong Guo (LIP6/REGAL) July 18, 2013 2 / 13
Approach
Idea
Manual Inspection −→ Automatic Inference
A tool that takes the run-time logs and source code as inputs, and then
produces some debugging hints for developers (i.e connecting the dots)
all possible and valid failure-inducing execution path
the evolution of value on certain variables along the inferred paths
Lisong Guo (LIP6/REGAL) July 18, 2013 3 / 13
Approach
Idea
Manual Inspection −→ Automatic Inference
A tool that takes the run-time logs and source code as inputs, and then
produces some debugging hints for developers (i.e connecting the dots)
all possible and valid failure-inducing execution path
the evolution of value on certain variables along the inferred paths
Usage Scenario
run the tool to get a list of interesting paths
examine the values of certain suspicious variables along some path
repeat the previous step until the root cause of the bug is found
Lisong Guo (LIP6/REGAL) July 18, 2013 3 / 13
Design
Components
Log Parsing: locate the logging statements in the source code
Path Inference: infer the failure execution paths and the constraints
Value Inference: infer the value evaluation along the given paths
Lisong Guo (LIP6/REGAL) July 18, 2013 4 / 13
Log Parsing
Objectives
Identifying the Logging Points and Variables in the source code.
Lisong Guo (LIP6/REGAL) July 18, 2013 5 / 13
Log Parsing
Objectives
Identifying the Logging Points and Variables in the source code.
Simple Logging Statements
Solution: regular-expression matching (i.e. grep)
e.g. error(0, 0, _("removing directory, %s"), path);
rule: {error(), 3, 4}
Lisong Guo (LIP6/REGAL) July 18, 2013 5 / 13
Log Parsing
Objectives
Identifying the Logging Points and Variables in the source code.
Simple Logging Statements
Solution: regular-expression matching (i.e. grep)
e.g. error(0, 0, _("removing directory, %s"), path);
rule: {error(), 3, 4}
Complicated Logging Facilities
Hierarchy wrappers of standard printing APIs. (alt: coccinelle)
e.g. error() -> strerrno()
rule 1: ’%s’: %{serrono}
rule 2: [{ "specifier": serrno; "regex": Regex; "val_func": ErrMsgToErrno}]
Lisong Guo (LIP6/REGAL) July 18, 2013 5 / 13
Path Inference
Objectives
infer the failure-inducing execution path
infer the constraints of variables along the path
Lisong Guo (LIP6/REGAL) July 18, 2013 6 / 13
Path Inference
Objectives
infer the failure-inducing execution path
infer the constraints of variables along the path
Constrained Sequence Matching Problem (NP-Complete?)
based on Saturn, a static analysis framework for C programs
match the control & data flow with the sequence of log messages
convert the path searching problem into a set of declarative rules
Lisong Guo (LIP6/REGAL) July 18, 2013 6 / 13
Path Inference
Objectives
infer the failure-inducing execution path
infer the constraints of variables along the path
Constrained Sequence Matching Problem (NP-Complete?)
based on Saturn, a static analysis framework for C programs
match the control & data flow with the sequence of log messages
convert the path searching problem into a set of declarative rules
Glance of Implementation
customized control-flow: main → log@4 → b1@10 → c@16 → log@25
conjunctive constraints: strchr = NULL ∧ verbose = 0 rmdir()@17 = 0
Lisong Guo (LIP6/REGAL) July 18, 2013 6 / 13
Path Inference
Lisong Guo (LIP6/REGAL) July 18, 2013 7 / 13
Path Inference
Technique Summary
SAT-based path searching
constraint programming
Lisong Guo (LIP6/REGAL) July 18, 2013 8 / 13
Path Inference
Technique Summary
SAT-based path searching
constraint programming
Limitations
skip the analysis on the functions of non-log-generating
therefore it might return incorrect results
no alias analysis for pointers
but the underlining framework Saturn support alias analysis
special treatments on some external routines/functions
abort, exit, setjmp, longjmp etc.
Lisong Guo (LIP6/REGAL) July 18, 2013 8 / 13
Value Inference
Objective
infer the value-flow of certain variables, given the execution paths
Lisong Guo (LIP6/REGAL) July 18, 2013 9 / 13
Value Inference
Objective
infer the value-flow of certain variables, given the execution paths
Algorithm
model the assignment relationship among memory locations as
guarded points-to graph
predicate(position, variable, value, constraint)
symbolically execute the inferred failure path forwards
refine the constraint according to the scope of variables
incrementally update the graph at each step
generate the sequence of value evolution (value-flow)
Lisong Guo (LIP6/REGAL) July 18, 2013 9 / 13
Evaluation
Methodology
manually reproduce and diagnose the real-world bugs
collect path summaries at runtime
compare the result of SherLog with the reproduction information
Lisong Guo (LIP6/REGAL) July 18, 2013 10 / 13
Evaluation
Methodology
manually reproduce and diagnose the real-world bugs
collect path summaries at runtime
compare the result of SherLog with the reproduction information
Metrics
useful: SherLog infers a subset of bug reproduction information
complete: SherLog infers all the bug reproduction information
Lisong Guo (LIP6/REGAL) July 18, 2013 10 / 13
Evaluation
Methodology
manually reproduce and diagnose the real-world bugs
collect path summaries at runtime
compare the result of SherLog with the reproduction information
Metrics
useful: SherLog infers a subset of bug reproduction information
complete: SherLog infers all the bug reproduction information
Lisong Guo (LIP6/REGAL) July 18, 2013 10 / 13
Evaluation
Lisong Guo (LIP6/REGAL) July 18, 2013 11 / 13
Assumptions/Limitations
Assumptions
sufficient logging messages
reasonable density distribution of logging statements
reasonable amount of logging statements being activated
well-match between the bug manifestation path and the log trace
sequential and single-threaded log messages
cannot handle multi-thread concurrent program
Technical Limitations
skip the functions that do not involve in log production
do not parse the complex constructs of C programming language, such
as pointer arithmetics
Lisong Guo (LIP6/REGAL) July 18, 2013 12 / 13
More Pointers...
Ding Yuan, Soyeon Park, Yuanyuan Zhou: Characterizing logging practices
in open-source software. ICSE 2012
Adam J. Oliner, Archana Ganapathi, Wei Xu: Advances and challenges in
log analysis. Commun. ACM 2012
Ding Yuan, Jing Zheng, Soyeon Park, Yuanyuan Zhou, Stefan Savage:
Improving Software Diagnosability via Log Enhancement. ASPLSO 2011
Wei Xu, Ling Huang, Armando Fox, David A. Patterson, Michael I. Jordan:
Detecting Large-Scale System Problems by Mining Console Logs. ICML 2010
Thomas Reidemeister, Mohammad Ahmad Munawar, Miao Jiang, Paul A. S.
Ward: Diagnosis of recurrent faults using log files. CASCON 2009
Trishul M. Chilimbi, Ben Liblit, Krishna Mehra, Aditya V. Nori, and Kapil
Vaswani: HOLMES: Effective statistical debugging via efficient path
profiling. ICSE 2009
Lisong Guo (LIP6/REGAL) July 18, 2013 13 / 13

Contenu connexe

Tendances

New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
Nico Ludwig
 
Linear Model of Coregionalization
Linear Model of CoregionalizationLinear Model of Coregionalization
Linear Model of Coregionalization
Ed Isaaks
 

Tendances (8)

SherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time LogsSherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
IEEE SCAM 2017 Revisiting Exception Handling Practices with Exception Flow An...
IEEE SCAM 2017 Revisiting Exception Handling Practices with Exception Flow An...IEEE SCAM 2017 Revisiting Exception Handling Practices with Exception Flow An...
IEEE SCAM 2017 Revisiting Exception Handling Practices with Exception Flow An...
 
Storage classes
Storage classesStorage classes
Storage classes
 
Static Code Analysis and Cppcheck
Static Code Analysis and CppcheckStatic Code Analysis and Cppcheck
Static Code Analysis and Cppcheck
 
TMPA-2017: Vellvm - Verifying the LLVM
TMPA-2017: Vellvm - Verifying the LLVMTMPA-2017: Vellvm - Verifying the LLVM
TMPA-2017: Vellvm - Verifying the LLVM
 
Linear Model of Coregionalization
Linear Model of CoregionalizationLinear Model of Coregionalization
Linear Model of Coregionalization
 
Storage class
Storage classStorage class
Storage class
 

Similaire à SherLog: Error Diagnosis Through Connecting Clues from Run-time Logs

OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
lienhard
 
talk_2015_07_01_Imperial_College_slides
talk_2015_07_01_Imperial_College_slidestalk_2015_07_01_Imperial_College_slides
talk_2015_07_01_Imperial_College_slides
Nikolay Kosmatov
 

Similaire à SherLog: Error Diagnosis Through Connecting Clues from Run-time Logs (20)

OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
 
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
 
Integrate with Tracing and Logging
Integrate with Tracing and LoggingIntegrate with Tracing and Logging
Integrate with Tracing and Logging
 
Towards better software quality assurance by providing intelligent support
Towards better software quality assurance by providing intelligent supportTowards better software quality assurance by providing intelligent support
Towards better software quality assurance by providing intelligent support
 
Practical pairing of generative programming with functional programming.
Practical pairing of generative programming with functional programming.Practical pairing of generative programming with functional programming.
Practical pairing of generative programming with functional programming.
 
Developing R Graphical User Interfaces
Developing R Graphical User InterfacesDeveloping R Graphical User Interfaces
Developing R Graphical User Interfaces
 
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongJDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
 
Runtime Behavior of JavaScript Programs
Runtime Behavior of JavaScript ProgramsRuntime Behavior of JavaScript Programs
Runtime Behavior of JavaScript Programs
 
Rein_in_the_ability_of_log4j
Rein_in_the_ability_of_log4jRein_in_the_ability_of_log4j
Rein_in_the_ability_of_log4j
 
talk_2015_07_01_Imperial_College_slides
talk_2015_07_01_Imperial_College_slidestalk_2015_07_01_Imperial_College_slides
talk_2015_07_01_Imperial_College_slides
 
Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...
 
To GO or not to GO
To GO or not to GOTo GO or not to GO
To GO or not to GO
 
Scalable Conformance Checking of Business Processes
Scalable Conformance Checking of Business ProcessesScalable Conformance Checking of Business Processes
Scalable Conformance Checking of Business Processes
 
8th TUC Meeting – George Fletcher (TU Eindhoven), gMark: Schema-driven data a...
8th TUC Meeting – George Fletcher (TU Eindhoven), gMark: Schema-driven data a...8th TUC Meeting – George Fletcher (TU Eindhoven), gMark: Schema-driven data a...
8th TUC Meeting – George Fletcher (TU Eindhoven), gMark: Schema-driven data a...
 
A Graph-based Feature Location Approach using Set Theory [SPLC2019]
A Graph-based Feature Location Approach using Set Theory [SPLC2019]A Graph-based Feature Location Approach using Set Theory [SPLC2019]
A Graph-based Feature Location Approach using Set Theory [SPLC2019]
 
Software Engineering - RS4
Software Engineering - RS4Software Engineering - RS4
Software Engineering - RS4
 
Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...
 
Apache Eagle: Architecture Evolvement and New Features
Apache Eagle: Architecture Evolvement and New FeaturesApache Eagle: Architecture Evolvement and New Features
Apache Eagle: Architecture Evolvement and New Features
 
tranSMART Community Meeting 5-7 Nov 13 - Session 3: transmart-data
tranSMART Community Meeting 5-7 Nov 13 - Session 3: transmart-datatranSMART Community Meeting 5-7 Nov 13 - Session 3: transmart-data
tranSMART Community Meeting 5-7 Nov 13 - Session 3: transmart-data
 
Automatically Discovering, Reporting and Reproducing Android Application Crashes
Automatically Discovering, Reporting and Reproducing Android Application CrashesAutomatically Discovering, Reporting and Reproducing Android Application Crashes
Automatically Discovering, Reporting and Reproducing Android Application Crashes
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

SherLog: Error Diagnosis Through Connecting Clues from Run-time Logs

  • 1. SherLog: Error Diagnosis by Connecting Clues from Run-time Logs Ding Yuan1 Haohui Mai1 Weiwei Xiong1 Lin Tan1 Yuanyuan Zhou2 Shankar Pasupathy3 1University of Illinois at Urbana-Champaign 2University of California, San Diego 3NetApp, Inc. ASPLOS’10, March 13-17, 2010, Pittsburgh, Pennsylvania, USA. July 18, 2013 Lisong Guo (LIP6/REGAL) July 18, 2013 1 / 13
  • 2. Introduction Scenario — Postmortem In-Production Debugging with Logs postmortem VS. prediction (model checking, static analysis etc.) in-production VS. in-house (runtime instrumentation etc.) log VS. others (bug reports, deployment configuration etc.) Lisong Guo (LIP6/REGAL) July 18, 2013 2 / 13
  • 3. Introduction Scenario — Postmortem In-Production Debugging with Logs postmortem VS. prediction (model checking, static analysis etc.) in-production VS. in-house (runtime instrumentation etc.) log VS. others (bug reports, deployment configuration etc.) Subtasks of Debugging reproduce the bug (procedure non-related to source code) infer the failure-inducing execution path infer the conditions along the failure-inducing execution path Lisong Guo (LIP6/REGAL) July 18, 2013 2 / 13
  • 4. Introduction Scenario — Postmortem In-Production Debugging with Logs postmortem VS. prediction (model checking, static analysis etc.) in-production VS. in-house (runtime instrumentation etc.) log VS. others (bug reports, deployment configuration etc.) Subtasks of Debugging reproduce the bug (procedure non-related to source code) infer the failure-inducing execution path infer the conditions along the failure-inducing execution path Research Question How can we help a developer to debug in the scenario above ? Lisong Guo (LIP6/REGAL) July 18, 2013 2 / 13
  • 5. Approach Idea Manual Inspection −→ Automatic Inference A tool that takes the run-time logs and source code as inputs, and then produces some debugging hints for developers (i.e connecting the dots) all possible and valid failure-inducing execution path the evolution of value on certain variables along the inferred paths Lisong Guo (LIP6/REGAL) July 18, 2013 3 / 13
  • 6. Approach Idea Manual Inspection −→ Automatic Inference A tool that takes the run-time logs and source code as inputs, and then produces some debugging hints for developers (i.e connecting the dots) all possible and valid failure-inducing execution path the evolution of value on certain variables along the inferred paths Usage Scenario run the tool to get a list of interesting paths examine the values of certain suspicious variables along some path repeat the previous step until the root cause of the bug is found Lisong Guo (LIP6/REGAL) July 18, 2013 3 / 13
  • 7. Design Components Log Parsing: locate the logging statements in the source code Path Inference: infer the failure execution paths and the constraints Value Inference: infer the value evaluation along the given paths Lisong Guo (LIP6/REGAL) July 18, 2013 4 / 13
  • 8. Log Parsing Objectives Identifying the Logging Points and Variables in the source code. Lisong Guo (LIP6/REGAL) July 18, 2013 5 / 13
  • 9. Log Parsing Objectives Identifying the Logging Points and Variables in the source code. Simple Logging Statements Solution: regular-expression matching (i.e. grep) e.g. error(0, 0, _("removing directory, %s"), path); rule: {error(), 3, 4} Lisong Guo (LIP6/REGAL) July 18, 2013 5 / 13
  • 10. Log Parsing Objectives Identifying the Logging Points and Variables in the source code. Simple Logging Statements Solution: regular-expression matching (i.e. grep) e.g. error(0, 0, _("removing directory, %s"), path); rule: {error(), 3, 4} Complicated Logging Facilities Hierarchy wrappers of standard printing APIs. (alt: coccinelle) e.g. error() -> strerrno() rule 1: ’%s’: %{serrono} rule 2: [{ "specifier": serrno; "regex": Regex; "val_func": ErrMsgToErrno}] Lisong Guo (LIP6/REGAL) July 18, 2013 5 / 13
  • 11. Path Inference Objectives infer the failure-inducing execution path infer the constraints of variables along the path Lisong Guo (LIP6/REGAL) July 18, 2013 6 / 13
  • 12. Path Inference Objectives infer the failure-inducing execution path infer the constraints of variables along the path Constrained Sequence Matching Problem (NP-Complete?) based on Saturn, a static analysis framework for C programs match the control & data flow with the sequence of log messages convert the path searching problem into a set of declarative rules Lisong Guo (LIP6/REGAL) July 18, 2013 6 / 13
  • 13. Path Inference Objectives infer the failure-inducing execution path infer the constraints of variables along the path Constrained Sequence Matching Problem (NP-Complete?) based on Saturn, a static analysis framework for C programs match the control & data flow with the sequence of log messages convert the path searching problem into a set of declarative rules Glance of Implementation customized control-flow: main → log@4 → b1@10 → c@16 → log@25 conjunctive constraints: strchr = NULL ∧ verbose = 0 rmdir()@17 = 0 Lisong Guo (LIP6/REGAL) July 18, 2013 6 / 13
  • 14. Path Inference Lisong Guo (LIP6/REGAL) July 18, 2013 7 / 13
  • 15. Path Inference Technique Summary SAT-based path searching constraint programming Lisong Guo (LIP6/REGAL) July 18, 2013 8 / 13
  • 16. Path Inference Technique Summary SAT-based path searching constraint programming Limitations skip the analysis on the functions of non-log-generating therefore it might return incorrect results no alias analysis for pointers but the underlining framework Saturn support alias analysis special treatments on some external routines/functions abort, exit, setjmp, longjmp etc. Lisong Guo (LIP6/REGAL) July 18, 2013 8 / 13
  • 17. Value Inference Objective infer the value-flow of certain variables, given the execution paths Lisong Guo (LIP6/REGAL) July 18, 2013 9 / 13
  • 18. Value Inference Objective infer the value-flow of certain variables, given the execution paths Algorithm model the assignment relationship among memory locations as guarded points-to graph predicate(position, variable, value, constraint) symbolically execute the inferred failure path forwards refine the constraint according to the scope of variables incrementally update the graph at each step generate the sequence of value evolution (value-flow) Lisong Guo (LIP6/REGAL) July 18, 2013 9 / 13
  • 19. Evaluation Methodology manually reproduce and diagnose the real-world bugs collect path summaries at runtime compare the result of SherLog with the reproduction information Lisong Guo (LIP6/REGAL) July 18, 2013 10 / 13
  • 20. Evaluation Methodology manually reproduce and diagnose the real-world bugs collect path summaries at runtime compare the result of SherLog with the reproduction information Metrics useful: SherLog infers a subset of bug reproduction information complete: SherLog infers all the bug reproduction information Lisong Guo (LIP6/REGAL) July 18, 2013 10 / 13
  • 21. Evaluation Methodology manually reproduce and diagnose the real-world bugs collect path summaries at runtime compare the result of SherLog with the reproduction information Metrics useful: SherLog infers a subset of bug reproduction information complete: SherLog infers all the bug reproduction information Lisong Guo (LIP6/REGAL) July 18, 2013 10 / 13
  • 22. Evaluation Lisong Guo (LIP6/REGAL) July 18, 2013 11 / 13
  • 23. Assumptions/Limitations Assumptions sufficient logging messages reasonable density distribution of logging statements reasonable amount of logging statements being activated well-match between the bug manifestation path and the log trace sequential and single-threaded log messages cannot handle multi-thread concurrent program Technical Limitations skip the functions that do not involve in log production do not parse the complex constructs of C programming language, such as pointer arithmetics Lisong Guo (LIP6/REGAL) July 18, 2013 12 / 13
  • 24. More Pointers... Ding Yuan, Soyeon Park, Yuanyuan Zhou: Characterizing logging practices in open-source software. ICSE 2012 Adam J. Oliner, Archana Ganapathi, Wei Xu: Advances and challenges in log analysis. Commun. ACM 2012 Ding Yuan, Jing Zheng, Soyeon Park, Yuanyuan Zhou, Stefan Savage: Improving Software Diagnosability via Log Enhancement. ASPLSO 2011 Wei Xu, Ling Huang, Armando Fox, David A. Patterson, Michael I. Jordan: Detecting Large-Scale System Problems by Mining Console Logs. ICML 2010 Thomas Reidemeister, Mohammad Ahmad Munawar, Miao Jiang, Paul A. S. Ward: Diagnosis of recurrent faults using log files. CASCON 2009 Trishul M. Chilimbi, Ben Liblit, Krishna Mehra, Aditya V. Nori, and Kapil Vaswani: HOLMES: Effective statistical debugging via efficient path profiling. ICSE 2009 Lisong Guo (LIP6/REGAL) July 18, 2013 13 / 13