1 .\" $NetBSD: panic.9,v 1.18 2009/01/12 16:28:03 christos Exp $
3 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd Bring down system on fatal error
40 .Fn panic "const char *fmt" "..."
44 function terminates the
51 style format string which is printed to the console and saved in the
54 for later retrieval via core dump inspection.
55 A newline character is added at the end automatically, and is thus
56 not needed in the format string.
58 If a kernel debugger is installed, control is passed to it after the
60 If the kernel debugger is
62 control may be passed to it, depending on the value of
66 for more details on setting
68 If control is not passed through to
71 .Xr ddb 4 Ns -specific
72 function is used to print the kernel stack trace, and then control returns
78 an attempt is made to save an image of system memory on the
79 configured dump device.
81 If during the process of handling the panic,
84 .Pq from the filesystem synchronization routines, for example ,
85 the system is rebooted immediately without synchronizing any filesystems.
88 is meant to be used in situations where something unexpected has happened
89 and it is difficult to recover the system to a stable state, or in
90 situations where proceeding might make the things worse, leading to
92 It is not meant to be used in scenarios where the system could easily
93 ignore and/or isolate the condition/subsystem and proceed.
95 In general developers should try to reduce the number of
97 calls in the kernel to improve stability.
101 function does not return.