Jump to content

Heisenbug: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
rv "Hindenbugs"; looks like a hoax
m Spelling
Line 23: Line 23:
A '''Schroedinbug''' is a bug that manifests itself apparently only after the software is used in an unusual way or seemingly at the point in time that a programmer reading the [[source code]] notices that the program should never have worked in the first place, at which point the program stops working entirely until the mysteriously now non-functioning code is repaired. [[FOLDOC]], in a statement of apparent jest, adds: "Though... this sounds impossible, it happens; some programs have harboured latent schroedinbugs for years."
A '''Schroedinbug''' is a bug that manifests itself apparently only after the software is used in an unusual way or seemingly at the point in time that a programmer reading the [[source code]] notices that the program should never have worked in the first place, at which point the program stops working entirely until the mysteriously now non-functioning code is repaired. [[FOLDOC]], in a statement of apparent jest, adds: "Though... this sounds impossible, it happens; some programs have harboured latent schroedinbugs for years."


The name ''schroedinbug'' is derived from the [[Schrödinger's cat]] thought experiment. A well written program executing in a reliable computing environment is expected to follow the principle of [[determinism]], and as such the quantum questions of observability (i.e. breaking the program by reading the source code) posited by Schrödinger (i.e. killing the cat by opening the box) cannot actually affect the operation of a program. However, quickly repairing an obviously defective piece of code is often more important than attempting to determine by what arcane set of circumstances it accidently worked in the first place or exactly why it stopped. By declaring that the code could never have worked in the first place despite evidence to the contrary, the complexity of the computing system is causing the programmer to fall back on [[superstition]].
The name ''schroedinbug'' is derived from the [[Schrödinger's cat]] thought experiment. A well written program executing in a reliable computing environment is expected to follow the principle of [[determinism]], and as such the quantum questions of observability (i.e. breaking the program by reading the source code) posited by Schrödinger (i.e. killing the cat by opening the box) cannot actually affect the operation of a program. However, quickly repairing an obviously defective piece of code is often more important than attempting to determine by what arcane set of circumstances it accidentally worked in the first place or exactly why it stopped. By declaring that the code could never have worked in the first place despite evidence to the contrary, the complexity of the computing system is causing the programmer to fall back on [[superstition]].


For example, a [[database]] program may have initially worked on a small number of [[Database record|records]], including test data used during development, but broke once the amount of data reached a certain limit, without this cause being at all intuitive. A programmer without knowing the cause, and who didn't bother to consider the normal uptick in the database size as a factor in the breakage, could label the defect a schroedinbug.
For example, a [[database]] program may have initially worked on a small number of [[Database record|records]], including test data used during development, but broke once the amount of data reached a certain limit, without this cause being at all intuitive. A programmer without knowing the cause, and who didn't bother to consider the normal uptick in the database size as a factor in the breakage, could label the defect a schroedinbug.

Revision as of 00:49, 5 February 2006

Unusual software bugs are more difficult to understand and repair than ordinary software bugs. There are several kinds, mostly named after scientists who discovered counterintuitive things.

Heisenbugs

A heisenbug is a computer bug that disappears or alters its characteristics when it is researched.

Common examples are bugs that occur in a release-mode compile of a program but do not occur when researched under debug-mode, or some bugs caused by a race condition. The name is a pun on the physics term "Heisenberg Uncertainty principle", which is popularly believed to refer to the way observers affect the observed in quantum mechanics.

In an interview in ACM Queue vol. 2, no. 8 - November 2004 Bruce Lindsay tells of being there when the term was first used and that it was created because Heisenberg said "the more closely you look at one thing, the less closely can you see something else."

A Bohr bug (named after the Bohr atom model) is a bug that, in contrast with heisenbugs, does not disappear or alter its characteristics when it is researched.

Mandelbugs

A mandelbug (named after fractal innovator Benoît Mandelbrot) is a computer bug whose causes are so complex that its behavior appears chaotic. This word also implies that the speaker thinks it is a Bohr bug rather than a heisenbug.

It can be argued, according to same principle as the Turing test, that if there is no way for a judge to differentiate between a bug whose behavior appears chaotic and a bug whose behavior actually is chaotic, then there is no relevance in the distinction between mandelbug and heisenbug, since there is no way to tell them apart.

Some use mandelbug to describe a bug whose behavior does not appear chaotic, but whose causes are so complex that there is no practical solution. An example of this is a bug caused by a flaw in the fundamental design of the entire system.

Schroedinbugs

A Schroedinbug is a bug that manifests itself apparently only after the software is used in an unusual way or seemingly at the point in time that a programmer reading the source code notices that the program should never have worked in the first place, at which point the program stops working entirely until the mysteriously now non-functioning code is repaired. FOLDOC, in a statement of apparent jest, adds: "Though... this sounds impossible, it happens; some programs have harboured latent schroedinbugs for years."

The name schroedinbug is derived from the Schrödinger's cat thought experiment. A well written program executing in a reliable computing environment is expected to follow the principle of determinism, and as such the quantum questions of observability (i.e. breaking the program by reading the source code) posited by Schrödinger (i.e. killing the cat by opening the box) cannot actually affect the operation of a program. However, quickly repairing an obviously defective piece of code is often more important than attempting to determine by what arcane set of circumstances it accidentally worked in the first place or exactly why it stopped. By declaring that the code could never have worked in the first place despite evidence to the contrary, the complexity of the computing system is causing the programmer to fall back on superstition.

For example, a database program may have initially worked on a small number of records, including test data used during development, but broke once the amount of data reached a certain limit, without this cause being at all intuitive. A programmer without knowing the cause, and who didn't bother to consider the normal uptick in the database size as a factor in the breakage, could label the defect a schroedinbug.

Appearance in Fiction

In the independent movie 'Schrödinger's Cat' (January 2006 - Mahoutsukai), a Schroedinbug is found in the programming of American defense systems, causing a catastrophic security failure.

References

  • This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.