JP4872883B2 - Computer, failure reproduction method and program - Google Patents
Computer, failure reproduction method and program Download PDFInfo
- Publication number
- JP4872883B2 JP4872883B2 JP2007283348A JP2007283348A JP4872883B2 JP 4872883 B2 JP4872883 B2 JP 4872883B2 JP 2007283348 A JP2007283348 A JP 2007283348A JP 2007283348 A JP2007283348 A JP 2007283348A JP 4872883 B2 JP4872883 B2 JP 4872883B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- computer
- storage unit
- failure
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 17
- 238000001514 detection method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000002427 irreversible effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、サーバやパーソナルコンピュータ(PC)等の計算機において、障害を再現する障害再現技術に関し、特に、障害によりオペレーティングシステム(OS)が起動できない場合においても、障害を再現することが可能な障害再現技術に関する。 The present invention relates to a failure reproduction technique for reproducing a failure in a computer such as a server or a personal computer (PC), and in particular, a failure capable of reproducing a failure even when an operating system (OS) cannot be started due to the failure. Reproduction technology.
サーバやPC等の計算機において、障害原因を究明するために、障害を再現するということは従来から行われている(例えば、特許文献1参照)。この特許文献1においては、命令を実行する毎に、その命令によって更新されたレジスタの値を蓄積部に蓄積しておき、予想に反した事象(障害など)を再現する場合には、蓄積部に蓄積されているレジスタの値に基づいて、レジスタ(プログラムカウンタを含む)の状態を障害発生前の状態に戻し、その後、プログラムカウンタによって示される命令からプログラムの実行を再開させるようにしている。
In a computer such as a server or a PC, it has been conventionally performed to reproduce a failure in order to investigate the cause of the failure (see, for example, Patent Document 1). In this
特許文献1に記載されている技術によれば、レジスタの状態を障害発生前の状態に戻してからプログラムの実行を再開するようにしているので、障害を高い確率で再現することが可能になる。しかし、特許文献1に記載されている技術は、障害によってOSが起動できなくなった場合には、障害を再現することができないという問題がある。
According to the technique described in
〔発明の目的〕
そこで、本発明の目的は、障害によりOSが起動できなくなった場合においても、障害を再現できるようにすることにある。
(Object of invention)
Therefore, an object of the present invention is to make it possible to reproduce a failure even when the OS cannot be started due to the failure.
本発明にかかる第1の計算機は、
自計算機において命令が実行される毎に、実行された命令が書き込まれ、自計算機に障害が発生したとき、命令の書き込みを禁止する命令列記憶部と、
前記命令列記憶部に格納されている命令に基づいて、前記障害を再現するための障害再現部を含んだ障害再現プログラムを生成するプログラム生成部と、
該プログラム生成部で生成された障害再現プログラムを起動するブートローダとを備えたことを特徴とする。
The first computer according to the present invention is:
Each time an instruction is executed in the own computer, the executed instruction is written, and when a failure occurs in the own computer, an instruction string storage unit that prohibits writing of the instruction;
A program generation unit that generates a failure reproduction program including a failure reproduction unit for reproducing the failure based on an instruction stored in the instruction sequence storage unit;
And a boot loader that activates the failure reproduction program generated by the program generation unit.
本発明にかかる第1の障害再現方法は、
自計算機において命令が実行される毎に、実行された命令を命令列記憶部に書き込む第1のステップと、
自計算機において障害が発生したとき、前記命令列記憶部に対する命令の書き込みを禁止する第2のステップと、
前記命令列記憶部に格納されている命令に基づいて、前記障害を再現するための障害再現部を含んだ障害再現プログラムを生成する第3のステップと、
該第3のステップで生成された障害再現プログラムをブートローダにより起動する第4のステップとを含むことを特徴とする。
The first failure reproduction method according to the present invention is:
A first step of writing the executed instruction to the instruction sequence storage unit each time an instruction is executed in the own computer;
A second step of prohibiting writing of instructions to the instruction sequence storage unit when a failure occurs in the own computer;
A third step of generating a failure reproduction program including a failure reproduction unit for reproducing the failure based on an instruction stored in the instruction sequence storage unit;
And a fourth step of starting the failure reproduction program generated in the third step by a boot loader.
本発明にかかる第1のプログラムは、
コンピュータに、自コンピュータにおいて命令が実行される毎に、実行された命令を命令列記憶部に書き込む第1のステップと、
前記コンピュータに、自コンピュータにおいて障害が発生したとき、前記命令列記憶部に対する命令の書き込みを禁止する第2のステップと、
前記コンピュータに、前記命令列記憶部に格納されている命令に基づいて、前記障害を再現するための障害再現部を含んだ障害再現プログラムを生成する第3のステップと、
前記コンピュータに、前記第3のステップで生成された障害再現プログラムをブートローダにより起動する第4のステップとを実行させる。
The first program according to the present invention is:
A first step of writing the executed instruction to the instruction sequence storage unit in the computer each time the instruction is executed in the computer;
A second step of prohibiting writing of an instruction to the instruction sequence storage unit when a failure occurs in the computer;
A third step of generating, on the computer, a failure reproduction program including a failure reproduction unit for reproducing the failure based on an instruction stored in the instruction sequence storage unit;
Causing the computer to execute a fourth step of starting the fault reproduction program generated in the third step by a boot loader.
本発明によれば、障害によりOSが起動できなくなった場合においても障害を再現することが可能になるという効果を得ることができる。 According to the present invention, it is possible to obtain an effect that the failure can be reproduced even when the OS cannot be started due to the failure.
次に、本発明を実施するための最良の形態について図面を参照して詳細に説明する。 Next, the best mode for carrying out the present invention will be described in detail with reference to the drawings.
〔本発明の実施例〕
図1を参照すると、本発明の実施例にかかる計算機1は、プロセッサ2と、主記憶装置3と、不揮発性メモリ4とを備えている。
Examples of the present invention
Referring to FIG. 1, a
プロセッサ2は、一般的なプロセッサが備えている命令レジスタ21、デコーダ22、汎用レジスタ(単にレジスタという場合もある)R1〜RN、演算回路23および障害検出回路24に加えて、命令列記憶部25、データ列記憶部26およびプログラム生成部27を備えている。
The
命令列記憶部25は、図2に示すように、書き込み手段251と、記憶部252とを備えている。記憶部252は、SRAM(スタティックRAM)等によって実現されるものであり、N個の領域#1〜#Nを備えている。書き込み手段251は、命令レジスタ21からデコーダ22へ命令が送られる毎に(命令が実行される毎に)、その命令を記憶部252の領域#1から順番に書き込む。領域#Nまで命令を書き込むと、書き込み手段251は、再び領域#1から命令を書き込む。従って、記憶部252には、最新の命令がN個格納されることになる。また、書き込み手段251は、障害検出回路24によって計算機1の障害が検出されると、命令の書き込みを停止する。なお、図2において、命令#3は格納順が最も古い命令を、命令#(N+2)は格納順が最も新しい命令を表している。
The instruction
データ列記憶部26は、命令列記憶部25と同様に、書き込み手段とN個の領域からなる記憶部とを備えている。書き込み手段は、命令が実行される毎に、デコーダ22のデコード結果に従って上記命令に関連する関連データを記憶部の領域#1から順番に格納する。従って、データ列記憶部26の領域#J(1≦J≦N)には、命令列記憶部25の領域#Jに格納されている命令に関する関連データが格納されることになる。また、書き込み手段は、障害検出回路24によって計算機1の障害が検出されると、関連データの書き込みを停止する。ここで、命令が更新および参照対象にしている全てのレジスタおよび主記憶装置に関するデータ(値と更新および参照位置)を関連データとしてデータ列記憶部26に書き込むようにしても良いが、本実施例では、データ列記憶部26の容量削減のため、その内の一部のみを関連データとしてデータ列記憶部26に書き込むようにしている。本実施例では、メモリストア命令の場合には、参照しているレジスタの値とレジスタ番号とを関連データとし、メモリロード命令の場合には、参照している主記憶装置の値とアドレスとを関連データとし、他の命令の場合には、更新対象にしているレジスタの値とレジスタ番号とを関連データとしている。
Similar to the instruction
プログラム生成部27は、障害検出回路24によって自計算機1の障害が検出されると、命令列記憶部25に格納されている命令およびデータ列記憶部26に格納されている関連データに基づいて、図3に示すような障害再現プログラム5を生成し、不揮発性メモリ4に格納する機能を有する。障害再現プログラム5は、レジスタR1〜RN及び主記憶装置3の状態を、命令列記憶部25に格納されている最古の命令の実行時の状態に戻す状態復元部51と、障害を再現させるための障害再現部52とを含んでいる。
When the
図4はプログラム生成部27の構成例を示すブロック図であり、デコーダ271と、セレクタ272と、一意フラグ記憶部273と、推測部274と、セレクタ275とを備えている。
FIG. 4 is a block diagram illustrating a configuration example of the
デコーダ271は、命令列記憶部25に格納されている命令を、格納順が古い命令から順番にデコードし、デコード結果を出力する。
The
一意フラグ記憶部273には、レジスタR1〜RNそれぞれに対する一意フラグF1〜FNが格納される。一意フラグF1〜FNは、対応するレジスタR1〜RNの値が現時点において一意に決定されているか否かを表示するものであり、一意に決定されている場合には“1”が、決定されていない場合には“0”が設定される。 The unique flag storage unit 273 stores unique flags F1 to FN for the registers R1 to RN, respectively. The unique flags F1 to FN indicate whether or not the values of the corresponding registers R1 to RN are uniquely determined at the present time, and “1” is determined when the values are uniquely determined. If not, “0” is set.
一意フラグ記憶部273の内容は、デコーダ271のデコード結果によって制御されるセレクタ272によって書き換えられる。なお、セレクタ272はデコーダ271のデコード結果に応じて、次のような動作を行うように構成されている。デコーダ271のデコード結果が、デコードした命令に対応する関連データの値がレジスタの値であり、且つその値が当該命令の実行以前に一意に決まるものであることを示している場合は、上記レジスタに対応する一意フラグを“1”とする。また、デコーダ271のデコード結果が、デコードした命令に対応する関連データの値がレジスタの値であり、且つその値が当該命令により一意に決まることを示している場合には、上記レジスタに対応する一意フラグを“0”とする。
The contents of the unique flag storage unit 273 are rewritten by the
例えば、デコーダ271でデコードした命令がメモリストア命令である場合は、当該メモリストア命令に対応する関連データの値は、ストア元のレジスタの値であり、ストア元のレジスタの値は、当該メモリストア命令の実行以前に一意に決まるものであるので、ストア元のレジスタに対応する一意フラグを“1”とする。また、例えば、デコードした命令が足し算命令である場合は、当該足し算命令に対応する関連データの値は、当該足し算命令で更新対象にしているレジスタの値であり、このレジスタの値は当該足し算命令によって決まるので、更新対象にしているレジスタに対応する一意フラグを“0”とする。
For example, when the instruction decoded by the
推測部274は、次のような機能を有する。
The
・デコーダ271でデコードされた命令によって更新或いは参照されているレジスタ或いは主記憶装置の値の内、データ列記憶部26に関連データとして値が格納されているものについては、その値をレジスタ或いは主記憶装置に書き戻す命令を生成し、生成した命令を不揮発性メモリ4に格納する。
・デコーダ271でデコードされた命令によって更新或いは参照されているレジスタ或いは主記憶装置の値の内、データ列記憶部に関連データとして値が格納されていないものについては、その値を推測し、推測した値をレジスタ或いは主記憶装置に書き戻す命令を生成して不揮発性メモリ4に格納する。なお、デコードした命令で更新或いは参照しているレジスタの一意フラグが“1”の場合は、既に値が確定しているため、推測した値を書き戻す命令は生成しない。また、もし、一意フラグが“1”のレジスタの値を不揮発性メモリ4から読み出すことにより、他の更新或いは参照しているレジスタの値も一意に決まる場合は、該当するレジスタの一意フラグを“1”として、一意に決まった値を書き戻す命令を生成する。
Among the values of the registers or main memory that are updated or referred to by the instruction decoded by the
-For values of registers or main memory that are updated or referred to by instructions decoded by the
より具体的には、推測部274には命令の種別に応じた推測回路(図示せず)が設けられており、デコーダ271でデコードされた命令の種別に対応する推測回路が、命令の種別に応じた処理を行う。例えば、足し算命令用の推測回路には、データ列記憶部26から読み出した関連データに基づいて更新対象にしているレジスタに値を書き戻す命令を生成して不揮発性メモリ4に格納する構成と、足し算命令で参照している一方のレジスタに0を書き込む命令を生成して不揮発性メモリ4に格納する構成と、参照している他方のレジスタにデータ列記憶部26から読み出した関連データによって示される値を書き込む命令を生成して不揮発性メモリ4に格納する構成を持たせれば良い。なお、足し算回路の構成はこれに限られるものではなく、乱数発生器を利用して構成するようにすることもできる。即ち、足し算命令で参照される一方のレジスタの値を乱数発生器を用いて決定し、他方のレジスタの値を乱数発生器を用いて決定した値と関連データによって示される値とから決定するようにしても良い。
More specifically, the
なお、本実施例ではプログラム生成部27をハードウェア(布線論理)により実現したが、コンピュータによって実現することもできる。この場合は、コンピュータをプログラム生成部27として機能させるためのプログラムを記録したディスク、半導体メモリ、その他の記録媒体を用意し、コンピュータに上記プログラムを読み取らせる。コンピュータは、読み取ったプログラムに従って、自身の動作を制御することにより、自コンピュータ上に、プログラム生成部27を実現する。
In the present embodiment, the
〔実施例の動作の説明〕
次に、本実施例の動作について詳細に説明する。
[Description of Operation of Example]
Next, the operation of this embodiment will be described in detail.
計算機1が正常に動作している場合は、計算機1において命令が実行される毎に、実行された命令が命令列記憶部25の記憶部252に書き込まれると共に、上記命令に関連する関連データがデータ列記憶部26の記憶部に書き込まれる。そして、障害検出回路24によって計算機1の障害が検出されると、命令列記憶部25は命令の書き込みを停止する。データ列記憶部26は命令列記憶部25に最後に書き込まれた命令に対応する関連データを書き込んだ後、書き込みを停止する。
When the
計算機1に障害が発生し、命令列記憶部25、データ列記憶部26が命令、関連データの書き込みを停止すると、プログラム生成部27が図5のフローチャートに示す処理を開始する。
When a failure occurs in the
先ず、プログラム生成部27は、一意フラグ記憶部273に格納されている全ての一意フラグF1〜FNを全て“0”に初期設定する(図5のS501)。その後、命令列記憶部25、データ列記憶部26からそれぞれ格納順(実行順)が最後の命令、関連データを読み出し(S502)、当該関連データが示す値を当該関連データが示すレジスタ或いはメモリアドレス(主記憶装置3)に書き込む命令を生成して不揮発性メモリ4に格納する(S503)。
First, the
その後、データ列記憶部26から今回読み出した関連データがレジスタの値を示し、且つその値が命令列記憶部25から今回読み出した命令の実行以前に一意に決まるものであるか否かをチェックする(S504)。そして、今回読み出した命令がメモリストア命令にように一意に決まる命令の場合は、該当するレジスタの一意フラグを“1”とする(S505)。これに対して、足し算命令のように一意に決まらない場合は、該当するレジスタの一意フラグを“0”とする(S506)。
Thereafter, it is checked whether or not the related data read this time from the data
その後、命令列記憶部25から今回読み出した命令によって更新或いは参照されているレジスタ或いは主記憶装置3の値の内、今回読み出した関連データによって値が示されていないものは、その値を推測する(S507)。
After that, among the values of the registers or
そして、推測対象が主記憶装置3であった場合(S508がNo)は、推測した値を該当するメモリアドレス(命令から分かる)に書き込む命令を生成し、生成した命令を不揮発性メモリ4に格納する(S509)。その後、命令列記憶部25、データ列記憶部26からそれぞれ格納順が1つ前の命令、関連データを読み出す(S514)。
Then, when the estimation target is the main storage device 3 (No in S508), an instruction to write the estimated value to the corresponding memory address (which can be understood from the instruction) is generated, and the generated instruction is stored in the
これに対して、推測対象がレジスタであった場合(S508がYes)は、推測対象にした全てのレジスタの一意フラグをチェックする(S510)。そして、一意フラグが全て“1”である場合(S510がYes)には、現時点においては推測対象にしたレジスタの値が全て確定しているため、推測した値を書き込む命令は生成せずに、命令列記憶部25、データ列記憶部26からそれぞれ格納順が1つ前の命令、関連データを読み出す(S514)。
On the other hand, when the estimation target is a register (S508 is Yes), the unique flags of all the registers that are the estimation target are checked (S510). If all the unique flags are “1” (Yes in S510), all the register values to be estimated are determined at the present time. Therefore, an instruction to write the estimated value is not generated. The previous instruction and related data are read from the instruction
これに対して、推測対象にしたレジスタの一意フラグの中に、値が“0”のものが1つでも含まれている場合(S510がNo)は、一意フラグが“0”になっているレジスタの値を、一意フラグが“1”となっているレジスタの値と今回読み出した関連データによって示されるレジスタ或いは主記憶装置の値によって一意に決定することができるか否かを判定する(S511)。 On the other hand, the unique flag is “0” when one of the unique flags of the register to be estimated includes a value of “0” (No in S510). It is determined whether or not the value of the register can be uniquely determined by the value of the register whose unique flag is “1” and the value of the register or main memory indicated by the related data read this time (S511). ).
そして、一意に決定できると判定した場合(S511がYes)は、値を一意に決定できると判定したレジスタの一意フラグを“1”に書き換え、更に、一意に決定した値を上記レジスタに書き込む命令を生成し、生成した命令を不揮発性メモリ4に格納する(S512)。 If it is determined that the value can be uniquely determined (Yes in S511), the unique flag of the register whose value is determined to be uniquely determined is rewritten to “1”, and the uniquely determined value is written to the register. And the generated instruction is stored in the nonvolatile memory 4 (S512).
これに対して、一意に決定できないと判定した場合(S511がNo)は、ステップS507で推測した値を該当するレジスタに書き込む命令を生成して不揮発性メモリ4に格納する(ステップS513)。 On the other hand, when it is determined that it cannot be uniquely determined (No in S511), an instruction to write the value estimated in Step S507 to the corresponding register is generated and stored in the nonvolatile memory 4 (Step S513).
ステップS512或いはステップS513の処理が終了すると、命令列記憶部25、データ列記憶部26からそれぞれ格納順が1つ前の命令、関連データを読み出す(S514)。以後、ステップS503〜S514の処理を繰り返し行い、障害再現プログラム5の状態復元部51を生成していく。そして、命令列記憶部25、データ列記憶部26に格納されている全ての命令、関連データに対してステップS503〜S514の処理を行い、格納順が前の命令がなくなると(ステップS515がYes)、障害再現プログラム5の状態復元部51が完成したことになるので、今度は障害再現部52を生成するために図6のフローチャートの処理を行う。
When the process of step S512 or step S513 is completed, the previous instruction and related data are read out from the instruction
図6を参照すると、プログラム生成部27は、先ず、命令列記憶部25に格納されている命令の中から実行順が最も前の命令を読み出し(S601)、不揮発性メモリ4に格納する(S602)。その後、プログラム生成部27は、実行順が次の命令を命令列記憶部25から取り出し、その命令を不揮発性メモリ4に書き込むという処理(S603、S602)を繰り返し行い、命令列記憶部25に格納されている実行順が最後の命令を取り出して次の命令がなくなると(S604がYes)、障害再現プログラム5の障害再現部52が完成したことになるので、処理を終了する。
Referring to FIG. 6, the
次に、図7及び図8を参照して、不揮発性メモリ4に格納されている障害再現プログラム5を利用して障害を再現させる場合の動作について説明する。
Next, with reference to FIG. 7 and FIG. 8, the operation in the case of reproducing a fault using the
先ず、不揮発性メモリ4に格納されている障害再現プログラム5を、ブートイメージでフレキシブルディスク等の外部記憶装置6に書き込む(図7のS701、図8のS801)。なお、図8においてはブートイメージで書き込まれた障害再現プログラムを障害再現プログラム5aとして表している。それから、障害再現プログラム5aを読み出すブートローダ7を外部記憶装置6上に作成する(図7のS702、図8のS802)。なお、予め外部記憶装置6上にブートローダ7を作成しておき、ブートローダ7が作成済みの外部記憶装置6に障害再現プログラム5をブートイメージで書き込むようにしても良い。
First, the
その後、外部記憶装置6を計算機1に接続し(図7のS703、図8の803)、計算機1を再起動する(図7の704、図8の804)。なお、外部記憶装置6は、ブートに使用できるデバイスの内、最も優先順位が高いデバイスであるとする。
Thereafter, the external storage device 6 is connected to the computer 1 (S703 in FIG. 7, 803 in FIG. 8), and the
これにより、計算機1は、優先順位が最も高い外部記憶装置6からブートローダ7を読み込んで実行し、更に、このブートローダ7により障害再現プログラム5aを読み込んで実行する(図7のS705、図8のS805、S806)。
Thereby, the
障害再現プログラム5aが実行されると、先ず、状態復元部51によって計算機1のレジスタR1〜RN及び主記憶装置3の状態が、命令列記憶部25に格納されている最古の命令の実行時の状態まで戻され、その後、障害再現部52によって障害が再現される。
When the fault reproduction program 5a is executed, first, the
なお、上述した説明では、不揮発性メモリ4に格納されている障害再現プログラム5を一旦外部記憶装置6にブートイメージとして書き込み、外部記憶装置6上にブートローダ7を作成するようにしたが、障害再現プログラム5が格納されている不揮発性メモリ4上にブートローダ7を作成し、計算機1の再起動時に、不揮発性メモリ4に格納されているブートローダ7を読み込み、このブートローダ7より不揮発性メモリ4から障害再現プログラム5を読み込み実行する構成としても良い。
In the above description, the
〔実施例の具体例〕
次に、具体例を挙げてプログラム生成部27の動作を説明する。今、例えば、命令列記憶部25、データ列記憶部26の内容が図9に示すものであったとする。なお、図9において、R*はレジスタを表し、Mem[x]は主記憶装置3のアドレスxを表している。また、順番1〜6は命令の実行順を示すものであり、実行順を示す数字が小さい命令ほど、実行順が前の命令である。
[Specific Examples]
Next, the operation of the
プログラム生成部27は、障害再現プログラム5の状態復元部51を生成するため、命令列記憶部25、データ列記憶部26に格納されている命令、関連データを、実行順が後の命令(実行順を示す数字が大きい命令)から順番に読み込み、次のような処理を行う。
In order to generate the
・順番6の命令(分岐命令)及び関連データを読み込んだ場合の動作
ステップS503において、関連データ「R1=0」に基づいて、レジスタR1に0を書き込む命令を生成し、生成した命令を不揮発性メモリ4に格納する。ステップS507において分岐条件からR5=101と推測し、ステップS513において、レジスタR5に推測した値「101」を書き込む命令を生成し、不揮発性メモリ4に格納する。
Operation when order 6 instruction (branch instruction) and related data are read In step S503, based on the related data “R1 = 0”, an instruction to write 0 to the register R1 is generated, and the generated instruction is nonvolatile. Store in
・順番5の命令(OR命令)及び関連データを読み込んだ場合の動作
ステップS503において、関連データ「R3=4」に基づいて、レジスタR3に4を書き込む命令を生成し、生成した命令を不揮発性メモリ4に格納する。ステップS507において、OR命令の右辺に基づいてR4=4、R6=0と推測し、ステップS513において、レジスタR4に4を書き込む命令と、レジスタR6に0を書き込む命令とを生成し、それらを不揮発性メモリ4に格納する。
Operation when
・順番4の命令(左2シフト命令)及び関連データを読み込んだ場合の動作
ステップS503において、関連データ「R4=4」に基づいて、レジスタR4に4を書き込む命令を生成し、生成した命令を不揮発性メモリ4に格納する。ステップS507において、シフト命令の右辺からR3=1と推測し、ステップS513において、レジスタR3に1を書き込む命令を生成し、不揮発性メモリ4に格納する。
Operation when
・順番3の命令(メモリロード命令)及び関連データを読み込んだ場合の動作
ステップS503において、関連データ「Mem[2000]=1」に基づいて、主記憶装置3の2000番地に1を書き込む命令を生成して不揮発性メモリ4に格納する。ステップS507において、ロード先のレジスタR3に書き込む値を1と推測し、ステップS513においてレジスタR3に1を書き込む命令を生成して不揮発性メモリ4に格納する。
Operation in the case of reading an instruction of order 3 (memory load instruction) and related data In step S503, an instruction to write 1 to address 2000 of the
・順番2の命令(メモリストア命令)及び関連データを読み込んだ場合の動作
ステップS503において、関連データ「R2=20」に基づいて、レジスタR2に20を書き込む命令を生成し、生成した命令を不揮発性メモリ4に格納する。ステップS504において、このメモリストア命令に対応する関連データはレジスタR2の値を示し、且つその値は、当該メモリストア命令の実行以前に一意に決まるものであると判定されるので、ステップS505において、レジスタR2に対応する一意フラグF2を“1”にする。ステップS507において、Mem[1000]の値を20と推測し、ステップS513において、Mem[1000]に20を書き込む命令を生成して不揮発性メモリ4に格納する。
Operation when reading
・順番1の命令(足し算命令)及び関連データを読み込んだ場合の動作
ステップS503において、関連データ「R1=100」に基づいて、レジスタR1に100を書き込む命令を生成し、生成した命令を不揮発性メモリ4に格納する。ステップS507において、レジスタR2、R3の値をそれぞれ例えば0、100と推測する(この推測値は、後述するように利用されない)。ステップS511において推測対象のレジスタR3の値は、一意フラグが“1”となっているレジスタR2の値によって一意に決定できると判定されるので、ステップS512において、関連データ「R1=100」によって示されるレジスタR1の値100と、一意フラグが“1”となっているレジスタR2の値「20」とからレジスタR3の値を「80」と一意に決定し、レジスタR3に80を書き込む命令を生成して不揮発性メモリ4に格納する。また、ステップS512においては、レジスタR3に対応する一意フラグF3を“1”にする処理も行われる。なお、レジスタR2の値「20」は、不揮発性メモリ4に格納されている、レジスタR2に対する書き込み命令の内、最も書き込み順が新しい命令から取得することができる。
-Operation when reading an instruction of order 1 (addition instruction) and related data In step S503, an instruction to write 100 to the register R1 is generated based on the related data “R1 = 100”, and the generated instruction is nonvolatile. Store in
以上の処理により、障害再現プログラム5の状態復元部51が生成される。
With the above processing, the
その後、プログラム生成部27は、障害再現プログラム5の障害再現部52を生成するため、命令列記憶部25に格納されている命令(順番1〜6の命令)を、実行順を示す数字が小さなものから順に、不揮発性メモリ4に格納する(図6参照)。これにより、実行順が古い命令から順次実行する障害再現部52が完成する。
Thereafter, the
〔実施例の効果〕
本実施例によれば、障害によりOSが起動できなくなった場合においても障害を再現することが可能になるという効果を得ることができる。その理由は、プログラム生成部27で生成された障害再現プログラム5を起動するブートローダ7を備えているからである。
[Effects of Examples]
According to the present embodiment, it is possible to obtain an effect that the failure can be reproduced even when the OS cannot be started due to the failure. This is because the
また、本実施例では、プログラム生成部27が、自計算機1のレジスタR1〜RN、主記憶装置3の状態を障害発生前の状態に戻すための状態復元部51を含んだ障害再現プログラム5を生成するようにしているので、障害再現プログラム5を実行することにより、レジスタR1〜RN、主記憶装置3の状態を障害発生前の状態に戻すことができる。この結果、信号線間のクロストークエラーなどのようなパターン変化に依存した障害も高い確率で再現することが可能になる。
In the present embodiment, the
更に、本実施例では、不可逆演算を行う計算機1のレジスタおよび主記憶装置の状態を障害発生前の状態に戻すために、自計算機1で実行された命令が更新および参照しているレジスタおよび主記憶装置に関するデータの内の一部のデータを関連データとしてデータ列記憶部26に書き込み、残りのデータは、関連データ及び対応する命令から推測するようにしているので、データ列記憶部26の容量を少なくすることができる。
Further, in this embodiment, in order to return the state of the register of the
また、本実施例は、推測したデータを書き込む命令の書き込み先が、一意フラグによってその値が一意に確定していることが表示されているレジスタである場合は、上記命令を不揮発性メモリ4に格納しないようにしているので、レジスタR1〜RN、主記憶装置3の状態を正確に復元することができる。
Further, in the present embodiment, when the write destination of the instruction to write the estimated data is a register indicating that the value is uniquely determined by the unique flag, the instruction is stored in the
本発明は、サーバ、PCといった様々な計算機の障害原因を究明するために利用できる。 The present invention can be used to investigate the cause of failures in various computers such as servers and PCs.
1…計算機
2…プロセッサ
21…命令レジスタ
22…デコーダ
23…演算回路
24…障害検出回路
25…命令列記憶部
251…書き込み手段
252…記憶部
26…データ列記憶部
27…プログラム生成部
R1〜RN…レジスタ
271…デコーダ
272…セレクタ
273…一意フラグ記憶部
274…推測部
275…セレクタ
3…主記憶装置
4…不揮発性メモリ
5、5a…障害再現プログラム
51…状態復元部
52…障害再現部
6…外部記憶装置
7…ブートローダ
DESCRIPTION OF
Claims (12)
前記命令列記憶部に格納されている命令に基づいて、前記障害を再現するための障害再現部を含んだ障害再現プログラムを生成するプログラム生成部と、
該プログラム生成部で生成された障害再現プログラムを起動するブートローダとを備えたことを特徴とする計算機。 Each time an instruction is executed in the own computer, the executed instruction is written, and when a failure occurs in the own computer, an instruction string storage unit that prohibits writing of the instruction;
A program generation unit that generates a failure reproduction program including a failure reproduction unit for reproducing the failure based on an instruction stored in the instruction sequence storage unit;
A computer comprising: a boot loader that activates the fault reproduction program generated by the program generation unit.
自計算機において命令が実行される毎に、実行された命令に関連する関連データが書き込まれ、自計算機に障害が発生したとき、関連データの書き込みを禁止するデータ列記憶部を備え、且つ、
前記障害再現プログラムが、前記障害再現部に加えて、自計算機のレジスタおよび主記憶装置の状態を障害発生前の状態に戻すための状態復元部を含み、
前記プログラム生成部が、前記データ列記憶部に格納されている関連データに基づいて、前記状態復元部を生成することを特徴とする計算機。 The computer according to claim 1, wherein
Each time an instruction is executed in the own computer, related data related to the executed instruction is written, and when a failure occurs in the own computer, a data string storage unit is provided to prohibit writing of the related data, and
The failure reproduction program includes, in addition to the failure reproduction unit, a state restoration unit for returning the state of the register of the own computer and the main storage device to the state before the occurrence of the failure,
The computer, wherein the program generation unit generates the state restoration unit based on related data stored in the data string storage unit.
前記障害再現部は、前記命令列記憶部に格納されている命令を、実行順が古いものから順番に配置することにより構成されることを特徴とする計算機。 The computer according to claim 1 or 2,
The computer according to claim 1, wherein the fault reproduction unit is configured by arranging instructions stored in the instruction sequence storage unit in order from the oldest execution order.
前記データ列記憶部が、自計算機で実行された命令が更新および参照しているレジスタおよび主記憶装置に関するデータであって、更新および参照している値と更新および参照位置とを含んだデータの内の一部のデータを関連データとして記憶し、
前記プログラム生成部が、前記命令列記憶部に格納されている命令と、前記データ列記憶部に格納されている関連データとに基づいて、前記命令列記憶部に格納されている命令によって更新および参照対象にされているレジスタおよび主記憶装置の内、前記データ列記憶部に格納されている関連データによって値が特定できるものについては、その値を書き戻す書き戻し命令を生成し、特定できないものについては、その値を推測して推測したデータを書き戻す書き戻し命令を生成し、該生成した書き戻し命令を、実行順が古い命令に対応するものから順番に前記状態復元部に配置することを特徴とする計算機。 The computer according to claim 2 or 3,
The data string storage unit is data related to a register and a main storage device that are updated and referred to by an instruction executed by the own computer, and includes data that is updated and referred to, and an update and reference position. Part of the data is stored as related data,
The program generation unit is updated by an instruction stored in the instruction sequence storage unit based on an instruction stored in the instruction sequence storage unit and related data stored in the data sequence storage unit. Of the registers and main storage devices to be referred to, those for which the value can be specified by the related data stored in the data string storage unit generate a write-back instruction to write back the value and cannot be specified For the above, a write-back instruction for estimating the value and writing back the estimated data is generated, and the generated write-back instruction is arranged in the state restoration unit in order from the instruction corresponding to the instruction having the oldest execution order. A computer characterized by
レジスタの値が一意に確定しているか否かを表示する、レジスタ毎の一意フラグを備え、
前記プログラム生成部が、推測した値を書き戻す書き戻し命令の書き戻し先が、一意フラグによって値が一意に確定していることが表示されているレジスタである場合は、前記書き戻し命令を前記状態復元部に配置しないことを特徴とする計算機。 The computer according to claim 4, wherein
It has a unique flag for each register that displays whether the value of the register is uniquely determined,
When the program generation unit is a register in which the write-back destination of the write-back instruction to write back the estimated value is a register that indicates that the value is uniquely determined by a unique flag, the write-back instruction is A computer that is not arranged in the state restoration unit.
自計算機において障害が発生したとき、前記命令列記憶部に対する命令の書き込みを禁止する第2のステップと、
前記命令列記憶部に格納されている命令に基づいて、前記障害を再現するための障害再現部を含んだ障害再現プログラムを生成する第3のステップと、
該第3のステップで生成された障害再現プログラムをブートローダにより起動する第4のステップとを含むことを特徴とする障害再現方法。 A first step of writing the executed instruction to the instruction sequence storage unit each time an instruction is executed in the own computer;
A second step of prohibiting writing of instructions to the instruction sequence storage unit when a failure occurs in the own computer;
A third step of generating a failure reproduction program including a failure reproduction unit for reproducing the failure based on an instruction stored in the instruction sequence storage unit;
And a fourth step of starting the fault reproduction program generated in the third step by a boot loader.
自計算機において命令が実行される毎に、実行された命令に関する関連データをデータ列記憶部に書き込む第5のステップと、
自計算機において障害が発生したとき、前記データ列記憶部に対する関連データの書き込みを禁止する第6のステップとを含み、且つ、
前記障害再現プログラムが、前記障害再現部に加えて、自計算機のレジスタおよび主記憶装置の状態を障害発生前の状態に戻すための状態復元部を含み、
前記第3のステップが、前記データ列記憶部に格納されている関連データに基づいて、前記状態復元部を生成することを特徴とする障害再現方法。 The failure reproduction method according to claim 6,
A fifth step of writing related data relating to the executed instruction to the data string storage unit each time the instruction is executed in the own computer;
And a sixth step for prohibiting writing of related data to the data string storage unit when a failure occurs in the own computer, and
The failure reproduction program includes, in addition to the failure reproduction unit, a state restoration unit for returning the state of the register of the own computer and the main storage device to the state before the occurrence of the failure,
The failure reproduction method, wherein the third step generates the state restoration unit based on related data stored in the data string storage unit.
前記障害再現部は、前記命令列記憶部に格納されている命令を、実行順が古いものから順番に配置することにより構成されることを特徴とする障害再現方法。 The failure reproduction method according to claim 6 or 7,
The failure reproduction method is configured by arranging the instructions stored in the instruction string storage unit in order from the oldest execution order.
前記第5のステップでは、自計算機で実行された命令が更新および参照しているレジスタおよび主記憶装置に関するデータであって、更新および参照している値と更新および参照位置とを含んだデータの内の一部のデータを関連データとして記憶し、
前記第3のステップでは、前記命令列記憶部に格納されている命令と、前記データ列記憶部に格納されている関連データとに基づいて、前記命令列記憶部に格納されている命令によって更新および参照対象にされているレジスタおよび主記憶装置の内、前記データ列記憶部に格納されている関連データによって値が特定できるものについては、その値を書き戻す書き戻し命令を生成し、特定できないものについては、その値を推測して推測したデータを書き戻す書き戻し命令を生成し、該生成した書き戻し命令を、実行順が古い命令に対応するものから順番に前記状態復元部に配置することを特徴とする障害再現方法。 The failure reproduction method according to claim 7 or 8,
In the fifth step, data relating to a register and a main storage device that are updated and referred to by an instruction executed by the own computer, including data that is updated and referred to, and an update and reference position Part of the data is stored as related data,
In the third step, updating is performed by an instruction stored in the instruction sequence storage unit based on an instruction stored in the instruction sequence storage unit and related data stored in the data sequence storage unit Among the registers and main storage devices to be referred to, those for which the value can be specified by the related data stored in the data string storage unit generate a write-back instruction to write back the value, and cannot be specified For a thing, a write-back instruction for writing back the estimated data by guessing its value is generated, and the generated write-back instruction is arranged in the state restoration unit in order from the instruction corresponding to the instruction whose execution order is old. The failure reproduction method characterized by this.
前記計算機が、レジスタの値が一意に確定しているか否かを表示する、レジスタ毎の一意フラグを備え、
前記第3のステップでは、推測した値を書き戻す書き戻し命令の書き戻し先が、一意フラグによって値が一意に確定していることが表示されているレジスタである場合は、前記書き戻し命令を前記状態復元部に配置しないことを特徴とする障害再現方法。 The failure reproduction method according to claim 9,
The calculator includes a unique flag for each register that displays whether the value of the register is uniquely determined,
In the third step, when the write back destination of the write back instruction to write back the estimated value is a register indicating that the value is uniquely determined by the unique flag, the write back instruction is A failure reproduction method characterized by not being arranged in the state restoration unit.
前記コンピュータに、自コンピュータにおいて障害が発生したとき、前記命令列記憶部に対する命令の書き込みを禁止する第2のステップと、
前記コンピュータに、前記命令列記憶部に格納されている命令に基づいて、前記障害を再現するための障害再現部を含んだ障害再現プログラムを生成する第3のステップと、
前記コンピュータに、前記第3のステップで生成された障害再現プログラムをブートローダにより起動する第4のステップとを実行させるためのプログラム。 A first step of writing the executed instruction to the instruction sequence storage unit in the computer each time the instruction is executed in the computer;
A second step of prohibiting writing of an instruction to the instruction sequence storage unit when a failure occurs in the computer;
A third step of generating, on the computer, a failure reproduction program including a failure reproduction unit for reproducing the failure based on an instruction stored in the instruction sequence storage unit;
A program for causing the computer to execute a fourth step of starting the fault reproduction program generated in the third step by a boot loader.
前記コンピュータに、自コンピュータにおいて命令が実行される毎に、実行された命令に関する関連データをデータ列記憶部に書き込む第5のステップと、
前記コンピュータに、自コンピュータにおいて障害が発生したとき、前記データ列記憶部に対する関連データの書き込みを禁止する第6のステップとを実行させ、且つ、
前記障害再現プログラムが、前記障害再現部に加えて、自計算機のレジスタおよび主記憶装置の状態を障害発生前の状態に戻すための状態復元部を含み、
前記第3のステップが、前記データ列記憶部に格納されている関連データに基づいて、前記状態復元部を生成することを特徴とするプログラム。 The program according to claim 11, wherein
A fifth step of writing relevant data relating to the executed instruction to the data string storage unit each time an instruction is executed in the computer;
Causing the computer to execute a sixth step of prohibiting writing of related data to the data string storage unit when a failure occurs in the computer; and
The failure reproduction program includes, in addition to the failure reproduction unit, a state restoration unit for returning the state of the register of the own computer and the main storage device to the state before the occurrence of the failure,
The program in which the third step generates the state restoration unit based on related data stored in the data string storage unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007283348A JP4872883B2 (en) | 2007-10-31 | 2007-10-31 | Computer, failure reproduction method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007283348A JP4872883B2 (en) | 2007-10-31 | 2007-10-31 | Computer, failure reproduction method and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2009110375A JP2009110375A (en) | 2009-05-21 |
| JP4872883B2 true JP4872883B2 (en) | 2012-02-08 |
Family
ID=40778786
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007283348A Expired - Fee Related JP4872883B2 (en) | 2007-10-31 | 2007-10-31 | Computer, failure reproduction method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4872883B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5545761B2 (en) * | 2011-02-03 | 2014-07-09 | Necシステムテクノロジー株式会社 | Failure analysis support system, failure analysis support method, and failure analysis support program |
| JP7068912B2 (en) * | 2018-04-25 | 2022-05-17 | 三菱電機株式会社 | Information processing equipment, equipment, defect analysis system, defect analysis method and program |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS62210551A (en) * | 1986-03-11 | 1987-09-16 | Fujitsu Ltd | Microprogram tracing device |
| JP3379675B2 (en) * | 1995-06-21 | 2003-02-24 | 沖電気工業株式会社 | Reverse execution debugging system |
-
2007
- 2007-10-31 JP JP2007283348A patent/JP4872883B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2009110375A (en) | 2009-05-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5735338B2 (en) | Memory buffer with accessible information after program fail | |
| JP2010165251A (en) | Information processing device, processor, and information processing method | |
| JP2010224845A (en) | Storage device | |
| JP2004127274A (en) | Raid controller and data storage system management method | |
| WO2014158156A1 (en) | Storing data from cache lines to main memory based on memory addresses | |
| TW200839779A (en) | Method and apparatus of cache assisted error detection and correction in memory | |
| CN107562578B (en) | A snapshot creation method, device, device and storage medium for storing data | |
| CN106339284A (en) | Checkpointing a shift register | |
| CN113608695A (en) | Data processing method, system, device and medium | |
| JP5286796B2 (en) | Memory control device | |
| JP4872883B2 (en) | Computer, failure reproduction method and program | |
| JP4865016B2 (en) | Processor | |
| KR101969799B1 (en) | Electronic device and controlling method thereof | |
| US9594792B2 (en) | Multiple processor system | |
| KR20210086430A (en) | Data writing method, device, and electronic equipment | |
| JP2007041665A (en) | Ecc functional test circuit and ecc functional test method | |
| CN102479116A (en) | A method and device for viewing code information when the system is abnormal | |
| US20070079109A1 (en) | Simulation apparatus and simulation method | |
| WO2015162717A1 (en) | Computer | |
| JP2006003971A (en) | Redundant drive group, and writing method and read-out method using the same | |
| JP4471947B2 (en) | Data processing apparatus and data processing method | |
| US10691421B2 (en) | Embedded designer framework and embedded designer implementation | |
| CN107797885B (en) | Electronic equipment and control method thereof | |
| WO2015170454A1 (en) | Memory control device, memory device and memory control method | |
| JP4648097B2 (en) | Registry information repair method and information processing apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20091008 |
|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20091008 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100909 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111019 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20111025 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20111107 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141202 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4872883 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |