SlideShare uma empresa Scribd logo
1 de 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%

Mais conteúdo relacionado

Semelhante a 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
 
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
 
Fault tolerance - look, it's simple!
Fault tolerance - look, it's simple!Fault tolerance - look, it's simple!
Fault tolerance - look, it's simple!Izzet Mustafaiev
 
Kernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportKernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportAnne Nicolas
 

Semelhante a 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
 
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
 
Fault tolerance - look, it's simple!
Fault tolerance - look, it's simple!Fault tolerance - look, it's simple!
Fault tolerance - look, it's simple!
 
Kernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportKernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel report
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

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%