HOME

TheInfoList



OR:

On the
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was introd ...
computer architecture In computer engineering, computer architecture is a description of the structure of a computer system made from component parts. It can sometimes be a high-level description that ignores details of the implementation. At a more detailed level, t ...
, a triple fault is a special kind of exception generated by the CPU when an exception occurs while the CPU is trying to invoke the
double fault On the x86 architecture, a double fault exception occurs if the processor encounters a problem while trying to service a pending interrupt or exception. An example situation when a double fault would occur is when an interrupt is triggered but t ...
exception handler, which itself handles exceptions occurring while trying to invoke a regular exception handler.
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was introd ...
processors beginning with the
80286 The Intel 80286 (also marketed as the iAPX 286 and often called Intel 286) is a 16-bit microprocessor that was introduced on February 1, 1982. It was the first 8086-based CPU with separate, non-multiplexed address and data buses and also the fi ...
will cause a shutdown cycle to occur when a triple fault is encountered. This typically causes the
motherboard A motherboard (also called mainboard, main circuit board, mb, mboard, backplane board, base board, system board, logic board (only in Apple computers) or mobo) is the main printed circuit board (PCB) in general-purpose computers and other expand ...
hardware to initiate a CPU reset, which, in turn, causes the whole computer to reboot.


Possible causes of triple faults

Triple faults indicate a problem with the
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 in ...
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learnin ...
or
device driver In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and ot ...
s. In modern operating systems, a triple fault is typically caused by a buffer overflow or underflow in a device driver which writes over the
interrupt descriptor table The interrupt descriptor table (IDT) is a data structure used by the x86 architecture to implement an interrupt vector table. The IDT is used by the processor to determine the correct response to interrupts and exceptions. The details in the desc ...
(IDT). If the IDT is corrupted, when the next
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted, ...
happens, the processor will be unable to call either the needed interrupt handler or the double fault handler because the descriptors in the IDT are corrupted.


Virtual machines

In
QEMU QEMU is a free and open-source emulator (Quick EMUlator). It emulates the machine's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest ...
, a triple fault produces a dump of the virtual machine in the console, with the instruction pointer set to the instruction that triggered the first exception. When using
Intel VT-x x86 virtualization is the use of hardware-assisted virtualization capabilities on an x86/x86-64 CPU. In the late 1990s x86 virtualization was achieved by complex software techniques, necessary to compensate for the processor's lack of hardware-as ...
, a triple fault causes a VM exit, with exit reason 2. The exit reason is saved to the VMCS and may be handled by the VMM software.


Other uses

The
Intel 80286 The Intel 80286 (also marketed as the iAPX 286 and often called Intel 286) is a 16-bit microprocessor that was introduced on February 1, 1982. It was the first 8086-based CPU with separate, non-multiplexed address and data buses and also the fi ...
processor was the first x86 processor to introduce the now-ubiquitous
protected mode In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units (CPUs). It allows system software to use features such as virtual memory, paging and safe multi-tasking d ...
. However, the 286 could not revert to the basic 8086-compatible "
real mode Real mode, also called real address mode, is an operating mode of all x86-compatible CPUs. The mode gets its name from the fact that addresses in real mode always correspond to real locations in memory. Real mode is characterized by a 20-bit seg ...
" without resetting the processor, which can only be done using hardware external to the CPU. On the
IBM AT The IBM Personal Computer/AT (model 5170, abbreviated as IBM AT or PC/AT) was released in 1984 as the fourth model in the IBM Personal Computer line, following the IBM PC/XT and its IBM Portable PC variant. It was designed around the Intel 8028 ...
and compatibles, the documented method of doing this was to use a special function on the
Intel 8042 The MCS-48 microcontroller series, Intel's first microcontroller, was originally released in 1976. Its first members were 8048, 8035 and 8748. The 8048 is probably the most prominent member of the family. Initially, this family was produced u ...
keyboard controller, which would assert the RESET pin of the processor. However, intentionally triple-faulting the CPU was found to cause the transition to occur much faster and more cleanly, permitting multitasking operating systems to switch back and forth at high speed. Some operating system kernels, 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, which ...
, still use triple faults as a last effort in their rebooting process if an
ACPI Advanced Configuration and Power Interface (ACPI) is an open standard that operating systems can use to discover and configure computer hardware components, to perform power management (e.g. putting unused hardware components to sleep), auto c ...
reboot fails. This is done by setting the IDT register to 0 and then issuing an interrupt. Since the table now has length 0, all attempts to access it fail and the processor generates a triple fault.


References

{{Reflist, refs= {{cite web , author-first=Robert , author-last=Collins , title=Triple Faulting the CPU , date=2000 , work=Productivity Enhancements and Programming Tricks , url=http://www.rcollins.org/Productivity/TripleFault.html , access-date=2015-11-22 , url-status=live , archive-url=https://web.archive.org/web/20170909120639/http://www.rcollins.org/Productivity/TripleFault.html , archive-date=2017-09-09 {{cite web , title=ELEGANT RESET , author-first=Robert , author-last=Collins , date=2000 , url=http://www.rcollins.org/ftp/source/3fault/reset.asm , access-date=2017-09-09 , url-status=live , archive-url=https://web.archive.org/web/20170909113216/http://www.rcollins.org/ftp/source/3fault/reset.asm , archive-date=2017-09-09 {{cite web , title=Faster Syscall Trap redux , author-first=Larry , author-last=Osterman , date=2005-02-08 , work=Larry Osterman's WebLog , publisher=
MSDN Blogs Microsoft Developer Network (MSDN) was the division of Microsoft responsible for managing the firm's relationship with developers and testers, such as hardware developers interested in the operating system (OS), and software developers developing ...
, url=https://blogs.msdn.microsoft.com/larryosterman/2005/02/08/faster-syscall-trap-redux/ , access-date=2010-07-23 , url-status=live , archive-url=https://web.archive.org/web/20170909113828/https://blogs.msdn.microsoft.com/larryosterman/2005/02/08/faster-syscall-trap-redux/ , archive-date=2017-09-09
Computer errors