.\" FreeBSD version Copyright (c) 1996 .\" Mike Pritchard . All rights reserved. .\" .\" Adapted from share/man/man8/man8.hp300/crash.8 .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" %FreeBSD: src/share/man/man8/crash.8,v 1.20 2002/12/12 17:25:58 ru Exp % .\" .\" $FreeBSD$ .\" .Dd February 2, 1996 .Dt CRASH 8 .Os .Sh 名称 .Nm crash .Nd FreeBSD システム障害 .Sh 解説 このセクションではシステムクラッシュについて少し説明し、 クラッシュダンプの解析方法についても (かなり簡潔ですが) 述べます。 .Pp システムが自らクラッシュする際には、 .Bl -diag -offset indent .It "panic: なぜ死んだのか" .El .Pp という形式でコンソールにメッセージを表示し、 もしダンプが有効になっていれば ( .Xr dumpon 8 参照) 大容量記憶装置にダンプをとり、 そして .Xr reboot 8 に述べられているように自動リブート手順を開始します。 ハードウェアあるいはソフトウェアの障害によって ファイルシステムの状態に予期せぬ矛盾点が見つかった場合を除き、 システムはマルチユーザモードでのオペレーションを再開します。 .Pp システムは数多くの内部一貫性チェックを行っています。 それらのチェックのうちひとつに引っかかると、 どのチェックに引っかかったかを示す簡潔なメッセージを表示して パニックします。 多くの場合、このメッセージはエラーを検知したルーチン名、 あるいは見つかった一貫性エラーを記述する 2 語のフレーズです。 ほとんどのパニックメッセージを完全に理解するには、 システムのソースコードを熟読する必要があります。 .Pp システム障害に共通するほとんどの原因はハードウェア障害であり、 それは様々なところに現れます。 ここでは発生する可能性の高いメッセージと、 原因に関する手掛かりを示します。 ハードウェアあるいはソフトウェアが予期せぬかたちで そのようなメッセージを出力する可能性については、全く述べていません。 .Pp .Bl -diag -compact .It "cannot mount root" このパニックメッセージは、ブートストラップ処理中に ルートファイルシステムをマウントできなかった場合に表示されます。 ルートファイルシステムが壊れているか、 システムが誤ったデバイスをルートファイルシステムとして使おうとしています。 通常、システムバイナリの別のコピーか 別のルートファイルシステムを用いてシステムを立ち上げ、調査します。 よく行われるのは、システムをインストールしたブートフロッピでブートし、 次に .Dq fixit フロッピを使用することです。 .Pp .It "init: not found" これはパニックメッセージではなく、リブートしても無駄でしょう。 ブートストラップ処理の最後の段階で、 システムが初期化プロセス .Xr init 8 の場所を探してそれを実行するのに失敗したのです。 ルートファイルシステムが不正あるいは壊れている、 .Pa /sbin/init が実行不能モードあるいはタイプになっている、 もしくは .Pa /sbin/init 自体がなくなっています。 .Pp .It "ffs_realloccg: bad optim" .It "ffs_valloc: dup alloc" .It "ffs_alloccgblk: cyl groups corrupted" .It "ffs_alloccg: map corrupted" .It "blkfree: freeing free block" .It "blkfree: freeing free frag" .It "ifree: freeing free inode" これらのパニックメッセージはファイルシステム内に矛盾点が見つかったときに 出力されるものです。 通常、この問題の原因は、 クラッシュ後の破損したファイルシステムの修復失敗、 ハードウェア障害、 あるいは通常発生しない他の条件にあります。 ファイルシステムのチェックを行えば、通常、問題は解決します。 .Pp .It "timeout table full" 実はこれはパニックではありませんが、 関係するデータ構造の拡張を行う前に、 エントリが不足するためにクラッシュしたのです。 この現象が発生したら、timeout table を大きくして下さい。 .Pp .\" .It "trap type %d, code = %x, v = %x" .\" An unexpected trap has occurred within the system; the trap types are: .\" .Bl -column xxxx -offset indent .\" 0 bus error .\" 1 address error .\" 2 illegal instruction .\" 3 divide by zero .\" .No 4\t Em chk No instruction .\" .No 5\t Em trapv No instruction .\" 6 privileged instruction .\" 7 trace trap .\" 8 MMU fault .\" 9 simulated software interrupt .\" 10 format error .\" 11 FP coprocessor fault .\" 12 coprocessor fault .\" 13 simulated AST .\" .El .\" .Pp .\" The favorite trap type in system crashes is trap type 8, .\" indicating a wild reference. .\" ``code'' (hex) is the concatenation of the .\" MMU .\" status register .\" (see ) .\" in the high 16 bits and the 68020 special status word .\" (see the 68020 manual, page 6-17) .\" in the low 16. .\" ``v'' (hex) is the virtual address which caused the fault. .\" Additionally, the kernel will dump about a screenful of semi-useful .\" information. .\" ``pid'' (decimal) is the process id of the process running at the .\" time of the exception. .\" Note that if we panic in an interrupt routine, .\" this process may not be related to the panic. .\" ``ps'' (hex) is the 68020 processor status register ``ps''. .\" ``pc'' (hex) is the value of the program counter saved .\" on the hardware exception frame. .\" It may .\" .Em not .\" be the PC of the instruction causing the fault. .\" ``sfc'' and ``dfc'' (hex) are the 68020 source/destination function codes. .\" They should always be one. .\" ``p0'' and ``p1'' are the .\" VAX-like .\" region registers. .\" They are of the form: .\" .Pp .\" .Bd -ragged -offset indent .\" '@' .\" .Ed .\" .Pp .\" where both are in hex. .\" Following these values are a dump of the processor registers (hex). .\" Finally, is a dump of the stack (user/kernel) at the time of the offense. .\" .Pp .It "init died (signal #, exit #)" システム初期化プロセスが、示されたとおりのシグナルおよび終了コードで 終了してしまいました。 これは良くない知らせです。もう誰もログインできません。 リブートするしか手はなく、従ってシステムはただちにリブートします。 .El .Pp 以上が遭遇する可能性のあるパニックの種類一覧です。 .Pp クラッシュダンプを取るようにシステムが設定されている場合 ( .Xr dumpon 8 参照)、 システムがクラッシュすると ダンプデバイス (通常は 1 つめのスワップ領域と同じ) の終わりに メモリイメージを書き込みます (少なくとも書き込もうとします)。 システムがリブートした後、プログラム .Xr savecore 8 が起動し、後の解析のために、 このコアイメージと現在のシステムのコピーを特定ディレクトリに保存します。 詳細は .Xr savecore 8 を参照して下さい。 .Pp ダンプを解析するには、システムのロードイメージとコアダンプに対して .Xr gdb 1 を .Fl k オプション付きで起動します。 コアイメージがパニックによって生成されたものならば、 そのパニックメッセージが表示されます。 より詳しい情報は、 .%B "FreeBSD 開発者用ハンドブック" .Pq Pa http://www.FreeBSD.org/ の カーネルデバッギングの章を参照して下さい。 .Sh 関連項目 .Xr gdb 1 , .Xr dumpon 8 , .Xr reboot 8 , .Xr savecore 8 .Sh 歴史 .Nm マニュアルページは .Fx 2.2 で登場しました。