SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Linux Variability Anomalies:
What Causes Them?
How do They Get Fixed?
MSR 2013, May 18th 2013 -- San Francisco, USA
Sarah Nadi, Christian Dietrich, Reinhard Tartler,
Richard C. Holt, Daniel Lohmann
Configuring the Linux Kernel
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 2
User
Selection
Linux Kernel
Configuration
Customized
KernelLinux User
I’ll customize this
kernel for my
specific needs!
Variability in Linux (e.g.,Adding New Driver)
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 3
New driver to
add?… Here we
go again!
Linux
Developer
...
#ifdef USB
void put_usb(...);
….
#endif
...
usb_foo.c
...
obj-$(USB_FOO) += usb_foo.o
...
Kbuild
(Makefile)
...
config USB_FOO
bool “FOO Support”
depends on USB
...
Kconfig
Maintaining Consistency is hard!!
Variability Anomalies
• Inconsistencies between the 3 artifacts leads to dead and
undead CPP code [Tartler et al., EUROSYS ‘11][Nadi & Holt, CSMR‘12]
• In Linux v3.6, 1,077 variability anomalies detected!
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 4
Linux Developer
OK, help me
avoid them!
How do these anomalies get
introduced?
How do these anomalies get
fixed?
Avoid future anomalies
Automatically suggest solutions
Study Overview
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 5
Exploratory Case Study
Study set of 106 existing
patches (51% accepted)
1
Patterns
Confirmatory Case Study
a) Use undertaker to
detect anomalies
b) Mine git repository over
several releases to
confirm patterns
2
undertaker
Undertaker
• Detects dead & undead
code blocks
• Uses SAT solver
for consistency
checking
• Developed at FAU
[Tartler et al., Eurosys ‘11]
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 6
Referential Variability Anomalies
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 7
Referential
Anomalies
• Caused by missing feature definitions
• Missing features can never be selected
• Almost 40% of detected anomalies are referential
#ifdef USB
//B1
#else
//B2
#endif
Observations from Exploratory Study
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 8
Incorrect Feature
Names
1 2
Incomplete Kconfig
Patches
• Code is not useless – incorrect
feature was used
• Some incorrect features were
typos
• Responses suggest that several
of missing features were
previously renamed/deleted
Research Questions
RQ1: Are misspellings a common cause of variability
anomalies?
RQ2: Are incomplete Kconfig patches a common cause of
variability anomalies?
RQ3: How are variability anomalies fixed?
RQ4: How long do variability anomalies last in Linux?
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 9
Confirmatory Case Study - Overview
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 10
- Feature_X
+Feature_Y
25,410
CPP/Code Patches
- Feature_X
+Feature_Y
10,263
Kconfig Patches
Feature_X
missing
Referential
Anomalies
undertaker
v2.6.37 – v3.6
Kconfig
Patches
Time
cause
Mapping
CPP Patches
Kconfig Patches
Time
fix
Results: Causes of Variability Anomalies
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 11
Incomplete Kconfig patches often cause referential anomalies.
An average of 14% of referential anomalies are caused by
changes to Kconfig that are not completely propagated to
source code.
Incomplete
Kconfig
patches
Time
cause
Results: Fixes for Variability Anomalies
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 12
Referential anomalies are commonly fixed by CPP patches (26%
of the time) .
Time
fix
Kconfig/CPP
patches
Referential anomalies are seldom fixed by Kconfig patches (3% of
the time).
Summary of Results
RQ1: Are misspellings a common cause of variability
anomalies?
RQ2: Are incomplete Kconfig patches a common cause of
variability anomalies?
RQ3: How are variability anomalies fixed?
RQ4: How long do variability anomalies last in Linux?
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 13
Typos do not commonly cause anomalies
Anomalies are caused by incomplete Kconfig patches 14% of the time
Anomalies are often fixed by CPP patches (26% of the time)
On average, anomalies last for 6 releases
What Does it All Mean?
• Strict review process catches spelling mistakes
• Changes to Kconfig are sometimes not properly propagated to
the rest of the kernel
• Anomalies caused by incomplete changes are harder to catch
in the review process
• Developers tend to fix things on the code side since changes to
Kconfig have potentially cross-cutting concerns
• Developers have difficulty keeping everything consistent.
Providing them with automatic tools for these tasks may help.
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 14
Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 15
Questions?
snadi@uwaterloo.ca
http://swag.uwaterloo.ca/~snadi
Incomplete
configuration
patches
Code (CPP)
patches
Time
cause fix
14% 26%

Weitere ähnliche Inhalte

Ähnlich wie Linux Variability Anomalies: Causes, Fixes and Duration

KARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingKARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingYue Chen
 
Satisfiability
SatisfiabilitySatisfiability
SatisfiabilityJim Kukula
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Levente Kurusa
 
UNIT 3.1 INTRODUCTON TO IDA.ppt
UNIT 3.1 INTRODUCTON TO IDA.pptUNIT 3.1 INTRODUCTON TO IDA.ppt
UNIT 3.1 INTRODUCTON TO IDA.pptManjuAppukuttan2
 
Variability, Bugs, and Cognition
Variability, Bugs, and CognitionVariability, Bugs, and Cognition
Variability, Bugs, and CognitionAndrzej Wasowski
 
LAS16-106: GNU Toolchain Development Lifecycle
LAS16-106: GNU Toolchain Development LifecycleLAS16-106: GNU Toolchain Development Lifecycle
LAS16-106: GNU Toolchain Development LifecycleLinaro
 
Sattose 2020 presentation
Sattose 2020 presentationSattose 2020 presentation
Sattose 2020 presentationCéline Deknop
 
Kernel Recipes 2015: How to choose a kernel to ship with a product
Kernel Recipes 2015: How to choose a kernel to ship with a productKernel Recipes 2015: How to choose a kernel to ship with a product
Kernel Recipes 2015: How to choose a kernel to ship with a productAnne Nicolas
 
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...Ritu Arora
 
How aspects clean your code
How aspects clean your codeHow aspects clean your code
How aspects clean your codeBarbara Fusinska
 
DevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesDevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesAlex Cruise
 
Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Rebaz Najeeb
 
117 A Outline 25
117 A Outline 25117 A Outline 25
117 A Outline 25wasntgosu
 
Generics Tutorial
Generics TutorialGenerics Tutorial
Generics Tutorialwasntgosu
 
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++jamieayre
 
An Overview of Distributed Debugging
An Overview of Distributed DebuggingAn Overview of Distributed Debugging
An Overview of Distributed DebuggingAnant Narayanan
 
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika TripathiComputer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika TripathiProf. (Dr.) Anand K. Tripathi
 

Ähnlich wie Linux Variability Anomalies: Causes, Fixes and Duration (20)

KARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingKARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live Patching
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
 
Satisfiability
SatisfiabilitySatisfiability
Satisfiability
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!
 
UNIT 3.1 INTRODUCTON TO IDA.ppt
UNIT 3.1 INTRODUCTON TO IDA.pptUNIT 3.1 INTRODUCTON TO IDA.ppt
UNIT 3.1 INTRODUCTON TO IDA.ppt
 
Icsm19.ppt
Icsm19.pptIcsm19.ppt
Icsm19.ppt
 
Introduction to multicore .ppt
Introduction to multicore .pptIntroduction to multicore .ppt
Introduction to multicore .ppt
 
Variability, Bugs, and Cognition
Variability, Bugs, and CognitionVariability, Bugs, and Cognition
Variability, Bugs, and Cognition
 
LAS16-106: GNU Toolchain Development Lifecycle
LAS16-106: GNU Toolchain Development LifecycleLAS16-106: GNU Toolchain Development Lifecycle
LAS16-106: GNU Toolchain Development Lifecycle
 
Sattose 2020 presentation
Sattose 2020 presentationSattose 2020 presentation
Sattose 2020 presentation
 
Kernel Recipes 2015: How to choose a kernel to ship with a product
Kernel Recipes 2015: How to choose a kernel to ship with a productKernel Recipes 2015: How to choose a kernel to ship with a product
Kernel Recipes 2015: How to choose a kernel to ship with a product
 
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
 
How aspects clean your code
How aspects clean your codeHow aspects clean your code
How aspects clean your code
 
DevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesDevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 Slides
 
Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation
 
117 A Outline 25
117 A Outline 25117 A Outline 25
117 A Outline 25
 
Generics Tutorial
Generics TutorialGenerics Tutorial
Generics Tutorial
 
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
HIS 2017 Mark Batty-Industrial concurrency specification for C/C++
 
An Overview of Distributed Debugging
An Overview of Distributed DebuggingAn Overview of Distributed Debugging
An Overview of Distributed Debugging
 
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika TripathiComputer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
 

Kürzlich hochgeladen

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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 RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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 Processorsdebabhi2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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...Miguel Araújo
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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)wesley chun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Linux Variability Anomalies: Causes, Fixes and Duration

  • 1. Linux Variability Anomalies: What Causes Them? How do They Get Fixed? MSR 2013, May 18th 2013 -- San Francisco, USA Sarah Nadi, Christian Dietrich, Reinhard Tartler, Richard C. Holt, Daniel Lohmann
  • 2. Configuring the Linux Kernel Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 2 User Selection Linux Kernel Configuration Customized KernelLinux User I’ll customize this kernel for my specific needs!
  • 3. Variability in Linux (e.g.,Adding New Driver) Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 3 New driver to add?… Here we go again! Linux Developer ... #ifdef USB void put_usb(...); …. #endif ... usb_foo.c ... obj-$(USB_FOO) += usb_foo.o ... Kbuild (Makefile) ... config USB_FOO bool “FOO Support” depends on USB ... Kconfig Maintaining Consistency is hard!!
  • 4. Variability Anomalies • Inconsistencies between the 3 artifacts leads to dead and undead CPP code [Tartler et al., EUROSYS ‘11][Nadi & Holt, CSMR‘12] • In Linux v3.6, 1,077 variability anomalies detected! Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 4 Linux Developer OK, help me avoid them! How do these anomalies get introduced? How do these anomalies get fixed? Avoid future anomalies Automatically suggest solutions
  • 5. Study Overview Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 5 Exploratory Case Study Study set of 106 existing patches (51% accepted) 1 Patterns Confirmatory Case Study a) Use undertaker to detect anomalies b) Mine git repository over several releases to confirm patterns 2 undertaker
  • 6. Undertaker • Detects dead & undead code blocks • Uses SAT solver for consistency checking • Developed at FAU [Tartler et al., Eurosys ‘11] Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 6
  • 7. Referential Variability Anomalies Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 7 Referential Anomalies • Caused by missing feature definitions • Missing features can never be selected • Almost 40% of detected anomalies are referential #ifdef USB //B1 #else //B2 #endif
  • 8. Observations from Exploratory Study Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 8 Incorrect Feature Names 1 2 Incomplete Kconfig Patches • Code is not useless – incorrect feature was used • Some incorrect features were typos • Responses suggest that several of missing features were previously renamed/deleted
  • 9. Research Questions RQ1: Are misspellings a common cause of variability anomalies? RQ2: Are incomplete Kconfig patches a common cause of variability anomalies? RQ3: How are variability anomalies fixed? RQ4: How long do variability anomalies last in Linux? Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 9
  • 10. Confirmatory Case Study - Overview Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 10 - Feature_X +Feature_Y 25,410 CPP/Code Patches - Feature_X +Feature_Y 10,263 Kconfig Patches Feature_X missing Referential Anomalies undertaker v2.6.37 – v3.6 Kconfig Patches Time cause Mapping CPP Patches Kconfig Patches Time fix
  • 11. Results: Causes of Variability Anomalies Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 11 Incomplete Kconfig patches often cause referential anomalies. An average of 14% of referential anomalies are caused by changes to Kconfig that are not completely propagated to source code. Incomplete Kconfig patches Time cause
  • 12. Results: Fixes for Variability Anomalies Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 12 Referential anomalies are commonly fixed by CPP patches (26% of the time) . Time fix Kconfig/CPP patches Referential anomalies are seldom fixed by Kconfig patches (3% of the time).
  • 13. Summary of Results RQ1: Are misspellings a common cause of variability anomalies? RQ2: Are incomplete Kconfig patches a common cause of variability anomalies? RQ3: How are variability anomalies fixed? RQ4: How long do variability anomalies last in Linux? Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 13 Typos do not commonly cause anomalies Anomalies are caused by incomplete Kconfig patches 14% of the time Anomalies are often fixed by CPP patches (26% of the time) On average, anomalies last for 6 releases
  • 14. What Does it All Mean? • Strict review process catches spelling mistakes • Changes to Kconfig are sometimes not properly propagated to the rest of the kernel • Anomalies caused by incomplete changes are harder to catch in the review process • Developers tend to fix things on the code side since changes to Kconfig have potentially cross-cutting concerns • Developers have difficulty keeping everything consistent. Providing them with automatic tools for these tasks may help. Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 14
  • 15. Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 15 Questions? snadi@uwaterloo.ca http://swag.uwaterloo.ca/~snadi Incomplete configuration patches Code (CPP) patches Time cause fix 14% 26%