Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Revealing and repairing configuration inconsistencies in large-scale system software

Published: 01 October 2012 Publication History

Abstract

System software typically offers a large amount of compile-time options and variability. A good example is the Linux kernel, which provides more than 10,000 configurable features, growing rapidly. This allows users to tailor it with respect to a broad range of supported hardware architectures and application domains. From the maintenance point of view, compile-time configurability poses 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. In order to ensure consistency between the variability expressed in the code and the configuration models, we propose an approach that extracts variability from both into propositional logic. This reveals inconsistencies between variability as expressed by the C Preprocessor (CPP) and an explicit variability model, which manifest themselves in seemingly conditional code that is in fact unconditional. We evaluate our approach with the Linux, for which our tool detects 1,766 configurability defects, which turned out 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 previously unknown bug.

References

[1]
Badros G.J., Notkin D.: A framework for preprocessor-aware C source code analyses. Softw. Practice Experience 30(8), 907---924 (2000)
[2]
Batory, D.: Feature-oriented programming and the AHEAD tool suite. In: Proceedings of the 26th International Conference on Software Engineering (ICSE '04), pp. 702---703. IEEE Computer Society Press, Los Alamitos (2004)
[3]
Baxter, I.D.: DMS: program transformations for practical scalable software evolution. In: Proceedings of the 5th International Workshop on Principles of Software Evolution (IWPSE'02), pp. 48---51. ACM Press, New York (2002)
[4]
Baxter, I.D., Mehlich, M.: Preprocessor conditional removal by simple partial evaluation. In: Proceedings of the 8th Working Conference on Reverse Engineering (WCRE '01), p. 281. IEEE Computer Society Press, Los Alamitos (2001)
[5]
Benavides, D., Ruiz-Cortés, A., Trinidad, P.: Automated reasoning on feature models. In: Proceedings of the 17th International Conference on Advanced Information Systems Engineering (CAISE '05), vol. 3520, pp. 491---503. Springer, Heidelberg (2005)
[6]
Berger, T., She, S.: Formal semantics of the CDL language. Technical note, University of Leipzig (2010)
[7]
Berger, T., She, S., Czarnecki, K., Wasowski A.: Feature-to-code mapping in two large product lines. Technical report, University of Leipzig (Germany), University of Waterloo (Canada), IT University of Copenhagen (Denmark) (2010)
[8]
Beuche, D., Guerrouat, A., Papajewski, H., Schröder-Preikschat, W., Spinczyk, O., Spinczyk, U.: The PURE family of object-oriented operating systems for deeply embedded systems. In: Proceedings of the 2nd IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC '99), pp. 45---53. IEEE Computer Society Press, California (1999)
[9]
Cadar, C., Dunbar, D., Engler, D.: KLEE: unassisted and automatic generation of high-coverage tests for complex systems programs. In: 8th Symposium on Operating System Design and Implementation (OSDI '08). USENIX Association (2008)
[10]
Campbell R., Islam N., Madany P., Raila D.: Designing and implementing choices: an object-oriented system in C++. Commun. ACM 36(9), 117---126 (1993).
[11]
Chou, A., Yang, J., Chelf, B., Hallem, S., Engler, D.: An empirical study of operating systems errors. In: Proceedings of the 18th ACM Symposium on Operating Systems Principles (SOSP'01), pp. 73---88. ACM Press, New York (2001)
[12]
Coady, Y., Kiczales, G.: Back to the future: a retroactive study of aspect evolution in operating system code. In: Mehmet, A. (ed) Proceedings of the 2nd International Conference on Aspect-Oriented Software Development (AOSD'03), pp. 50---59, Boston (2003)
[13]
Czarnecki K., Eisenecker U.W.: Generative Programming. Methods, Tools and Applications. Addison-Wesley, Boston (2000)
[14]
Czarnecki, K., Pietroszek, K.: Verifying feature-based model templates against well-formedness OCL constraints. In: Proceedings of the 6th International Conference on Generative Programming and Component Engineering (GPCE'06), pp. 211---220. ACM Press, New York (2006)
[15]
Czarnecki, K., Wasowski, A.: Feature diagrams and logics: There and back again. In: Proceedings of the 11th Software Product Line Conference (SPLC'07), pp. 23---34. IEEE Computer Society Press, California (2007)
[16]
Engler, D., Chen, D.Y., Hallem, S., Chou, A., Chelf, B.: Bugs as deviant behavior: a general approach to inferring errors in systems code. In: Proceedings of the 18th ACM Symposium on Operating Systems Principles (SOSP'01), pp. 57---72. ACM Press, New York (2001)
[17]
Ernst, M.D., Czeisler, A., Griswold, W.G., Notkin, D.: Quickly detecting relevant program invariants. In: Proceedings of the 22nd International Conference on Software Engineering (ICSE'00), pp. 449---458. ACM Press, New York (2000)
[18]
Fassino, J.-P., Stefani, J.-B., Lawall, J., Muller, G.: THINK: a software framework for component-based operating system kernels. In: Proceedings of the 2002 USENIX Annual Technical Conference, pp. 73---86. USENIX Association (2002)
[19]
Garrido, A.: Program refactoring in the presence of preprocessor directives. PhD thesis, University of Illinois at Urbana-Champaign, Champaign, IL, USA, 2005. Adviser-Johnson, Ralph
[20]
Guo, P.J., Engler, D.: Linux kernel developer responses to static analysis bug reports. In: Proceedings of the 2009 USENIX Annual Technical Conference. USENIX Association (2009)
[21]
Hu, Y., Merlo, E., Dagenais, M., Lagüe, B.: C/C++ conditional compilation analysis using symbolic execution. In: Proceedings of the 16th IEEE International Conference on Software Maintainance (ICSM'00), pp. 196. IEEE Computer Society Press, California (2000)
[22]
Jones N.D., Gomard C.K., Sestoft P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Inc, Upper Saddle River (1993)
[23]
Kästner, C., Giarrusso, P.G., Rendel, T., Erdweg, S., Ostermann, K., Berger, T.: Variability-aware parsing in the presence of lexical macros and conditional compilation. In: Proceedings of the 26th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'11). ACM Press, New York (2011)
[24]
Kremenek, T., Twohey, P., Back, G., Ng, A., Engler, D.: From uncertainty to belief: inferring the specification within. In: 7th Symposium on Operating System Design and Implementation (OSDI'06), pp. 161---176. USENIX Association (2006)
[25]
Latendresse, M.: Rewrite systems for symbolic evaluation of c-like preprocessing. In: CSMR '04: Proceedings of the Eighth Euromicro Working Conference on Software Maintenance and Reengineering (CSMR'04), p. 165. IEEE Computer Society Press, California (2004)
[26]
Li, Z., Zhou, Y.: PR-miner: automatically extracting implicit programming rules and detecting violations in large software code. In: Proceedings of the 10th European Software Engineering Conference and the 13th ACM Symposium on the Foundations of Software Engineering (ESEC/FSE'00), pp. 306---315. ACM Press, New York (2005)
[27]
Liebig, J., Apel, S., Lengauer, C., Kästner, C., Schulze, M.: An analysis of the variability in forty preprocessor-based software product lines. In: Proceedings of the 32nd International Conference on Software Engineering (ICSE '10). ACM Press, New York (2010)
[28]
Lohmann, D., Hofer, W., Schröder-Preikschat, W., Streicher, J., Spinczyk, O.: CiAO: An aspect-oriented operating-system family for resource-constrained embedded systems. In: Proceedings of the 2009 USENIX Annual Technical Conference, pp. 215---228. USENIX Association (2009)
[29]
Lohmann, D., Scheler, F., Tartler, R., Spinczyk, O., Schröder-Preikschat, W.: A quantitative analysis of aspects in the eCos kernel. In: Proceedings of the ACM SIGOPS/EuroSys European Conference on Computer Systems 2006 (EuroSys'06), pp. 191---204. ACM Press, New York (2006)
[30]
Massa A.: Embedded Software Development with eCos. New Riders, Indianapolis (2002)
[31]
Metzger, A., Heymans, P., Pohl, K., Schobbens, P.-Y., Saval, G.: Disambiguating the documentation of variability in software product lines. In: Proceedings of the 15th IEEE International Conference on Requirements Engineering (RE'07), pp. 243---253. IEEE Computer Society, California (2007)
[32]
Padioleau, Y., Lawall, J.L., Muller, G., Hansen, R.R.: Documenting and automating collateral evolutions in Linux device drivers. In: Proceedings of the ACM SIGOPS/EuroSys European Conference on Computer Systems 2008 (EuroSys'08). ACM Press, California (2008)
[33]
Palix, N., Lawall, J., Muller, G.: Tracking code patterns over multiple software versions with Herodotos. In: Proceedings of the 9th International Conference on Aspect-Oriented Software Development (AOSD'10), pp. 169---180. ACM Press, New York (2010)
[34]
Palix, N., Thomas, G., Saha, S., Calvès, C., Lawall, J.L., Muller, G.: Faults in Linux: ten years later. In: Proceedings of the 16th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS'11), pp. 305---318. ACM Press, New York (2011)
[35]
Parnas D.L.: Designing software for ease of extension and contraction. IEEE Trans. Softw. Eng. SE-5(2), 128---138 (1979)
[36]
Pohl K., Böckle G., van der Linden F.J.: Software Product Line Engineering: Foundations, Principles and Techniques. Springer, Berlin (2005)
[37]
Reid, A., Flatt, M., Stoller, L., Lepreau, J., Eide, E.: Knit: component composition for systems software. In: 4th Symposium on Operating System Design and Implementation (OSDI'00), pp. 347---360. USENIX Association (2000)
[38]
She, S., Lotufo, R., Berger, T., Wasowski, A., Czarnecki, K.: Reverse engineering feature models. In: Proceedings of the 33nd International Conference on Software Engineering (ICSE'11). ACM Press, New York (2011)
[39]
Sincero, J., Schröder-Preikschat, W.: The Linux kernel configurator as a feature modeling tool. In: Thiel, S., Pohl, K. (eds.) Proceedings of the 12th Software Product Line Conference (SPLC '08), Second Volume, pp. 257---260. Lero Int. Science Centre, University of Limerick, Ireland (2008)
[40]
Sincero, J., Tartler, R., Lohmann, D., Schröder-Preikschat, W.: Efficient extraction and analysis of preprocessor-based variability. In: Proceedings of the 9th International Conference on Generative Programming and Component Engineering (GPCE '10). ACM Press, New York (2010)
[41]
Spencer, H., Collyer, G.: #ifdef considered harmful, or portability experience with C News. In: Proceedings of the 1992 USENIX Annual Technical Conference. USENIX Association (1992)
[42]
Spinellis, D.: A tale of four kernels. In: Wilhem, S., Dwyer, M.B., Gruhn, V. (eds.) Proceedings of the 30th International Conference on Software Engineering (ICSE '08), pp. 381---390. ACM Press, New York (2008)
[43]
Tan, L., Yuan, D., Krishna, G., Zhou, Y.: /*icomment: Bugs or bad comments?*/. In: Proceedings of the 21st ACM Symposium on Operating Systems Principles (SOSP'07), pp. 145---158. ACM Press, New York (2007)
[44]
Tartler, R., Lohmann, D., Sincero, J., Schröder-Preikschat, W.: Feature consistency in compile-time-configurable system software: facing the Linux 10,000 feature problem. In: Proceedings of the ACM SIGOPS/EuroSys European Conference on Computer Systems 2011 (EuroSys'11), pp. 47---60. ACM Press, New York (2011)
[45]
Tartler, R., Sincero, J., Schröder-Preikschat, W., Lohmann, D.: Dead or alive: Finding zombie features in the Linux kernel. In: Proceedings of the 1st Workshop on Feature-Oriented Software Development (FOSD'09), pp. 81---86. ACM Press, New York (2009)
[46]
Thaker, S., Batory, D., Kitchin, D., Cook, W.: Safe composition of product lines. In: Proceedings of the 7th International Conference on Generative Programming and Component Engineering (GPCE'07), pp. 95---104. ACM Press, New York (2007)
[47]
Urban, M., Lohmann, D., Spinczyk, O.: The aspect-oriented design of the PUMA C/C++ parser framework. In: Proceedings of the 9th International Conference on Aspect-Oriented Software Development (AOSD'10), pp. 217---221. ACM Press, New York (2010)
[48]
Zengler, C., Küchlin, W.: Encoding the Linux kernel configuration in propositional logic. In: Hotz, L., Haselböck, A. (eds,) Proceedings of the 19th European Conference on Artificial Intelligence (ECAI 2010) Workshop on Configuration 2010, pp. 51---56 (2010)

Cited By

View all
  • (2024)Pragmatic Random Sampling of the Linux Kernel: Enhancing the Randomness and Correctness of the conf ToolProceedings of the 28th ACM International Systems and Software Product Line Conference10.1145/3646548.3672586(24-35)Online publication date: 2-Sep-2024
  • (2023)“We do not appreciate being experimented on”Journal of Systems and Software10.1016/j.jss.2023.111774204:COnline publication date: 1-Oct-2023
  • (2021)Finding broken Linux configuration specifications by statically analyzing the Kconfig languageProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468578(893-905)Online publication date: 20-Aug-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image International Journal on Software Tools for Technology Transfer (STTT)
International Journal on Software Tools for Technology Transfer (STTT)  Volume 14, Issue 5
October 2012
152 pages
ISSN:1433-2779
EISSN:1433-2787
Issue’s Table of Contents

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 01 October 2012

Author Tags

  1. Configurability
  2. Experimentation
  3. Linux
  4. Maintenance
  5. Management
  6. Static analysis

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Pragmatic Random Sampling of the Linux Kernel: Enhancing the Randomness and Correctness of the conf ToolProceedings of the 28th ACM International Systems and Software Product Line Conference10.1145/3646548.3672586(24-35)Online publication date: 2-Sep-2024
  • (2023)“We do not appreciate being experimented on”Journal of Systems and Software10.1016/j.jss.2023.111774204:COnline publication date: 1-Oct-2023
  • (2021)Finding broken Linux configuration specifications by statically analyzing the Kconfig languageProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468578(893-905)Online publication date: 20-Aug-2021
  • (2021)Capturing the diversity of analyses on the Linux kernel variabilityProceedings of the 25th ACM International Systems and Software Product Line Conference - Volume A10.1145/3461001.3471151(160-171)Online publication date: 6-Sep-2021
  • (2020)Mapping features to automatically identified object-oriented variability implementationsProceedings of the 14th International Working Conference on Variability Modelling of Software-Intensive Systems10.1145/3377024.3377037(1-9)Online publication date: 5-Feb-2020
  • (2019)A Kconfig Translation to Logic with One-Way Validation SystemProceedings of the 23rd International Systems and Software Product Line Conference - Volume A10.1145/3336294.3336313(303-308)Online publication date: 9-Sep-2019
  • (2018)CoccinelleProceedings of the 2018 USENIX Conference on Usenix Annual Technical Conference10.5555/3277355.3277413(601-613)Online publication date: 11-Jul-2018
  • (2018)Tackling combinatorial explosion: a study of industrial needs and practices for analyzing highly configurable systemsProceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering10.1145/3238147.3238201(155-166)Online publication date: 3-Sep-2018
  • (2017)Early Consistency Checking between Specification and Implementation VariabilitiesProceedings of the 21st International Systems and Software Product Line Conference - Volume A10.1145/3106195.3106209(29-38)Online publication date: 25-Sep-2017
  • (2016)On the techniques we create, the tools we build, and their misalignmentsProceedings of the 38th International Conference on Software Engineering10.1145/2884781.2884835(132-143)Online publication date: 14-May-2016
  • Show More Cited By

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media