• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Linux Variability Anomalies: What Causes Them and How do They get Fixed?
 

Linux Variability Anomalies: What Causes Them and How do They get Fixed?

on

  • 197 views

MSR'13 presentation

MSR'13 presentation

Statistics

Views

Total Views
197
Views on SlideShare
175
Embed Views
22

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 22

http://2013.msrconf.org 21
http://localhost 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Linux Variability Anomalies: What Causes Them and How do They get Fixed? Linux Variability Anomalies: What Causes Them and How do They get Fixed? Presentation Transcript

    • Linux Variability Anomalies:What Causes Them?How do They Get Fixed?MSR 2013, May 18th 2013 -- San Francisco, USASarah Nadi, Christian Dietrich, Reinhard Tartler,Richard C. Holt, Daniel Lohmann
    • Configuring the Linux KernelNadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 2UserSelectionLinux KernelConfigurationCustomizedKernelLinux UserI’ll customize thiskernel for myspecific needs!
    • Variability in Linux (e.g.,Adding New Driver)Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 3New driver toadd?… Here wego again!LinuxDeveloper...#ifdef USBvoid put_usb(...);….#endif...usb_foo.c...obj-$(USB_FOO) += usb_foo.o...Kbuild(Makefile)...config USB_FOObool “FOO Support”depends on USB...KconfigMaintaining Consistency is hard!!
    • Variability Anomalies• Inconsistencies between the 3 artifacts leads to dead andundead 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 4Linux DeveloperOK, help meavoid them!How do these anomalies getintroduced?How do these anomalies getfixed?Avoid future anomaliesAutomatically suggest solutions
    • Study OverviewNadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 5Exploratory Case StudyStudy set of 106 existingpatches (51% accepted)1PatternsConfirmatory Case Studya) Use undertaker todetect anomaliesb) Mine git repository overseveral releases toconfirm patterns2undertaker
    • Undertaker• Detects dead & undeadcode blocks• Uses SAT solverfor consistencychecking• Developed at FAU[Tartler et al., Eurosys ‘11]Nadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 6
    • Referential Variability AnomaliesNadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 7ReferentialAnomalies• 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 StudyNadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 8Incorrect FeatureNames1 2Incomplete KconfigPatches• Code is not useless – incorrectfeature was used• Some incorrect features weretypos• Responses suggest that severalof missing features werepreviously renamed/deleted
    • Research QuestionsRQ1: Are misspellings a common cause of variabilityanomalies?RQ2: Are incomplete Kconfig patches a common cause ofvariability 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 - OverviewNadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 10- Feature_X+Feature_Y25,410CPP/Code Patches- Feature_X+Feature_Y10,263Kconfig PatchesFeature_XmissingReferentialAnomaliesundertakerv2.6.37 – v3.6KconfigPatchesTimecauseMappingCPP PatchesKconfig PatchesTimefix
    • Results: Causes of Variability AnomaliesNadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 11Incomplete Kconfig patches often cause referential anomalies.An average of 14% of referential anomalies are caused bychanges to Kconfig that are not completely propagated tosource code.IncompleteKconfigpatchesTimecause
    • Results: Fixes for Variability AnomaliesNadi et al. - MSR 2013 Causes & Fixes of Variability Anomalies 12Referential anomalies are commonly fixed by CPP patches (26%of the time) .TimefixKconfig/CPPpatchesReferential anomalies are seldom fixed by Kconfig patches (3% ofthe time).
    • Summary of ResultsRQ1: Are misspellings a common cause of variabilityanomalies?RQ2: Are incomplete Kconfig patches a common cause ofvariability 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 13Typos do not commonly cause anomaliesAnomalies are caused by incomplete Kconfig patches 14% of the timeAnomalies 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 tothe rest of the kernel• Anomalies caused by incomplete changes are harder to catchin the review process• Developers tend to fix things on the code side since changes toKconfig 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 15Questions?snadi@uwaterloo.cahttp://swag.uwaterloo.ca/~snadiIncompleteconfigurationpatchesCode (CPP)patchesTimecause fix14% 26%