Bugs as deviant behavior: a general approach to inferring errors in systems code

A major obstacle to finding program errors in a real system is knowing what correctness rules the system must obey. These rules are often undocumented or specified in an ad hoc manner. This paper demonstrates techniques that automatically extract such checking information from the source code itself...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Engler, Dawson, Chen, David Yu, Hallem, Seth, Chou, Andy, Chelf, Benjamin
Format: Tagungsbericht
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page 72
container_issue
container_start_page 57
container_title
container_volume
creator Engler, Dawson
Chen, David Yu
Hallem, Seth
Chou, Andy
Chelf, Benjamin
description A major obstacle to finding program errors in a real system is knowing what correctness rules the system must obey. These rules are often undocumented or specified in an ad hoc manner. This paper demonstrates techniques that automatically extract such checking information from the source code itself, rather than the programmer, thereby avoiding the need for a priori knowledge of system rules.The cornerstone of our approach is inferring programmer "beliefs" that we then cross-check for contradictions. Beliefs are facts implied by code: a dereference of a pointer, p, implies a belief that p is non-null, a call to "unlock(1)" implies that 1 was locked, etc. For beliefs we know the programmer must hold, such as the pointer dereference above, we immediately flag contradictions as errors. For beliefs that the programmer may hold, we can assume these beliefs hold and use a statistical analysis to rank the resulting errors from most to least likely. For example, a call to "spin_lock" followed once by a call to "spin_unlock" implies that the programmer may have paired these calls by coincidence. If the pairing happens 999 out of 1000 times, though, then it is probably a valid belief and the sole deviation a probable error. The key feature of this approach is that it requires no a priori knowledge of truth: if two beliefs contradict, we know that one is an error without knowing what the correct belief is.Conceptually, our checkers extract beliefs by tailoring rule "templates" to a system --- for example, finding all functions that fit the rule template "a must be paired with b." We have developed six checkers that follow this conceptual framework. They find hundreds of bugs in real systems such as Linux and OpenBSD. From our experience, they give a dramatic reduction in the manual effort needed to check a large system. Compared to our previous work [9], these template checkers find ten to one hundred times more rule instances and derive properties we found impractical to specify manually.
doi_str_mv 10.1145/502034.502041
format Conference Proceeding
fullrecord <record><control><sourceid>proquest_acm_b</sourceid><recordid>TN_cdi_proquest_miscellaneous_31052121</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>31052121</sourcerecordid><originalsourceid>FETCH-LOGICAL-a991-83544195a3434e54e28b55f22b1a81b0a77df2598f5a99cc7ce960915d990fa43</originalsourceid><addsrcrecordid>eNqNjz1PwzAURS0BElXJiMSYiYmU92y_2h6h4kuqxNLdsh0bAmkDcdPfT6ogsTLd4R7dq8PYJcICUdItAQchF8eQeMIKozSSRhRCG3PKZoBLUZHRcM6KnD8AYOy0VGrGru6Ht1y6XNbx0LjdvvTx3R2arr9gZ8m1ORa_OWebx4fN6rlavz69rO7WlTMGKy1ISjTkhBQykoxce6LEuUen0YNTqk58vE408iGoEM0SDFJtDCQnxZxdT7Nfffc9xLy32yaH2LZuF7shW4FAHDn-gS5sre-6z2wR7FHfTvp20h_Bm3-B1vdNTOIH8eJU5g</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>conference_proceeding</recordtype><pqid>31052121</pqid></control><display><type>conference_proceeding</type><title>Bugs as deviant behavior: a general approach to inferring errors in systems code</title><source>ACM Digital Library Complete</source><creator>Engler, Dawson ; Chen, David Yu ; Hallem, Seth ; Chou, Andy ; Chelf, Benjamin</creator><creatorcontrib>Engler, Dawson ; Chen, David Yu ; Hallem, Seth ; Chou, Andy ; Chelf, Benjamin</creatorcontrib><description>A major obstacle to finding program errors in a real system is knowing what correctness rules the system must obey. These rules are often undocumented or specified in an ad hoc manner. This paper demonstrates techniques that automatically extract such checking information from the source code itself, rather than the programmer, thereby avoiding the need for a priori knowledge of system rules.The cornerstone of our approach is inferring programmer "beliefs" that we then cross-check for contradictions. Beliefs are facts implied by code: a dereference of a pointer, p, implies a belief that p is non-null, a call to "unlock(1)" implies that 1 was locked, etc. For beliefs we know the programmer must hold, such as the pointer dereference above, we immediately flag contradictions as errors. For beliefs that the programmer may hold, we can assume these beliefs hold and use a statistical analysis to rank the resulting errors from most to least likely. For example, a call to "spin_lock" followed once by a call to "spin_unlock" implies that the programmer may have paired these calls by coincidence. If the pairing happens 999 out of 1000 times, though, then it is probably a valid belief and the sole deviation a probable error. The key feature of this approach is that it requires no a priori knowledge of truth: if two beliefs contradict, we know that one is an error without knowing what the correct belief is.Conceptually, our checkers extract beliefs by tailoring rule "templates" to a system --- for example, finding all functions that fit the rule template "a must be paired with b." We have developed six checkers that follow this conceptual framework. They find hundreds of bugs in real systems such as Linux and OpenBSD. From our experience, they give a dramatic reduction in the manual effort needed to check a large system. Compared to our previous work [9], these template checkers find ten to one hundred times more rule instances and derive properties we found impractical to specify manually.</description><identifier>ISSN: 0163-5980</identifier><identifier>ISBN: 9781581133899</identifier><identifier>ISBN: 1581133898</identifier><identifier>DOI: 10.1145/502034.502041</identifier><language>eng</language><publisher>New York, NY, USA: ACM</publisher><subject>General and reference -- Cross-computing tools and techniques -- Reliability ; Software and its engineering -- Software creation and management -- Software verification and validation -- Software defect analysis -- Software testing and debugging ; Software and its engineering -- Software organization and properties -- Extra-functional properties -- Software reliability</subject><ispartof>Operating systems review, 2001, p.57-72</ispartof><rights>2001 ACM</rights><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>309,310,776,780,785,786,23910,23911,25119,27904</link.rule.ids></links><search><creatorcontrib>Engler, Dawson</creatorcontrib><creatorcontrib>Chen, David Yu</creatorcontrib><creatorcontrib>Hallem, Seth</creatorcontrib><creatorcontrib>Chou, Andy</creatorcontrib><creatorcontrib>Chelf, Benjamin</creatorcontrib><title>Bugs as deviant behavior: a general approach to inferring errors in systems code</title><title>Operating systems review</title><description>A major obstacle to finding program errors in a real system is knowing what correctness rules the system must obey. These rules are often undocumented or specified in an ad hoc manner. This paper demonstrates techniques that automatically extract such checking information from the source code itself, rather than the programmer, thereby avoiding the need for a priori knowledge of system rules.The cornerstone of our approach is inferring programmer "beliefs" that we then cross-check for contradictions. Beliefs are facts implied by code: a dereference of a pointer, p, implies a belief that p is non-null, a call to "unlock(1)" implies that 1 was locked, etc. For beliefs we know the programmer must hold, such as the pointer dereference above, we immediately flag contradictions as errors. For beliefs that the programmer may hold, we can assume these beliefs hold and use a statistical analysis to rank the resulting errors from most to least likely. For example, a call to "spin_lock" followed once by a call to "spin_unlock" implies that the programmer may have paired these calls by coincidence. If the pairing happens 999 out of 1000 times, though, then it is probably a valid belief and the sole deviation a probable error. The key feature of this approach is that it requires no a priori knowledge of truth: if two beliefs contradict, we know that one is an error without knowing what the correct belief is.Conceptually, our checkers extract beliefs by tailoring rule "templates" to a system --- for example, finding all functions that fit the rule template "a must be paired with b." We have developed six checkers that follow this conceptual framework. They find hundreds of bugs in real systems such as Linux and OpenBSD. From our experience, they give a dramatic reduction in the manual effort needed to check a large system. Compared to our previous work [9], these template checkers find ten to one hundred times more rule instances and derive properties we found impractical to specify manually.</description><subject>General and reference -- Cross-computing tools and techniques -- Reliability</subject><subject>Software and its engineering -- Software creation and management -- Software verification and validation -- Software defect analysis -- Software testing and debugging</subject><subject>Software and its engineering -- Software organization and properties -- Extra-functional properties -- Software reliability</subject><issn>0163-5980</issn><isbn>9781581133899</isbn><isbn>1581133898</isbn><fulltext>true</fulltext><rsrctype>conference_proceeding</rsrctype><creationdate>2001</creationdate><recordtype>conference_proceeding</recordtype><recordid>eNqNjz1PwzAURS0BElXJiMSYiYmU92y_2h6h4kuqxNLdsh0bAmkDcdPfT6ogsTLd4R7dq8PYJcICUdItAQchF8eQeMIKozSSRhRCG3PKZoBLUZHRcM6KnD8AYOy0VGrGru6Ht1y6XNbx0LjdvvTx3R2arr9gZ8m1ORa_OWebx4fN6rlavz69rO7WlTMGKy1ISjTkhBQykoxce6LEuUen0YNTqk58vE408iGoEM0SDFJtDCQnxZxdT7Nfffc9xLy32yaH2LZuF7shW4FAHDn-gS5sre-6z2wR7FHfTvp20h_Bm3-B1vdNTOIH8eJU5g</recordid><startdate>20011021</startdate><enddate>20011021</enddate><creator>Engler, Dawson</creator><creator>Chen, David Yu</creator><creator>Hallem, Seth</creator><creator>Chou, Andy</creator><creator>Chelf, Benjamin</creator><general>ACM</general><scope>7SC</scope><scope>8FD</scope><scope>JQ2</scope><scope>L7M</scope><scope>L~C</scope><scope>L~D</scope></search><sort><creationdate>20011021</creationdate><title>Bugs as deviant behavior</title><author>Engler, Dawson ; Chen, David Yu ; Hallem, Seth ; Chou, Andy ; Chelf, Benjamin</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a991-83544195a3434e54e28b55f22b1a81b0a77df2598f5a99cc7ce960915d990fa43</frbrgroupid><rsrctype>conference_proceedings</rsrctype><prefilter>conference_proceedings</prefilter><language>eng</language><creationdate>2001</creationdate><topic>General and reference -- Cross-computing tools and techniques -- Reliability</topic><topic>Software and its engineering -- Software creation and management -- Software verification and validation -- Software defect analysis -- Software testing and debugging</topic><topic>Software and its engineering -- Software organization and properties -- Extra-functional properties -- Software reliability</topic><toplevel>online_resources</toplevel><creatorcontrib>Engler, Dawson</creatorcontrib><creatorcontrib>Chen, David Yu</creatorcontrib><creatorcontrib>Hallem, Seth</creatorcontrib><creatorcontrib>Chou, Andy</creatorcontrib><creatorcontrib>Chelf, Benjamin</creatorcontrib><collection>Computer and Information Systems Abstracts</collection><collection>Technology Research Database</collection><collection>ProQuest Computer Science Collection</collection><collection>Advanced Technologies Database with Aerospace</collection><collection>Computer and Information Systems Abstracts – Academic</collection><collection>Computer and Information Systems Abstracts Professional</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Engler, Dawson</au><au>Chen, David Yu</au><au>Hallem, Seth</au><au>Chou, Andy</au><au>Chelf, Benjamin</au><format>book</format><genre>proceeding</genre><ristype>CONF</ristype><atitle>Bugs as deviant behavior: a general approach to inferring errors in systems code</atitle><btitle>Operating systems review</btitle><date>2001-10-21</date><risdate>2001</risdate><spage>57</spage><epage>72</epage><pages>57-72</pages><issn>0163-5980</issn><isbn>9781581133899</isbn><isbn>1581133898</isbn><abstract>A major obstacle to finding program errors in a real system is knowing what correctness rules the system must obey. These rules are often undocumented or specified in an ad hoc manner. This paper demonstrates techniques that automatically extract such checking information from the source code itself, rather than the programmer, thereby avoiding the need for a priori knowledge of system rules.The cornerstone of our approach is inferring programmer "beliefs" that we then cross-check for contradictions. Beliefs are facts implied by code: a dereference of a pointer, p, implies a belief that p is non-null, a call to "unlock(1)" implies that 1 was locked, etc. For beliefs we know the programmer must hold, such as the pointer dereference above, we immediately flag contradictions as errors. For beliefs that the programmer may hold, we can assume these beliefs hold and use a statistical analysis to rank the resulting errors from most to least likely. For example, a call to "spin_lock" followed once by a call to "spin_unlock" implies that the programmer may have paired these calls by coincidence. If the pairing happens 999 out of 1000 times, though, then it is probably a valid belief and the sole deviation a probable error. The key feature of this approach is that it requires no a priori knowledge of truth: if two beliefs contradict, we know that one is an error without knowing what the correct belief is.Conceptually, our checkers extract beliefs by tailoring rule "templates" to a system --- for example, finding all functions that fit the rule template "a must be paired with b." We have developed six checkers that follow this conceptual framework. They find hundreds of bugs in real systems such as Linux and OpenBSD. From our experience, they give a dramatic reduction in the manual effort needed to check a large system. Compared to our previous work [9], these template checkers find ten to one hundred times more rule instances and derive properties we found impractical to specify manually.</abstract><cop>New York, NY, USA</cop><pub>ACM</pub><doi>10.1145/502034.502041</doi><tpages>16</tpages></addata></record>
fulltext fulltext
identifier ISSN: 0163-5980
ispartof Operating systems review, 2001, p.57-72
issn 0163-5980
language eng
recordid cdi_proquest_miscellaneous_31052121
source ACM Digital Library Complete
subjects General and reference -- Cross-computing tools and techniques -- Reliability
Software and its engineering -- Software creation and management -- Software verification and validation -- Software defect analysis -- Software testing and debugging
Software and its engineering -- Software organization and properties -- Extra-functional properties -- Software reliability
title Bugs as deviant behavior: a general approach to inferring errors in systems code
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-22T13%3A22%3A59IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_acm_b&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=proceeding&rft.atitle=Bugs%20as%20deviant%20behavior:%20a%20general%20approach%20to%20inferring%20errors%20in%20systems%20code&rft.btitle=Operating%20systems%20review&rft.au=Engler,%20Dawson&rft.date=2001-10-21&rft.spage=57&rft.epage=72&rft.pages=57-72&rft.issn=0163-5980&rft.isbn=9781581133899&rft.isbn_list=1581133898&rft_id=info:doi/10.1145/502034.502041&rft_dat=%3Cproquest_acm_b%3E31052121%3C/proquest_acm_b%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=31052121&rft_id=info:pmid/&rfr_iscdi=true