Information about Software Bug

A software bug (or just "bug") is an error, flaw, mistake, failure, or fault in a computer program that prevents it from behaving as intended (e.g., producing an incorrect result). Most bugs arise from mistakes and errors made by people in either a program's source code or its design, and a few are caused by compilers producing incorrect code. A program that contains a large number of bugs, and/or bugs that seriously interfere with its functionality, is said to be buggy. Reports detailing bugs in a program are commonly known as bug reports, fault reports, problem reports, trouble reports, change requests, and so forth.

Effects

Bugs can have a wide variety of effects, with varying levels of inconvenience to the user of the program. Some bugs have only a subtle effect on the program's functionality, and may thus lie undetected for a long time. More serious bugs may cause the program to crash or freeze leading to a denial of service. Others qualify as security bugs and might for example enable a malicious user to bypass access controls in order to obtain unauthorized privileges.

The results of bugs may be extremely serious. A bug in the code controlling the Therac-25 radiation therapy machine was directly responsible for some patient deaths in the 1980s. In 1996, the European Space Agency's US$1 billion prototype Ariane 5 rocket was destroyed less than a minute after launch, due to a bug in the on-board guidance computer program. In June 1994, a Royal Air Force Chinook crashed into the Mull of Kintyre, killing 29. This was initially dismissed as pilot error, but an investigation by Computer Weekly uncovered sufficient evidence to convince a House of Lords inquiry that it may have been caused by a software bug in the aircraft's engine control computer. [1]

Etymology

The concept that software might contain errors dates back to 1842 in Ada Byron's notes on the analytical engine in which she speaks of the difficulty of preparing program 'cards' for Charles Babbage's Analytical engine:

...an analyzing process must equally have been performed in order to furnish the Analytical Engine with the necessary operative data; and that herein may also lie a possible source of error. Granted that the actual mechanism is unerring in its processes, the cards may give it wrong orders.


Usage of the term "bug" to describe inexplicable defects has been a part of engineering jargon for many decades and predates computers and computer software; it may have originally been used in hardware engineering to describe mechanical malfunctions. For instance, Thomas Edison wrote the following words in a letter to an associate in 1878:

It has been just so in all of my inventions. The first step is an intuition, and comes with a burst, then difficulties arise—this thing gives out and [it is] then that "Bugs"—as such little faults and difficulties are called—show themselves and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached.[2]


Problems with radar electronics during World War II were referred to as bugs (or glitches), and there is additional evidence that the usage dates back much earlier.

Enlarge picture
Photo of what is possibly the first real bug found in a computer.


The invention of the term is often erroneously attributed to Grace Hopper, who publicized the cause of a malfunction in an early electromechanical computer. A typical version of the story is given by this quote:

In 1946, when Hopper was released from active duty, she joined the Harvard Faculty at the Computation Laboratory where she continued her work on the Mark II and Mark III. Operators traced an error in the Mark II to a moth trapped in a relay, coining the term bug. This bug was carefully removed and taped to the log book September 9th 1945 [sic]. Stemming from the first bug, today we call errors or glitch's [sic] in a program a bug. ''[3]


Hopper was not actually the one who found the insect, as she readily acknowledged. And the date was September 9, but in 1947, not 1945.[4][5] The operators who did find it (including William "Bill" Burke, later of the Naval Weapons Laboratory, Dahlgren Va. [6]), were familiar with the engineering term and, amused, kept the insect with the notation "First actual case of bug being found." Hopper loved to recount the story. [7]

While it is certain that the Mark II operators did not coin the term "bug", it has been suggested that they did coin the related term, "debug". Even this is unlikely, since the Oxford English Dictionary entry for "debug" contains a use of "debugging" in the context of airplane engines in 1945 (see the debugging article for more).

Prevention

Bugs are a consequence of the nature of human factors in the programming task. They arise from oversights made by computer programmers during design, coding and data entry. For example: In creating a relatively simple program to sort a list of words into alphabetical order, one's design might fail to consider what should happen when a word contains a hyphen. Perhaps, when converting the abstract design into the chosen programming lanugage, one might inadvertently create an off-by-one error and fail to sort the last word in the list. Finally, when typing the resulting program into the computer, one might accidentally type a '+' where a '-' was intended, perhaps resulting in the words being sorted into reverse alphabetical order. More complex bugs can arise from unintended interactions between different parts of a computer program. This frequently occurs because computer programs can be complex - millions of lines long in some cases - often having been programmed by many people over a great length of time, so that programmers are unable to mentally track every possible way in which parts can interact. Another category of bug called a race condition comes about when a program is running in more than one thread.

The software industry has put much effort into finding methods for preventing programmers from inadvertently introducing bugs while writing software. These include:

Programming style: While typos in the program code most likely are caught by the compiler, a bug usually appears when the programmer makes a logic error. Various innovations in programming style and defensive programming are designed to make these bugs less likely, or easier to spot.


Programming techniques: Bugs often create inconsistencies in the internal data of a running program. Programs can be written to check the consistency of their own internal data while running. If an inconsistency is encountered, the program can immediately halt, so that the bug can be located and fixed. Alternatively, the program can simply inform the user, attempt to correct the inconsistency, and continue running.


Development methodologies: There are several schemes for managing programmer activity, so that fewer bugs are produced. Many of these fall under the discipline of software engineering (which addresses software design issues as well.) For example, formal program specifications are used to state the exact behavior of programs, so that design bugs can be eliminated.


Programming language support: Programming languages often include features which help programmers deal with bugs, such as exception handling. In addition, many recently-invented languages have deliberately excluded features which can easily lead to bugs. For example, the Java programming language does not support pointer arithmetic.

Debugging

Enlarge picture
The typical bug history (GNU Classpath project data). A bug, submitted by the user, is unconfirmed. A reproduced bug is a confirmed bug. The confirmed bugs are later fixed. Bugs, belonging to other categories (unreproducible, will not be fixed, etc) are usually in the minority
Main article: Debugging


Finding and fixing bugs, or "debugging", has always been a major part of computer programming. Maurice Wilkes, an early computing pioneer, described his realization in the late 1940s that much of the rest of his life would be spent finding mistakes in his own programs. As computer programs grow more complex, bugs become more common and difficult to fix. Often programmers spend more time and effort finding and fixing bugs than writing new code.

Usually, the most difficult part of debugging is locating the erroneous part of the source code. Once the mistake is found, correcting it is usually easy. Programs known as debuggers exist to help programmers locate bugs. However, even with the aid of a debugger, locating bugs is something of an art. It is not uncommon for a bug in one section of a program to cause failures in a completely different section, thus making it especially difficult to track (for example, an error in a graphic rendering routine causing a file I/O routine to fail); this is most commonly caused by errors that lead to the corruption of program instructions or variables in memory.

Typically, the first step in locating a bug is finding a way to reproduce it easily. Once the bug is reproduced, the programmer can use a debugger or some other tool to monitor the execution of the program in the faulty region, and find the point at which the program went astray. Sometimes, a bug is not a single flawed instruction, but represents an error of thinking or planning on the part of the programmer. Such logic errors require a section of the program to be overhauled or rewritten.

It is not always easy to reproduce bugs. Some bugs are triggered by inputs to the program which may be difficult for the programmer to re-create. One cause of the Therac-25 radiation machine deaths was a bug that occurred only when the machine operator very rapidly entered a treatment plan; it took days of practice to become able to do this, so the bug did not manifest in testing or when the manufacturer attempted to duplicate it. Other bugs may disappear when the program is run with a debugger; these are heisenbugs (humorously named after the Heisenberg uncertainty principle.)

Debugging is still a tedious task requiring considerable manpower. Since the 1990s, particularly following the Ariane 5 Flight 501 disaster, there has been a renewed interest in the development of effective automated aids to debugging. For instance, methods of static code analysis by abstract interpretation have already made significant achievements, while still remaining much of a work in progress.

Managing bugs

It is common practice for software to be released with known bugs that are considered non-critical. While software products contain an unknown number of unknown bugs when shipped, measurements during the testing may provide a statistically reliable estimate of the number of likely bugs remaining. Most big software projects maintain a list of "known bugs". This list inform users about bugs that are not fixed in the current release, or not fixed at all, and often a workaround is offered additionally.

There are various reasons for such a list:
  • The developers often don't have time to fix all non-severe bugs.
  • The bug could be fixed in a new version or patch that is not yet released.
  • The changes to the code required to fix the bug would be large, and would bring with them the chance of introducing other bugs into the system.
Given the above, it is often considered impossible to write completely bug-free software of any real complexity. So bugs are categorized by severity, and low-severity non-critical bugs are tolerated, as they do not impact the proper operation of the system, for the majority of users. NASA's SATC managed to reduce number of errors to fewer than 0.1 per 1000 lines of code (SLOC) but this was not felt to be feasible for any real world projects.

One school of thought, popularized by Eric S. Raymond as Linus's Law in his essay The Cathedral and the Bazaar, holds that popular open-source software holds a better chance of having few or no bugs than other software, because "given enough eyeballs, all bugs are shallow".[8] This assertion has been disputed, however: computer security specialist Elias Levy wrote that "it is easy to hide vulnerabilities in complex, little understood and undocumented source code," because, "even if people are reviewing the code, that doesn't mean they're qualified to do so."[9]

Famous computer bugs

Space exploration

Medical

  • The Therac-25 accidents (1985-1987), which caused at least five deaths.

Computing

  • The year 2000 problem, popularly known as the "Y2K bug", spawned fears of worldwide economic collapse and an industry of consultants providing last-minute fixes.
  • The Pentium FDIV bug.

Electric power transmission

Telecommunications

Military

Video games

  • The Missingno. and Glitch City bugs, found in the Pokémon series
  • The Minus World in NES version of Super Mario Brothers

Security vulnerabilities

Malicious software may attempt to exploit known vulnerabilities in a system - which may or may not be bugs. Viruses are not bugs in themselves - they are typically programs that are doing precisely what they were designed to do. However, viruses are occasionally referred to as such in the popular press.

Common types of computer bugs

Bugs in popular culture

  • In the 1968 novel (and the ), a spaceship's onboard computer, HAL 9000, is programmed with two conflicting objectives: to fully disclose all its information, and to keep the true purpose of the flight secret from the crew. This conflict causes HAL to eventually try to kill all the crew members (since, if there were no crew, there would be no contradiction).
  • In the 1984 song 99 Red Balloons (though not in the original German version), "bugs in the software" lead to a computer mistaking a group of balloons for a nuclear missile and starting a nuclear war.
  • The 2004 novel The Bug, by Ellen Ullman, is about a programmer's attempt to find an elusive bug in a database application.

See also

Notes

1. ^ The Chinook Helicopter Disaster
2. ^ Edison to Puskas, 13 November 1878, Edison papers, Edison National Laboratory, U.S. National Park Service, West Orange, N.J., cited in Thomas P. Hughes, American Genesis: A History of the American Genius for Invention,'' Penguin Books, 1989, ISBN 0-14-009741-4, on page 75.
3. ^ Danis, Sharron Ann: "Rear Admiral Grace Murray Hopper"[1]
4. ^ Definition of bug
5. ^ Log Book With Computer Bug
6. ^ IEEE Annals of the History of Computing, Vol 22 Issue 1, 2000
7. ^ First Computer Bug
8. ^ "Release Early, Release Often", Eric S. Raymond, The Cathedral and the Bazaar
9. ^ "Wide Open Source", Elias Levy, SecurityFocus, April 17, 2000

External links

In document ISO/CD 10303-226, a fault is defined as an abnormal condition or defect at the component, equipment, or sub-system level which may lead to a failure.

According to the Federal Standard 1037C of the United States, the term fault
..... Click the link for more information.
A computer program is one or more instructions that are intended for execution by a computer. Specifically, it is a symbol or combination of symbols forming an algorithm that may or may not terminate, and that algorithm is written in a programming language.
..... Click the link for more information.
source code (commonly just source or code) is any sequence of statements and/or declarations written in some human-readable computer programming language.
..... Click the link for more information.
Software development process
Activities and steps
Requirements | Architecture | Implementation | Testing | Deployment
Models
Agile | Cleanroom | Iterative | RAD | RUP | Spiral | Waterfall | XP
Supporting disciplines
..... Click the link for more information.
compiler is a computer program (or set of programs) that translates text written in a computer language (the source language) into another computer language (the target language).
..... Click the link for more information.
crash in computing is a condition where a program (either an application or part of the operating system) stops performing its expected function and also stops responding to other parts of the system. Often the offending program may simply appear to freeze.
..... Click the link for more information.

..... Click the link for more information.
A denial-of-service attack (DoS attack) is an attempt to make a computer resource unavailable to its intended users.
..... Click the link for more information.
A security bug is a software bug that benefits someone other than intended beneficiaries in the intended ways.

Security bugs introduce security vulnerabilities by compromising one or more of:
  • Authentication of users and other entities

..... Click the link for more information.
A black hat is a person who compromises the security of a computer system without permission from an authorized party, typically with malicious intent. The term white hat is used for a person who is ethically opposed to the abuse of computer systems, but is frequently no less
..... Click the link for more information.
access control refers to the practice of restricting entrance to a property, a building, or a room to authorized persons. Physical access control can be achieved by a human (a guard, bouncer, or receptionist), through mechanical means such as locks and keys, or through
..... Click the link for more information.
Therac-25 was a radiation therapy machine produced by Atomic Energy of Canada Limited (AECL) and CGR MeV of France after the Therac-6 and Therac-20 units. It was involved with at least six known accidents between 1985 and 1987, in which patients were given massive overdoses of
..... Click the link for more information.
Radiation therapy (or radiotherapy) is the medical use of ionizing radiation as part of cancer treatment to control malignant cells (not to be confused with radiology, the use of radiation in medical imaging and diagnosis).
..... Click the link for more information.
European Space Agency (ESA), established in 1974, is an inter-governmental organisation dedicated to the exploration of space, currently with 17 member states. Its headquarters are in Paris.
..... Click the link for more information.
Ariane 5

Ariane 5 mock-up
Fact sheet
Function Heavy launch vehicle
Manufacturer EADS Astrium for
ESA and Arianespace
Country of origin Europe
Size
Height 59 m (193 ft)
Diameter 5.4 m (17.
..... Click the link for more information.
ComputerWeekly is a weekly magazine for IT professionals which has been published by Reed Business Information for over 40 years. The magazine is available free to IT professionals who meet the circulation requirements.
..... Click the link for more information.
The Right Honourable the Lords Spiritual and Temporal of the United Kingdom of Great Britain and Northern Ireland in Parliament assembled

Type Upper House

Lord Speaker
Hélène Hayman, Baroness Hayman, PC, (Non-affiliated)
since July 4, 2006
..... Click the link for more information.
FADEC is the acronym for Full Authority Digital Engine Control (sometimes incorrectly interpreted as Full Authority Digital Electronics Control). It is a system consisting of a digital computer (called EEC /Electronic Engine Control/ or ECU /Electronic Control Unit/) and its
..... Click the link for more information.
Augusta Ada King, Countess of Lovelace (born Ada Byron) is renowned for her description and associated notes on Charles Babbage's design for a mechanical computer called The Analytical Engine.
..... Click the link for more information.
Charles Babbage FRS (26 December 1791 – 18 October 1871) was an English mathematician, philosopher, and mechanical engineer who originated the idea of a programmable computer. Parts of his uncompleted mechanisms are on display in the London Science Museum.
..... Click the link for more information.
The analytical engine, an important step in the history of computers, was the design of a mechanical general-purpose computer by the British professor of mathematics Charles Babbage. It was first described in 1837, but Babbage continued to work on the design until his death in 1871.
..... Click the link for more information.
Thomas Alva Edison (February 11 1847 – October 18 1931) was an American inventor and businessman who developed many devices that greatly influenced life around the world, including the phonograph and a long lasting light bulb.
..... Click the link for more information.
18th century - 19th century - 20th century
1840s  1850s  1860s  - 1870s -  1880s  1890s  1900s
1875 1876 1877 - 1878 - 1879 1880 1881

:
Subjects:     Archaeology - Architecture -
..... Click the link for more information.
Grace Murray Hopper (December 9 1906 – January 1 1992) was an American computer scientist and United States Navy officer. A pioneer in the field, she was one of the first programmers of the Harvard Mark I calculator, and she developed the first compiler for a computer
..... Click the link for more information.
September 9 is the 1st day of the year (2nd in leap years) in the Gregorian calendar. There are 0 days remaining.

Events

  • 1000 - Battle of Svolder, Notable naval battle of the Viking Age.

..... Click the link for more information.
19th century - 20th century - 21st century
1910s  1920s  1930s  - 1940s -  1950s  1960s  1970s
1940 1941 1942 - 1943 - 1944 1945 1946

Year 1945 (MCMXLV
..... Click the link for more information.
September 9 is the 1st day of the year (2nd in leap years) in the Gregorian calendar. There are 0 days remaining.

Events

  • 1000 - Battle of Svolder, Notable naval battle of the Viking Age.

..... Click the link for more information.
19th century - 20th century - 21st century
1910s  1920s  1930s  - 1940s -  1950s  1960s  1970s
1944 1945 1946 - 1947 - 1948 1949 1950

Year 1947 (MCMXLVII
..... Click the link for more information.
The Harvard Mark II was an electromechanical computer built at Harvard University under the direction of Howard Aiken and was finished in 1947. It was financed by the United States Navy.
..... Click the link for more information.
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected.
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter