Difference between Fault, Error and Failure

fault - a cause of the error (mistake in coding)
error - incorrect state that may lead to failure
failure - deviation of the service from the correct service
Fault : An incorrect step, process, or data definition in a computer program which causes the program to
perform in an unintended or unanticipated manner. It is an inherent weakness of the design or implementation
which might result in a failure. A fault might be present and latent in the systems like they were in Patriot
Missile failure and Therac-25 accidents. These faults lead to a failure when the exact scenario is met.
Fault avoidance – using techniques and procedures which aim to avoid the introduction of faults during
any phase of the safety lifecycle of the safety-related system
Fault tolerance – the ability of a functional unit to continue to perform a required function in the
presence of faults or errors
Error : A discrepancy between a computed, observed, or measured value or condition and the true, specified, or
theoretically correct value or condition.
Failure: The inability of a system or component to perform its required functions within specified performance
requirements
WIKI source
Fault: A fault (which is usually referred to as a bug for historic reasons) is a defect in a system. The presence of
a fault in a system may or may not lead to a failure. For instance, although a system may contain a fault, its
input and state conditions may never cause this fault to be executed so that an error occurs; and thus that
particular fault never exhibits as a failure.
Error: An error is a discrepancy between the intended behaviour of a system and its actual behaviour inside the
system boundary. Errors occur at runtime when some part of the system enters an unexpected state due to the
activation of a fault. Since errors are generated from invalid states they are hard to observe without special
mechanisms, such as debuggers or debug output to logs.
Failure: A failure is an instance in time when a system displays behaviour that is contrary to its specification.
An error may not necessarily cause a failure, for instance an exception may be thrown by a system but this may
be caught and handled using fault tolerance techniques so the overall operation of the system will conform to the
specification.
FINLAND source
Fault
• Fault is a defect within the system
• Examples:
–Software bug, –Random hardware fault , –Memory bit “stuck”, –Omission or commission fault in data transfer
, –Etc.
Error
• Error is a deviation from the required operation of system or subsystem
• A fault may lead to an error, i.e., error is a mechanism by which the fault becomes apparent
• Fault may stay dormant for a long time before it manifests itself as an error:
• Example:
–memory bit got stuck but CPU does not access this data, –Software “bug” in a subroutine is not “visible” while
the subroutine is not called
Failure
• A system failure occurs when the system fails to perform its required function
• Presence of an error might cause a whole system to deviate from its required operation
• One of the goals of safety-critical systems is that error should not result in system failure