Feature consistency in compile-time-configurable system software: facing the linux 10,000 feature problem

Much system software can be configured at compile time to tailor it with respect to a broad range of supported hardware architectures and application domains. A good example is the Linux kernel, which provides more than 10,000 configurable features, growing rapidly. From the maintenance point of view, compile-time configurability imposes big challenges. The configuration model (the selectable features and their constraints as presented to the user) and the configurability that is actually implemented in the code have to be kept in sync, which, if performed manually, is a tedious and error-prone task. In the case of Linux, this has led to numerous defects in the source code, many of which are actual bugs. We suggest an approach to automatically check for configurability-related implementation defects in large-scale configurable system software. The configurability is extracted from its various implementation sources and examined for inconsistencies, which manifest in seemingly conditional code that is in fact unconditional. We evaluate our approach with the latest version of Linux, for which our tool detects 1,776 configurability defects, which manifest as dead/superfluous source code and bugs. Our findings have led to numerous source-code improvements and bug fixes in Linux: 123 patches (49 merged) fix 364 defects, 147 of which have been confirmed by the corresponding Linux developers and 20 as fixing a new bug.

[1]  Eric Eide,et al.  Knit: component composition for systems software , 2000, OSDI.

[2]  Dawson R. Engler,et al.  KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs , 2008, OSDI.

[3]  Diomidis Spinellis A tale of four kernels , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[4]  Philip J. Guo,et al.  Linux Kernel Developer Responses to Static Analysis Bug Reports , 2009, USENIX Annual Technical Conference.

[5]  Klaus Pohl,et al.  Software Product Line Engineering - Foundations, Principles, and Techniques , 2005 .

[6]  Krzysztof Czarnecki,et al.  Feature Diagrams and Logics: There and Back Again , 2007, 11th International Software Product Line Conference (SPLC 2007).

[7]  Ira D. Baxter,et al.  Preprocessor conditional removal by simple partial evaluation , 2001, Proceedings Eighth Working Conference on Reverse Engineering.

[8]  Yuanyuan Zhou,et al.  /*icomment: bugs or bad comments?*/ , 2007, SOSP.

[9]  Sven Apel,et al.  An analysis of the variability in forty preprocessor-based software product lines , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[10]  Roy H. Campbell,et al.  Designing and implementing Choices: an object-oriented system in C++ , 1993, CACM.

[11]  Henry Spencer,et al.  #ifdef Considered Harmful, or Portability Experience with C News , 1992, USENIX Summer.

[12]  Zhenmin Li,et al.  PR-Miner: automatically extracting implicit programming rules and detecting violations in large software code , 2005, ESEC/FSE-13.

[13]  Don S. Batory,et al.  Feature-oriented programming and the AHEAD tool suite , 2004, Proceedings. 26th International Conference on Software Engineering.

[14]  Krzysztof Czarnecki,et al.  Generative programming - methods, tools and applications , 2000 .

[15]  Anthony Massa,et al.  Embedded Software Development with eCos , 2002 .

[16]  William G. Griswold,et al.  Quickly detecting relevant program invariants , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[17]  Julia L. Lawall,et al.  Proceedings of the 2002 Usenix Annual Technical Conference Think: a Software Framework for Component-based Operating System Kernels , 2022 .

[18]  Antonio Ruiz Cortés,et al.  Automated Reasoning on Feature Models , 2005, Seminal Contributions to Information Systems Engineering.

[19]  Gregor Kiczales,et al.  Back to the future: a retroactive study of aspect evolution in operating system code , 2003, AOSD '03.

[20]  Wolfgang Schröder-Preikschat,et al.  A quantitative analysis of aspects in the eCos kernel , 2006, EuroSys.

[21]  Dawson R. Engler,et al.  From uncertainty to belief: inferring the specification within , 2006, OSDI '06.

[22]  Danilo Beuche,et al.  The PURE family of object-oriented operating systems for deeply embedded systems , 1999, Proceedings 2nd IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC'99) (Cat. No.99-61702).

[23]  Dawson R. Engler,et al.  Bugs as deviant behavior: a general approach to inferring errors in systems code , 2001, SOSP.

[24]  Michel Dagenais,et al.  C/C++ conditional compilation analysis using symbolic execution , 2000, Proceedings 2000 International Conference on Software Maintenance.

[25]  David Lorge Parnas,et al.  Review of David L. Parnas' "Designing Software for Ease of Extension and Contraction" , 2004 .

[26]  Julia L. Lawall,et al.  Tracking code patterns over multiple software versions with Herodotos , 2010, AOSD.

[27]  Wolfgang Schröder-Preikschat,et al.  Efficient extraction and analysis of preprocessor-based variability , 2010, GPCE '10.

[28]  Wolfgang Schröder-Preikschat,et al.  CiAO: An Aspect-Oriented Operating-System Family for Resource-Constrained Embedded Systems , 2009, USENIX Annual Technical Conference.

[29]  Julia L. Lawall,et al.  Documenting and automating collateral evolutions in linux device drivers , 2008, Eurosys '08.