![Crashed computer](https://upload.wikimedia.org/wikipedia/commons/6/68/Crashed_computer.jpg)
In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, a crash, or system crash, occurs when a computer program such as a
software application
Software is a set of computer programs and associated documentation and data. This is in contrast to hardware, from which the system is built and which actually performs the work.
At the lowest programming level, executable code consists ...
or an
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
stops functioning properly and
exits. On some operating systems or individual applications, a
crash reporting service will report the crash and any details relating to it (or give the user the option to do so), usually to the
developer(s) of the application. If the program is a critical part of the operating system, the entire system may crash or hang, often resulting in a
kernel panic or
fatal system error
A fatal system error (also known as a system crash, stop error, kernel error, or bug check) occurs when an operating system halts because it has reached a condition where it can no longer operate safely (''i.e.'' where critical data could be l ...
.
Most crashes are the result of a
software bug. Typical causes include
accessing invalid memory addresses, incorrect
address
An address is a collection of information, presented in a mostly fixed format, used to give the location of a building, apartment, or other structure or a plot of land, generally using political boundaries and street names as references, along ...
values in the
program counter,
buffer overflow
In information security and programming, a buffer overflow, or buffer overrun, is an anomaly whereby a program, while writing data to a buffer, overruns the buffer's boundary and overwrites adjacent memory locations.
Buffers are areas of memo ...
, overwriting a portion of the affected program code due to an earlier bug, executing invalid
machine instructions
In computer programming, machine code is any low-level programming language, consisting of machine language instruction set architecture, instructions, which are used to control a computer's central processing unit (CPU). Each instruction cau ...
(an
illegal opcode
An illegal opcode, also called an unimplemented operation, unintended opcode or undocumented instruction, is an instruction to a CPU that is not mentioned in any official documentation released by the CPU's designer or manufacturer, which nev ...
), or triggering an unhandled
exception. The original software bug that started this chain of events is typically considered to be the cause of the crash, which is discovered through the process of
debugging. The original bug can be far removed from the
code that actually triggered the crash.
In early personal computers, attempting to write data to hardware addresses outside the system's main memory could cause hardware damage. Some crashes are
exploitable and let a malicious program or
hacker
A hacker is a person skilled in information technology who uses their technical knowledge to achieve a goal or overcome an obstacle, within a computerized system by non-standard means. Though the term ''hacker'' has become associated in popu ...
execute
arbitrary code
In computer security, arbitrary code execution (ACE) is an attacker's ability to run any commands or code of the attacker's choice on a target machine or in a target process. An arbitrary code execution vulnerability is a security flaw in softwa ...
allowing the replication of
viruses
A virus is a submicroscopic infectious agent that replicates only inside the living cells of an organism. Viruses infect all life forms, from animals and plants to microorganisms, including bacteria and archaea.
Since Dmitri Ivanovsky's ...
or the acquisition of data which would normally be inaccessible.
Application crashes
An
application typically crashes when it performs an operation that is not allowed by the operating system. The operating system then triggers an
exception or
signal
In signal processing, a signal is a function that conveys information about a phenomenon. Any quantity that can vary over space or time can be used as a signal to share messages between observers. The '' IEEE Transactions on Signal Processing' ...
in the application. Unix applications traditionally responded to the signal by
dumping core. Most Windows and Unix
GUI
The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
applications respond by displaying a dialogue box (such as the one shown to the right) with the option to attach a
debugger
A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its executi ...
if one is installed. Some applications attempt to recover from the error and continue running instead of
exiting.
An application can also contain code to crash after detecting a severe error.
Typical errors that result in application crashes include:
*attempting to read or write memory that is not allocated for reading or writing by that application (e.g.,
segmentation fault
In computing, a segmentation fault (often shortened to segfault) or access violation is a fault, or failure condition, raised by hardware with memory protection, notifying an operating system (OS) the software has attempted to access a restrict ...
, x86-specific
general protection fault
A general protection fault (GPF) in the x86 instruction set architectures (ISAs) is a fault (a type of interrupt) initiated by ISA-defined protection mechanisms in response to an access violation caused by some running code, either in the kernel ...
)
*attempting to execute privileged or invalid instructions
*attempting to perform I/O operations on
hardware devices to which it does not have permission to access
*passing invalid arguments to system calls
*attempting to access other system resources to which the application does not have permission to access
*attempting to execute machine instructions with bad arguments (depending on CPU architecture):
divide by zero, operations on
denormal number
In computer science, subnormal numbers are the subset of denormalized numbers (sometimes called denormals) that fill the underflow gap around zero in floating-point arithmetic. Any non-zero number with magnitude smaller than the smallest normal ...
or
NaN
Nan or NAN may refer to:
Places China
* Nan County, Yiyang, Hunan, China
* Nan Commandery, historical commandery in Hubei, China
Thailand
* Nan Province
** Nan, Thailand, the administrative capital of Nan Province
* Nan River
People Given name
...
(not a number) values, memory access to
unaligned addresses, etc.
Crash to desktop
A "crash to desktop" is said to occur when a
program
Program, programme, programmer, or programming may refer to:
Business and management
* Program management, the process of managing several related projects
* Time management
* Program, a part of planning
Arts and entertainment Audio
* Progra ...
(commonly a
video game
Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This fee ...
) unexpectedly quits, abruptly taking the user back to the
desktop
A desktop traditionally refers to:
* The surface of a desk (often to distinguish office appliances that fit on a desk, such as photocopiers and printers, from larger equipment covering its own area on the floor)
Desktop may refer to various compu ...
. Usually, the term is applied only to crashes where no error is displayed, hence all the user sees as a result of the crash is the desktop. Many times there is no apparent action that causes a crash to desktop. During normal function, the program may
freeze for a shorter period of time, and then close by itself. Also during normal function, the program may become a
black screen and repeatedly play the last few seconds of
sound
In physics, sound is a vibration that propagates as an acoustic wave, through a transmission medium such as a gas, liquid or solid.
In human physiology and psychology, sound is the ''reception'' of such waves and their ''perception'' b ...
(depending on the size of the audio
buffer
Buffer may refer to:
Science
* Buffer gas, an inert or nonflammable gas
* Buffer solution, a solution used to prevent changes in pH
* Buffering agent, the weak acid or base in a buffer solution
* Lysis buffer, in cell biology
* Metal ion buffer
* ...
) that was being played before it crashes to desktop. Other times it may appear to be
trigger
Trigger may refer to:
Notable animals and people
;Mononym
* Trigger (horse), owned by cowboy star Roy Rogers
;Nickname
* Trigger Alpert (1916–2013), American jazz bassist
* "Trigger Mike" Coppola (1900–1966), American gangster
;Surname
* Bru ...
ed by a certain action, such as loading an area.
Crash to desktop bugs are considered particularly problematic for users. Since they frequently display no error message, it can be very difficult to track down the source of the problem, especially if the times they occur and the actions taking place right before the crash do not appear to have any pattern or common ground. One way to track down the source of the problem for games is to run them in windowed-mode.
Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
has a feature that can help track down the cause of a CTD problem when it occurs on any program. Windows XP included a similar feature as well.
Some computer programs, such as ''
StepMania'' and BBC's ''
Bamzooki'', also crash to desktop if in full-screen, but display the error in a separate window when the user has returned to the desktop.
Web server crashes
The software running the
web server behind a website may crash, rendering it inaccessible entirely or providing only an error message instead of normal content.
For example: if a site is using an SQL database (such as
MySQL
MySQL () is an open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A relational database ...
) for a script (such as
PHP
PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group. ...
) and that SQL database server crashes, then
PHP
PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group. ...
will display a connection error.
Operating system crashes
![OS X Mountain Lion kernel panic](https://upload.wikimedia.org/wikipedia/commons/8/8f/OS_X_Mountain_Lion_kernel_panic.jpg)
An operating system crash commonly occurs when a
hardware exception
In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
occurs that cannot be
handled. Operating system crashes can also occur when internal
sanity-checking logic within the operating system detects that the operating system has lost its internal self-consistency.
Modern multi-tasking operating systems, such as
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
, and
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
, usually remain unharmed when an application program crashes.
Some operating systems, e.g.,
z/OS
z/OS is a 64-bit operating system for IBM z/Architecture mainframes, introduced by IBM in October 2000. It derives from and is the successor to OS/390, which in turn was preceded by a string of MVS versions.Starting with the earliest:
* ...
, have facilities for
Reliability, availability and serviceability
Reliability, availability and serviceability (RAS), also known as reliability, availability, and maintainability (RAM), is a computer hardware engineering term involving reliability engineering, high availability, and serviceability design. The ...
(RAS) and the OS can recover from the crash of a critical component, whether due to hardware failure, e.g., uncorrectable ECC error, or to software failure, e.g., a reference to an unassigned page.
Security and privacy implications of crashes
Depending on the application, the crash may contain the user's sensitive and private information. Moreover, many software bugs which cause crashes are also
exploitable for
arbitrary code execution
In computer security, arbitrary code execution (ACE) is an attacker's ability to run any commands or code of the attacker's choice on a target machine or in a target process. An arbitrary code execution vulnerability is a security flaw in softw ...
and other types of
privilege escalation
Privilege escalation is the act of exploiting a bug, a design flaw, or a configuration oversight in an operating system or software application to gain elevated access to resources that are normally protected from an application or user. The re ...
.
For example, a
stack buffer overflow
In software, a stack buffer overflow or stack buffer overrun occurs when a program writes to a memory address on the program's call stack outside of the intended data structure, which is usually a fixed-length buffer.
Stack buffer overflow bugs ...
can overwrite the return address of a subroutine with an invalid value, which will cause, e.g., a
segmentation fault
In computing, a segmentation fault (often shortened to segfault) or access violation is a fault, or failure condition, raised by hardware with memory protection, notifying an operating system (OS) the software has attempted to access a restrict ...
, when the subroutine returns. However, if an exploit overwrites the return address with a valid value, the code in that address will be executed.
Crash reproduction
When crashes are collected in the field using a
crash reporter
A crash reporter is usually a system software whose function is to identify reporting crash details and to alert when there are crashes, in production or on development / testing environments. Crash reports often include data such as stack traces ...
, the next step for developers is to be able to reproduce them locally. For this, several techniques exist:
STAR uses symbolic execution,
MuCrash mutates the test code of the application that has crashed,
and EvoCrash performs evolutionary search.
See also
*
Blue Screen of Death
*
Crash-only software
Crash-only software refers to computer programs that handle failures by simply restarting, without attempting any sophisticated recovery. Correctly written components of crash-only software can microreboot to a known-good state without the help ...
*
Data loss Data loss is an error condition in information systems in which information is destroyed by failures (like failed spindle motors or head crashes on hard drives) or neglect (like mishandling, careless handling or storage under unsuitable conditions) ...
*
Guru Meditation
Guru Meditation started as an error notice displayed by the Amiga computer when it crashes. It is now also used by Varnish, a software component used by many content-heavy websites. This has led to many internet users seeing a "Guru Meditation ...
*
Memory corruption
*
Reboot
In computing, rebooting is the process by which a running computer system is restarted, either intentionally or unintentionally. Reboots can be either a cold reboot (alternatively known as a hard reboot) in which the power to the system is physi ...
*
Safe mode
*
SystemRescueCD
SystemRescue (Previously known as "SystemRescueCD") is a Linux distribution for x86 64 and x86 computers. The primary purpose of SystemRescue is to repair unbootable or otherwise damaged computer systems after a system crash. SystemRescue is ...
*
Undefined behavior
In computer programming, undefined behavior (UB) is the result of executing a program whose behavior is prescribed to be unpredictable, in the language specification to which the computer code adheres. This is different from unspecified behavior ...
Notes
References
External links
Picking Up The Pieces After A Computer Crash
{{DEFAULTSORT:Crash (Computing)
Computer jargon
Computer errors
Software anomalies