Crash (computing)
|
|
This article has multiple issues. Please help improve it or discuss these issues on the talk page.
|
A crash (or system crash) in computing is an event in which a computer or a program (such as a software application or an operating system) ceases to function properly, often exiting after encountering errors. Sometimes the offending program may appear to freeze or hang until a crash reporting service documents details of the crash. If the program is a critical part of the operating system kernel, the entire computer may crash (possibly resulting in a fatal system error).
Many crashes are the result of the execution of a single or multiple machine instructions. Typical causes are when the program counter is set to an incorrect address or a buffer overflow overwrites a portion of program code due to an earlier bug. In either case, it is quite common for the CPU to attempt to execute data or random memory values. Since all data values are possible but only some values are valid instructions, this often results in an illegal instruction exception. By chance, such data or random values could be valid (though unplanned) instructions. One might say that the original bug that upset the program counter "caused" the crash, but the actual fault was an illegal instruction some time later. The art of debugging such crashes is connecting the actual cause of the crash with the code that set off the chain of events. This is often very far from obvious—the original bug is usually perfectly valid code to the processor.
In earlier personal computers, it was actually possible to cause hardware damage through attempting to write to hardware addresses outside of the system's main memory. Occasionally, execution of arbitrary data on a system will result in a breakup of screen display. This is widely considered a severe system crash.
Contents |
Etymology[edit]
The term "crash" may originate from the phrase "head crash", which occurs when the read/write heads inside a hard disk physically come into contact with—"crash" into—the platter, which is the magnetic data storage surface of a hard disk. A head crash is catastrophic to the drive operation, roughly analogous to the severity of a computer crash to computer software.
Application crashes[edit]
An application typically crashes when it performs an operation which is not allowed by the operating system. The operating system then triggers an exception or signal in the application. Unix applications traditionally responded to the signal by dumping core. Most Windows and Unix GUI applications respond by displaying a dialogue box (such as the one shown to the right) with the option to attach a debugger if one is installed. This behavior is called "crashing". Some applications attempt to recover from the error and continue execution instead of crashing.
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 (segmentation fault) or x86 specific (general protection fault)
- 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 (bus error)
- attempting to execute machine instructions with bad arguments (depending on CPU architecture): divide by zero, operations on denorms or NaN values, memory access to unaligned addresses, etc.
Web-server crashes[edit]
The software running the 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 was using a SQL database (such as MySQL) for a script (such as PHP) and that SQL server crashed, then PHP would display a connection error.
Operating system crashes[edit]
An operating system crash commonly occurs when a hardware exception 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 Windows NT, Linux, or Mac OS X usually remain unharmed when an application program crashes.
See also[edit]
- Blue Screen of Death
- Crash reporter
- Crash to Desktop
- Data loss
- Debugging
- Guru Meditation
- Kernel panic
- Reboot
- Safe Mode
- Segmentation fault
- Snow Crash
- SystemRescueCD
External links[edit]
| Wikimedia Commons has media related to: Computer errors |