JP2022174793A - Information processing apparatus, information processing program, and information processing method - Google Patents
Information processing apparatus, information processing program, and information processing method Download PDFInfo
- Publication number
- JP2022174793A JP2022174793A JP2021080755A JP2021080755A JP2022174793A JP 2022174793 A JP2022174793 A JP 2022174793A JP 2021080755 A JP2021080755 A JP 2021080755A JP 2021080755 A JP2021080755 A JP 2021080755A JP 2022174793 A JP2022174793 A JP 2022174793A
- Authority
- JP
- Japan
- Prior art keywords
- kernel
- area
- program
- information processing
- memory
- 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.)
- Pending
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 46
- 238000003672 processing method Methods 0.000 title claims description 8
- 230000004913 activation Effects 0.000 claims description 25
- 238000000034 method Methods 0.000 description 27
- 238000010586 diagram Methods 0.000 description 22
- 238000001994 activation Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 5
- 230000003213 activating effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、情報処理装置、情報処理プログラム、及び情報処理方法に関する。 The present invention relates to an information processing device, an information processing program, and an information processing method.
コンピュータのOS(Operating System)のカーネルが致命的なエラーを検出すると、コンピュータを保護するためにカーネルがカーネルパニックと呼ばれる処理を実行する。例えば、物理的に壊れたメモリ領域をアプリケーションプログラムが参照した場合にカーネルパニックが実行される。 When the OS (Operating System) kernel of a computer detects a fatal error, the kernel executes a process called kernel panic to protect the computer. For example, a kernel panic is executed when an application program refers to a physically damaged memory area.
カーネルパニックが実行されると、OSに含まれるダンプ採取カーネルがメモリのダンプファイルを生成してそれをディスク等の記憶装置に書き込む処理を行う。ダンプファイルは、カーネルパニックの実行直前にカーネルが参照していたメモリの内容と、CPU(Central Processing Unit)のレジスタの内容とを含む情報である。管理者がそのダンプファイルを解析することにより、コンピュータに発生した障害の原因を特定することができる。 When a kernel panic is executed, the dump collection kernel included in the OS performs processing to generate a memory dump file and write it to a storage device such as a disk. The dump file is information including the contents of the memory referenced by the kernel immediately before the execution of the kernel panic and the contents of the registers of the CPU (Central Processing Unit). By analyzing the dump file, the administrator can identify the cause of the failure that occurred in the computer.
しかし、コンピュータのハードウェア資源に障害がない場合であっても、ダンプ採取カーネルがダンプファイルの生成を行っているときはコンピュータを復旧できず、コンピュータのハードウェア資源を有効活用できない。 However, even if there is no failure in the hardware resources of the computer, the computer cannot be restored while the dump collection kernel is generating the dump file, and the hardware resources of the computer cannot be used effectively.
また、ダンプファイルの大部分は、カーネルが参照していたメモリの内容で占められている。そのため、カーネルの高機能化に伴ってカーネルが参照するメモリの領域が大きくなると、ダンプファイルの生成に長時間を要してコンピュータの復旧に長時間を要してしまう。 Also, most of the dump file is occupied by the contents of memory referenced by the kernel. Therefore, if the memory area referred to by the kernel increases as the function of the kernel increases, it will take a long time to generate the dump file and a long time to restore the computer.
一側面によれば、情報処理装置をカーネルパニックから速やかに復旧させることを目的とする。 According to one aspect, an object is to quickly recover an information processing apparatus from a kernel panic.
一側面によれば、カーネルパニックを実行したカーネルを再起動するカーネル起動部と、前記カーネルパニックの実行時に前記カーネルが使用していたメモリの第1の領域の内容を取得して、前記内容を含むダンプファイルを生成する生成部と、前記メモリにおいて前記第1の領域とは異なる第2の領域に、前記カーネルとは異なるプログラムを割り当てて、再起動した前記カーネルの上で前記プログラムを起動するプログラム起動部とを有する情報処理装置が提供される。 According to one aspect, a kernel startup unit that restarts a kernel that executed a kernel panic; and a generation unit that generates a dump file containing the An information processing apparatus having a program activation unit is provided.
一側面によれば、情報処理装置をカーネルパニックから速やかに復旧させることができる。 According to one aspect, the information processing device can be quickly recovered from a kernel panic.
本実施形態の説明に先立ち、基礎となる事項について説明する。 Before describing the present embodiment, basic matters will be described.
図1は、カーネルパニックを実行したカーネルを再起動する処理を示す模式図である。 FIG. 1 is a schematic diagram showing the process of restarting a kernel that has executed a kernel panic.
この例では、あるシステムが複数のコンピュータで実現されており、そのうちの一台においてカーネルパニックが実行された場合を想定する。 In this example, it is assumed that a certain system is implemented by multiple computers and a kernel panic is executed in one of them.
この場合、まず、カーネルパニックを実行したカーネルがダンプ採取カーネルを起動させる(ステップP1)。 In this case, first, the kernel that executed the kernel panic activates the dump collection kernel (step P1).
次に、ダンプ採取カーネルが、CPUコアレジスタ情報とメモリ情報とを含むダンプファイルを生成する(ステップP2)。CPUコアレジスタ情報は、カーネルパニックを実行する直前にカーネルが参照していたレジスタの内容である。また、メモリ情報は、カーネルパニックを実行する直前にカーネルが参照していたメモリの領域の内容である。 Next, the dump collection kernel generates a dump file containing CPU core register information and memory information (step P2). The CPU core register information is the contents of the registers that the kernel was referencing just before executing the kernel panic. The memory information is the contents of the memory area referenced by the kernel immediately before executing the kernel panic.
ダンプファイルの生成が終了するとファームウェアが起動し(ステップP3)、当該ファームウェアがカーネルを再起動する(ステップP4)。 When the generation of the dump file is completed, the firmware is activated (step P3), and the firmware reboots the kernel (step P4).
その後に、再起動したカーネルが、種々のサービスプログラムを起動する(P5)。そのようなサービスプログラムとしてはDHCP(Dynamic Host Configuration Protocol)のクライアントデーモンである「dhcpd」等がある。 After that, the rebooted kernel starts various service programs (P5). Such service programs include "dhcpd", which is a DHCP (Dynamic Host Configuration Protocol) client daemon.
これらのサービスプログラムが起動するとコンピュータにおいて種々のアプリケーションプログラムを実行できるようになり、当該コンピュータを含むシステムを運用することができるようになる。 When these service programs are activated, various application programs can be executed on the computer, and the system including the computer can be operated.
しかしながら、この方法ではステップP2においてダンプファイルを生成するまでステップP4でカーネルを再起動することができず、システムの運用が再開できるまで時間を要してしまう。 However, in this method, the kernel cannot be restarted in step P4 until the dump file is generated in step P2, and it takes time to resume system operation.
特に、カーネルの高機能化に伴って採取対象のメモリの領域が多くなると、ステップP2におけるダンプファイルの生成に長時間を要してしまい、システムの運用再開に更に長時間を要してしまう。 In particular, if the memory area to be collected increases as the kernel becomes more sophisticated, it will take a long time to generate the dump file in step P2, and it will take a longer time to resume the operation of the system.
(本実施形態)
図2は、本実施形態に係る情報処理装置のハードウェア構成図である。
(this embodiment)
FIG. 2 is a hardware configuration diagram of the information processing apparatus according to this embodiment.
情報処理装置10は、物理マシンや仮想マシン等のコンピュータであって、記憶装置10a、メモリ10b、CPU10c、通信インターフェース10d、及び媒体読取装置10eを備える。これらの各部は、バス10gにより相互に接続される。
The
このうち、記憶装置10aは、HDD(Hard Disk Drive)やSSD(Solid State Drive)等の不揮発性のストレージであって、本実施形態に係る情報処理プログラム11を記憶する。情報処理プログラム11は、ファームウェア12とOS13とを含むプログラムである。
Among these, the
なお、情報処理プログラム11コンピュータが読み取り可能な記録媒体10fに記録し、媒体読取装置10eを介してCPU10cにその情報処理プログラム11を読み取らせるようにしてもよい。
The
そのような記録媒体10fとしては、例えばCD-ROM (Compact Disc - Read Only Memory)、DVD (Digital Versatile Disc)、及びUSB (Universal Serial Bus)メモリ等の物理的な可搬型記録媒体がある。また、フラッシュメモリ等の半導体メモリやハードディスクドライブを記録媒体10fとして使用してもよい。これらの記録媒体10fは、物理的な形態を持たない搬送波のような一時的な媒体ではない。
Examples of such a
更に、公衆回線、インターネット、及びLAN(Local Area Network)等に接続された装置に情報処理プログラム11を記憶させてもよい。その場合は、CPU10cがその情報処理プログラム11を読み出して実行すればよい。
Furthermore, the
一方、メモリ10bは、DRAM(Dynamic Random Access Memory)等のようにデータを一時的に記憶するハードウェアである。
On the other hand, the
CPU10cは、情報処理装置10の各部を制御するプロセッサである。なお、CPU10cに代えてGPU(Graphical Processing Unit)を採用してもよい。また、CPU10cは、メモリ10bと協働して情報処理プログラム11を実行する。
The
更に、通信インターフェース10dは、情報処理装置10をインターネットやLAN等のネットワークに接続するためのNIC(Network Interface Card)等のハードウェアである。
Furthermore, the
媒体読取装置10eは、記録媒体10fを読み取るためのCDドライブ、DVDドライブ、及びUSBインターフェース等のハードウェアである。
The
図3は、OS13に含まれる各プログラムの模式図である。OS13は、例えばLinux(登録商標)であって、カーネル15、ダンプ採取カーネル16、サービスプログラム17、及び管理プログラム18の各プログラムを備える。
FIG. 3 is a schematic diagram of each program included in the
このうち、カーネル15は、プロセス管理機能、メモリ管理機能、及びデバイス管理機能等を備えたOS13の中核的なプログラムである。ダンプ採取カーネル16は、カーネル15がカーネルパニックを実行したときにダンプ情報の採取を行うプログラムである。
Among them, the
また、サービスプログラム17は、カーネル15とは異なるプログラムであって、バックグラウンドで動作する「dhcpd」等のデーモンプログラムである。そして、管理プログラム18は、これらのサービスプログラム17を起動するための「systemd」等のプログラムである。
The
図4は、メモリ10bの模式図である。図4に示すように、メモリ10bには、ファームウェア領域21、共通領域22、カーネル領域23、及びダンプ採取カーネル領域24の各領域が割り当てられる。
FIG. 4 is a schematic diagram of the
このうち、ファームウェア領域21は、ファームウェア12に割り当てられた領域である。また、共通領域22は、第4の領域の一例であって、ファームウェア12とカーネル15の各々から書き込みと読み込みが可能な領域である。
Among them, the
カーネル領域23は、カーネル15に割り当てられた領域である。そして、ダンプ採取カーネル領域24は、ダンプ採取カーネル16に割り当てられた領域である。
A
図5は、情報処理装置10の機能構成図である。図5に示すように、情報処理装置10は、前述の記憶装置10aとメモリ10bの他に制御部31を備える。制御部31は、メモリ10bとCPU10cとが協働して情報処理プログラム11を実行することにより実現される処理部であって、情報処理装置10の各部を制御する。
FIG. 5 is a functional configuration diagram of the
一例として、制御部31は、カーネル起動部32、生成部33、サービスプログラム起動部34、割当部35、格納部36、取得部37、メモリ管理部38、及び判断部39を備える。
As an example, the
このうち、カーネル起動部32は、ファームウェア12によって実現される処理部であり、カーネルパニックを実行したカーネル15を再起動させる。
Among them, the kernel booting unit 32 is a processing unit realized by the
生成部33は、ダンプ採取カーネル16によって実現される処理部であり、カーネル15がカーネルパニックを実行したときにダンプファイル40を生成してそれを記憶装置10aに格納する。
The
サービスプログラム起動部34は、管理プログラム18によって実現される処理部であり、再起動したカーネル15の上で各サービスプログラム17を起動する。
The service
また、割当部35は、ファームウェア12によって実現される処理部であり、メモリ10bに共通領域22を割り当てる。
The
格納部36は、ダンプ採取カーネル16によって実現される処理部であって、カーネルパニックを実行した時点におけるメモリ10bのチャンクのアドレスとサイズとを含むダンプ一次情報ファイルを共通領域22に格納する。なお、チャンクは、カーネルパニックを実行した時点でカーネル15が使用していたメモリ10bの領域である。例えば、カーネル15は、カーネルパニックを実行する前に、malloc等の関数によってメモリ10bに個々のチャンクを確保する。
The
取得部37は、ファームウェア12によって実現される処理部であって、共通領域22に格納された後述のダンプ一次情報ファイルからチャンクのアドレスとサイズとを取得する。
The
メモリ管理部38は、ファームウェア12によって実現される処理部であって、メモリ10bのチャンクを読み取り専用に設定する。
The
判断部39は、ダンプ採取カーネル16によって実現される処理部であり、カーネルパニックを実行した後にカーネル15を再起動するのに要する空き領域がメモリ10bに存在するかを判定する。
The
次に、本実施形態に係る情報処理方法について説明する。 Next, an information processing method according to this embodiment will be described.
図6は、OS13を起動するときのフローチャートである。まず、割当部35が、メモリ10bに共通領域22を割り当てる(ステップS11)。
FIG. 6 is a flow chart when the
次いで、ファームウェア12が、共通領域22の先頭アドレスをEFI(Extensible Firmware Interface)変数に格納する(ステップS12)。EFI変数は、ファームウェア12とダンプ採取カーネル16との間で受け渡しが行われる変数である。
Next, the
次に、カーネル起動部32がカーネル15を起動する(ステップS13)。この後は、サービスプログラム起動部34が各サービスプログラム17を起動し、OS13の起動が完了することになる。
Next, the kernel activation unit 32 activates the kernel 15 (step S13). After that, the service
次に、このようにOS13を起動した後に、カーネル15がカーネルパニックを実行したときの処理の流れについて説明する。
Next, the flow of processing when the
図7は、カーネル15がカーネルパニックを実行したときの本実施形態に係る情報処理方法のフローチャートである。
FIG. 7 is a flowchart of the information processing method according to this embodiment when the
まず、カーネルパニックを実行したカーネル15がダンプ採取カーネル16を起動する(ステップS21)。
First, the
次に、ダンプ採取カーネル16が、ファームウェア12が保持しているEFI変数を参照することにより、共通領域22の先頭アドレスを取得する(ステップS22)。
Next, the
次のステップS23、S24について図8を参照して説明する。図8は、本実施形態に係る情報処理方法の模式図である。 Next steps S23 and S24 will be described with reference to FIG. FIG. 8 is a schematic diagram of an information processing method according to this embodiment.
まず、ステップS23において、ダンプ採取カーネル16が、カーネルパニックを実行したカーネル15の仮想メモリ42にあるVMCORE43の内容を読み取る。VMCORE43は、ELF (Executable and Linkable Format) Core形式のファイルとして読み取り可能な疑似ファイルであり、ダンプ情報45を格納した疑似ファイルである。
First, in step S23, the
図9は、ダンプ情報45の模式図である。図9に示すように、ダンプ情報45は、ELFヘッダ45a、第1のヘッダ45b、及び第2のヘッダ45cを備えた情報である。
FIG. 9 is a schematic diagram of the
このうち、ELFヘッダ45aは、CPU10cのアーキテクチャを特定する変数等を含む構造体である。また、第1のヘッダ45bは、CPU10cに含まれる複数のコアの各々のレジスタを指すポインタである。以下では、i番目のコアのレジスタに格納されている情報をcore[i]レジスタ情報と呼ぶ。
Of these, the
そして、第2のヘッダ45cは、カーネルパニックを実行した時点でカーネル15が使用していたメモリ10b内のチャンクの先頭アドレスを指すポインタである。
The
図10は、ELFヘッダ45aの模式図である。図10に示すように、ELFヘッダ45aは、プログラムヘッダテーブル45eの先頭アドレスを格納した変数「e_phoff」と、プログラムヘッダ45fの個数を示す変数「e_phnum」とを有する構造体である。
FIG. 10 is a schematic diagram of the
プログラムヘッダテーブル45eは、変数「p_paddr」と変数「p_memsz」とを含む複数のプログラムヘッダ45fのテーブルである。このうち、変数「p_paddr」は、カーネルパニックを実行した時点でカーネル15に割り当てられていたチャンク10yの先頭アドレスを示す変数である。また、変数「p_memsz」は、そのチャンク10yのサイズ(byte)を示す変数である。なお、チャンク10yは第1の領域の一例である。
The program header table 45e is a table of a plurality of
ステップS23においては、ダンプ採取カーネル16が、各変数「p_paddr」、「p_memsz」を参照することにより、各チャンク10yの先頭アドレスとそのサイズとを取得する。更に、ダンプ採取カーネル16は、前述の第1のヘッダ45bと第2のヘッダ45cの各々も取得する。
In step S23, the
再び図8を参照する。次に、ステップS24に移り、格納部36が、ステップS23で取得した各情報を含むダンプ一次情報ファイル47を共通領域22に格納する。そのダンプ一次情報ファイル47には、第1のヘッダ45b、プログラムヘッダテーブル45e、及びELFヘッダ45aが含まれる。
Refer to FIG. 8 again. Next, in step S24, the
なお、図8に示すように、チャンク10yは仮想メモリ42におけるページに対応しており、仮想メモリ42の全領域は全てのチャンク10yを合わせた領域に等しい。そして、カーネル領域23においてチャンク10yに属さない領域は、カーネル15が使用していない空き領域10xである。
Incidentally, as shown in FIG. 8, the
再び図7を参照する。次に、判断部39が、カーネル15を再起動するのに必要な連続した空き領域10xがメモリ10bに存在するかを判断する(ステップS25)。
Refer to FIG. 7 again. Next, the
図8の例では、複数の空き領域10xのうちで最大のサイズを有する領域が、カーネル15を再起動するのに足りるかを判断部39が判断する。一例として、判断部39は、共通領域22にあるダンプ一次情報ファイル47の各変数「p_paddr」、「p_memsz」に基づいて各チャンク10yの先頭アドレスと大きさとを特定し、どのチャンク10yにも属さない各空き領域10xの大きさを特定する。そして、判断部39は、特定した各空き領域10xのサイズのうちの最大値が、カーネル15を再起動するのに要するサイズよりも大きいかを判断する。なお、カーネル15を再起動するのに要するサイズは、例えばユーザが予め調べておき、記憶装置10aに格納しておけばよい。
In the example of FIG. 8, the
また、個々の空き領域10xは第2の領域の一例であり、そのうちで最大のサイズを有する空き領域10xは第3の領域の一例である。
Also, each
この判断が肯定された場合にはファームウェア12の処理に移る(ステップS26)。一方、ステップS25の判断が否定された場合には、各チャンク10yの内容を含むダンプファイル40を生成して各チャンク10yを解放した後でないとカーネル15を再起動できない。
If this determination is affirmative, the process proceeds to the firmware 12 (step S26). On the other hand, if the determination in step S25 is negative, the
よって、ステップS25の判断が否定された場合には、ステップS27に移り、生成部33がダンプファイル40を生成した後にカーネル起動部32がカーネル15を再起動して処理を終える。
Therefore, when the determination in step S25 is negative, the process moves to step S27, and after the
これによれば、ステップS24において格納部36がダンプ一次情報ファイル47を共通領域22に格納する。そのため、ステップS25において、判断部39が、ダンプ一次情報ファイル47の各変数「p_paddr」、「p_memsz」に基づいて最大のサイズを有する空き領域10xを特定し、当該サイズがカーネル15を再起動するのに足りるかを判断できる。
According to this, the
次に、ステップS26のファームウェア12の処理について説明する。
Next, the processing of the
図11は、ステップS26のファームウェア12の処理のフローチャートである。
FIG. 11 is a flow chart of the processing of the
まず、メモリ管理部38が、全てのチャンク10yを読み取り専用に設定する(ステップS31)。
First, the
図12は、本ステップの模式図である。この例では、メモリ管理部38は、共通領域22に格納されているダンプ一次情報ファイル47から各チャンク10yの先頭アドレスとサイズを特定する。そして、メモリ管理部38は、EFIのメモリマップにおいて当該チャンク10yに対応した属性に「EFI_MEMORY_RO」を設定することにより、当該チャンク10yを読み取り専用にする。
FIG. 12 is a schematic diagram of this step. In this example, the
これにより、ダンプファイル40を生成する前にチャンク10yが上書きされるのを防止することができるため、チャンク10yの内容を含むダンプファイル40を生成することができる。
Since this prevents the
再び図11を参照する。次に、カーネル起動部32が、情報処理装置10の電源をオフせずに、パニックを実行したカーネル15を再起動させる(ステップS32)。以上により、ファームウェア12が実行する基本的な処理を終える。
Please refer to FIG. 11 again. Next, the kernel booting unit 32 reboots the
次に、ステップS32でカーネル15が再起動した後の処理について説明する。
Next, processing after the
図13は、カーネル15が再起動した後の処理のフローチャートである。まず、再起動したカーネル15が、メモリ10bを管理する構造体に含まれるReversedビットのうち、各チャンク10yに対応したReversedビットをオンにする。Reversedビットは、チャンク10yを読み取り専用にするかを決めるビットであり、それをオンにすることによりチャンク10yが読み取り専用となる。
FIG. 13 is a flowchart of processing after the
この後は、ダンプ採取処理Q1とサービスプログラム17の起動処理Q2とが並行して行われる。
Thereafter, the dump collection process Q1 and the
最初にダンプ採取処理Q1について説明する。まず、再起動したカーネル15が、ダンプ採取カーネル16を起動させる(ステップS42)。
First, the dump collection process Q1 will be described. First, the rebooted
次に、生成部33が、内容をまだ取得していないチャンク10yがメモリ10bに存在するかを判断する(ステップS43)。
Next, the
この判断が肯定された場合にはステップS44に移る。ステップS44においては、生成部33がチャンク10yの内容を取得する。一例として、生成部33は、共通領域22にあるダンプ一次情報ファイル47に含まれる各変数「p_paddr」、「p_memsz」からチャンク10yの先頭アドレスとそのサイズとを特定する。そして、生成部33は、メモリ10bにおいて特定した先頭アドレスにアクセスし、その先頭アドレスから特定したサイズにある領域に格納されている内容を取得する。
If this determination is affirmative, the process proceeds to step S44. In step S44, the
次に、生成部33が、ステップS44で内容を取得したチャンク10yに対応したReversedビットをオフにする(ステップS45)。これにより、チャンク10yが解放されて書き込み可能となる。その後、ステップS43に戻る。
Next, the
一方、ステップS43の判断が否定された場合にはステップS46に移る。ステップS46においては、生成部33が、複数のチャンク10yの各々の内容とダンプ一次情報ファイル47に含まれる内容とを含むダンプファイル40を生成する。これによりダンプ採取処理Q1を終える。
On the other hand, if the determination in step S43 is negative, the process proceeds to step S46. In step S<b>46 , the
図14は、ステップS46で生成されるダンプファイル40の模式図である。
FIG. 14 is a schematic diagram of the
図14に示すように、ダンプファイル40には、ダンプ一次情報ファイル47におけるELFヘッダ45a、第1のヘッダ45b、及び第2のヘッダ45cの他に、ステップS44で取得したチャンク10yの内容52が含まれる。
As shown in FIG. 14, the
更に、生成部33は、第1のヘッダ45bが指す各レジスタを参照することにより、これらのレジスタに格納されている情報であるCPUコアレジスタ情報51もダンプファイル40に格納する。
Further, the
再び図13を参照する。次に、サービスプログラム17の起動処理Q2について説明する。
Refer to FIG. 13 again. Next, the activation process Q2 of the
まず、カーネル15が管理プログラム18を起動した後、サービスプログラム起動部34が未起動のサービスプログラム17があるかを判定する(ステップS47)。Linux(登録商標)においてはカーネル15の起動後に起動すべきサービスプログラム17とその起動順序が定められており、これらのサービスプログラム17が起動済かを本ステップでサービスプログラム起動部34が判断することになる。
First, after the
この判断が肯定された場合にはステップS48に移る。ステップS48においては、サービスプログラム起動部34が、サービスプログラム17を起動するのに必要なサイズを備えた空き領域10xがメモリ10bに存在するかを判断する。
If this determination is affirmative, the process proceeds to step S48. In step S48, the service
図15は、ステップS48の判断においてサービスプログラム起動部34が使用する管理テーブル53の模式図である。
FIG. 15 is a schematic diagram of the management table 53 used by the service
管理テーブル53は、サービスプログラム17の起動順序、プログラム名、及び起動に要するメモリ量を対応付けたテーブルである。起動順序とプログラム名はLinux(登録商標)において予め定められているが、メモリ量については例えばユーザが予め調査しておく。そして、ユーザが管理テーブル53を作成し、例えば予め記憶装置10aに格納しておく。
The management table 53 is a table in which the order of activation of the
サービスプログラム起動部34は、この管理テーブル53を参照することにより、起動対象のサービスプログラム17のメモリ量よりもサイズが大きい空き領域10xが存在するかをステップS48で判断する。
The service
例えば、サービスプログラム起動部34は、共通領域22にあるダンプ一次情報ファイル47に含まれる各変数「p_paddr」、「p_memsz」からチャンク10yの先頭アドレスとそのサイズとを取得する。そして、サービスプログラム起動部34は、これらの先頭アドレスとサイズに基づいて複数のチャンク10yのいずれにも属さない領域である空き領域10xのサイズを特定し、そのサイズと管理テーブル53のメモリ量との大小を比較する。
For example, the service
再び図13を参照する。ステップS48の判断が否定された場合にはステップS50に移る。ステップS50においては、サービスプログラム起動部34は、生成部33がステップS45においてチャンク10yを解放するのを待つ。その後、ステップS48に戻る。
Refer to FIG. 13 again. If the determination in step S48 is negative, the process proceeds to step S50. In step S50, the service
一方、ステップS48の判断が肯定された場合は、サービスプログラム起動部34がサービスプログラム17に空き領域10xを割り当てることにより当該サービスプログラム17を起動し(ステップS49)、ステップS47に戻る。
On the other hand, if the determination in step S48 is affirmative, the service
そして、全てのサービスプログラム17が起動してステップS47の判断が否定された場合に起動処理Q2を終える。
Then, when all the
以上により、ダンプ採取処理Q1とサービスプログラムの起動処理Q2の各々の基本的な処理を終える。 Thus, the basic processes of the dump collection process Q1 and the service program activation process Q2 are completed.
上記した本実施形態によれば、ステップS49において、サービスプログラム起動部34が、カーネル15が使用していたチャンク10yとは異なる空き領域10xにサービスプログラム17を割り当てて起動する。
According to the present embodiment described above, in step S49, the service
そのため、チャンク10yの内容を取得するダンプ採取処理Q1と、サービスプログラム17の起動処理Q2とを並行して行うことができる。これにより、ダンプ採取処理Q1が終了した後に起動処理Q2を実行する場合と比較して、カーネル15がカーネルパニックを実行してから全てのサービスプログラム17が起動するまでの時間を短くすることができる。その結果、カーネル15がカーネルパニックを実行した場合でも情報処理装置10を速やかに復旧することができ、情報処理装置10を含むシステムを利用者がすぐさま使用することが可能となる。
Therefore, the dump collection process Q1 for acquiring the contents of the
また、この例では、チャンク10yが解放されるのをサービスプログラム起動部34がステップS50において待つ。そのため、チャンク10yが解放されたことで生じた空き領域10xをサービスプログラム起動部34がサービスプログラム17に割り当てることで、ステップS49において各サービスプログラム17を順次起動できる。
Also, in this example, the service
また、カーネル15を再起動するのに要する連続した空き領域10xがメモリ10bにない場合には、ダンプ採取処理Q1と起動処理Q2とを並行して実行せず、ダンプファイル40の生成後にカーネル15を再起動する(ステップS27)。これにより、カーネル15を再起動するのに要する連続した空き領域10xがメモリ10bにあるか否かを問わずにダンプファイル40を生成することができる。
If the
10…情報処理装置、10a…記憶装置、10b…メモリ、10d…通信インターフェース、10e…媒体読取装置、10f…記録媒体、10g…バス、10x…空き領域、10y…チャンク、11…情報処理プログラム、12…ファームウェア、15…カーネル、16…ダンプ採取カーネル、17…サービスプログラム、18…管理プログラム、21…ファームウェア領域、22…共通領域、23…カーネル領域、24…ダンプ採取カーネル領域、31…制御部、32…カーネル起動部、33…生成部、34…サービスプログラム起動部、35…割当部、36…格納部、37…取得部、38…メモリ管理部、39…判断部、40…ダンプファイル、42…仮想メモリ、45…ダンプ情報、45a…ELFヘッダ、45b…第1のヘッダ、45c…第2のヘッダ、45e…プログラムヘッダテーブル、45f…プログラムヘッダ、47…ダンプ一次情報ファイル、51…CPUコアレジスタ情報、53…管理テーブル。
Claims (8)
前記カーネルパニックの実行時に前記カーネルが使用していたメモリの第1の領域の内容を取得して、前記内容を含むダンプファイルを生成する生成部と、
前記メモリにおいて前記第1の領域とは異なる第2の領域に、前記カーネルとは異なるプログラムを割り当てて、再起動した前記カーネルの上で前記プログラムを起動するプログラム起動部と、
を有することを特徴とする情報処理装置。 a kernel startup unit that restarts the kernel that executed the kernel panic;
a generating unit that acquires the contents of a first area of memory used by the kernel when the kernel panic is executed and generates a dump file containing the contents;
a program activation unit that allocates a program different from the kernel to a second area different from the first area in the memory and activates the program on the rebooted kernel;
An information processing device comprising:
前記プログラム起動部は、前記プログラムを起動するのに前記第2の領域のサイズが足りない場合には、前記生成部が前記第1の領域を解放するのを待つことを特徴とする請求項1に記載の情報処理装置。 The generation unit releases the first area after acquiring the content,
2. The program activation unit waits for the generation unit to release the first area when the size of the second area is insufficient to activate the program. The information processing device according to .
前記第4の領域に格納された前記サイズと前記先頭アドレスとに基づいて前記第3の領域が前記メモリに存在するかを判断する判断部とを更に有することを特徴とする請求項4に記載の情報処理装置。 a storage unit that stores the size and start address of the first area in a fourth area of the memory that is different from each of the first area and the second area;
5. The apparatus according to claim 4, further comprising a judgment unit for judging whether said third area exists in said memory based on said size and said start address stored in said fourth area. information processing equipment.
前記カーネルパニックの実行時に前記カーネルが使用していたメモリの第1の領域の内容を取得して、前記内容を含むダンプファイルを生成し、
前記メモリにおいて前記第1の領域とは異なる第2の領域に、前記カーネルとは異なるプログラムを割り当てて、再起動した前記カーネルの上で前記プログラムを起動する、
処理をコンピュータに実行させるための情報処理プログラム。 reboot the kernel that ran the kernel panic,
acquiring the contents of a first area of memory used by the kernel when the kernel panic was executed, and generating a dump file containing the contents;
assigning a program different from the kernel to a second area different from the first area in the memory, and starting the program on the rebooted kernel;
An information processing program that causes a computer to execute processing.
カーネルパニックを実行したカーネルを再起動し、
前記カーネルパニックの実行時に前記カーネルが使用していたメモリの第1の領域の内容を取得して、前記内容を含むダンプファイルを生成し、
前記メモリにおいて前記第1の領域とは異なる第2の領域に、前記カーネルとは異なるプログラムを割り当てて、再起動した前記カーネルの上で前記プログラムを起動する、
処理を実行することを特徴とする情報処理方法。
the computer
reboot the kernel that ran the kernel panic,
acquiring the contents of a first area of memory used by the kernel when the kernel panic was executed, and generating a dump file containing the contents;
assigning a program different from the kernel to a second area different from the first area in the memory, and starting the program on the rebooted kernel;
An information processing method characterized by executing processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021080755A JP2022174793A (en) | 2021-05-12 | 2021-05-12 | Information processing apparatus, information processing program, and information processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021080755A JP2022174793A (en) | 2021-05-12 | 2021-05-12 | Information processing apparatus, information processing program, and information processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022174793A true JP2022174793A (en) | 2022-11-25 |
Family
ID=84145147
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021080755A Pending JP2022174793A (en) | 2021-05-12 | 2021-05-12 | Information processing apparatus, information processing program, and information processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022174793A (en) |
-
2021
- 2021-05-12 JP JP2021080755A patent/JP2022174793A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3764237B1 (en) | System startup method and apparatus, electronic device and storage medium | |
US9870288B2 (en) | Container-based processing method, apparatus, and system | |
US9507672B2 (en) | Method, apparatus, and system for generating and recovering memory snapshot of virtual machine | |
KR101201186B1 (en) | Memory dump generation with quick reboot | |
JP5715566B2 (en) | Cache data and metadata management | |
US20020078338A1 (en) | Method and apparatus for fast computer initialization | |
JP5786955B2 (en) | Memory degeneration method and information processing apparatus | |
US9298472B2 (en) | High-speed restart method, information processing device, and program | |
JP2012508932A (en) | Manage cache data and metadata | |
CN110704161B (en) | Virtual machine creation method and device and computer equipment | |
KR20140147017A (en) | System and method for recovering from an unexpected shutdown in a write-back caching environment | |
US11640244B2 (en) | Intelligent block deallocation verification | |
CN106776133A (en) | A kind of system and method for operating system recovery | |
JP2007133544A (en) | Failure information analysis method and its implementation device | |
KR101303535B1 (en) | Memory Disk Composition Method AND APPARaTUS USING MAIN MEMORY | |
CN113127263B (en) | Kernel crash recovery method, device, equipment and storage medium | |
US20190324868A1 (en) | Backup portion of persistent memory | |
TW202207037A (en) | Memory storage device | |
US7234039B1 (en) | Method, system, and apparatus for determining the physical memory address of an allocated and locked memory buffer | |
JP2022174793A (en) | Information processing apparatus, information processing program, and information processing method | |
WO2014024279A1 (en) | Memory failure recovery device, method, and program | |
CN112000291A (en) | System disk partitioning method and related device | |
JP6221702B2 (en) | Information processing apparatus, information processing method, and information processing program | |
JP2010282645A (en) | Linux program start-up system | |
JP2016170463A (en) | Information processing device, kernel dump method, and kernel dump program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240208 |