JP2009151440A - Program hang-up detection method and computer device adopting the same method - Google Patents

Program hang-up detection method and computer device adopting the same method Download PDF

Info

Publication number
JP2009151440A
JP2009151440A JP2007327226A JP2007327226A JP2009151440A JP 2009151440 A JP2009151440 A JP 2009151440A JP 2007327226 A JP2007327226 A JP 2007327226A JP 2007327226 A JP2007327226 A JP 2007327226A JP 2009151440 A JP2009151440 A JP 2009151440A
Authority
JP
Japan
Prior art keywords
hang
application
wdt
driver
program
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.)
Withdrawn
Application number
JP2007327226A
Other languages
Japanese (ja)
Inventor
Hiroki Konno
廣毅 今野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2007327226A priority Critical patent/JP2009151440A/en
Publication of JP2009151440A publication Critical patent/JP2009151440A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To achieve highly reliable program hang-up detection by performing WDT clear without fail as long as a driver under the control of an MOS and an OS normally operates, in a program hang-up detection method. <P>SOLUTION: A computer device includes: an interrupt receiving means for receiving the system clock interrupt of a processor; a driver keep-alive confirmation means for generating a WDT keep-alive confirmation request on the basis of the received system clock interrupt; and a WDT clear requesting means for receiving the WDT keep-alive confirmation request, and for making a request to clear a watchdog timer in the processor. The clear of the watchdog timer is stopped according to the stop of the operation of the driver keep-alive confirmation means or the WDT clear request means due to the hang-up of the processing program of the operating system or a driver program under the control of the operating system, and the processor is reset according to the threshold excess of the watchdog timer. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、プログラムのハングを検出するプログラムハング検出方法及びそれを適用したコンピュータ装置に関する。   The present invention relates to a program hang detection method for detecting a program hang and a computer apparatus to which the program hang detection method is applied.

図1は、従来のプログラムハング検出方法を用いたコンピュータ装置の一例の構成図を示す。アプリケーションプログラム(以下、「アプリ」と略す)1A,1B,1Cは、システム監視アプリ2によって監視され、システム監視アプリ2は各アプリ1A,1B,1Cの生存通知としてのWDT(Watch Doc Timer)クリア要求をWDTドライバ3に供給する。   FIG. 1 is a block diagram showing an example of a computer apparatus using a conventional program hang detection method. Application programs (hereinafter abbreviated as “applications”) 1A, 1B, 1C are monitored by the system monitoring application 2, and the system monitoring application 2 clears WDT (Watch Doc Timer) as a survival notification of each application 1A, 1B, 1C. The request is supplied to the WDT driver 3.

また、OS(Operating System)5内のOS処理プログラム(以下、「OS処理」という)5A,5B,5Cそれぞれも生存通知としてのWDTクリア要求をWDTドライバ3に供給し、OS配下のドライバプログラム(以下、「ドライバ」という)6A,6B,6Cそれぞれも生存通知としてのWDTクリア要求をWDTドライバ3に供給する。   In addition, each of OS processing programs (hereinafter referred to as “OS processing”) 5A, 5B, and 5C in the OS (Operating System) 5 also supplies a WDT clear request as a life notification to the WDT driver 3, and a driver program under the OS ( Each of 6A, 6B, and 6C (hereinafter referred to as “driver”) also supplies a WDT clear request as a survival notification to the WDT driver 3.

WDTドライバ3はWDTクリア要求を供給されると、プロセッサ7内のWDT8に対しWDTクリアを行う。WDT8は、所定時間WDTクリアが行われない場合にはカウンタ満了となってWDTリセット信号を発生し、CPUコア9をリセットする。   When the WDT driver 3 is supplied with the WDT clear request, the WDT driver 3 performs WDT clear on the WDT 8 in the processor 7. If the WDT 8 is not cleared for a predetermined time, the WDT 8 expires the counter, generates a WDT reset signal, and resets the CPU core 9.

なお、特許文献1には、監視プログラムの異常を検出するソフトウェアWDTと、ソフトウェアWDTの異常を検出するハードウェアWDTを有することが記載されている。   Patent Document 1 describes that software WDT for detecting an abnormality of a monitoring program and hardware WDT for detecting an abnormality of software WDT are described.

特許文献2には、低レベルタスクのフラグ操作を高レベルタスクが監視し、中レベルタスクの異常を検出することが記載されている。   Patent Document 2 describes that a high-level task monitors a flag operation of a low-level task and detects an abnormality in a middle-level task.

特許文献3には、一定時間WDTにアクセスがない場合に割り込みを発生し、更に一定時間WDTにアクセスがない場合にはリセット信号を発生することが記載されている。   Patent Document 3 describes that an interrupt is generated when there is no access during a certain period of time WDT, and a reset signal is generated when there is no access during a certain period of time WDT.

特許文献4には、異常個所を特定するためにタスク番号と実行ステップ番号をエラーログとして格納することが記載されている。   Patent Document 4 describes storing a task number and an execution step number as an error log in order to identify an abnormal part.

特許文献5には、監視ソフトウェアがアプリの状態を監視し、異常時にアプリの再起動を行うことが記載されている。   Patent Document 5 describes that monitoring software monitors the state of an application and restarts the application when an abnormality occurs.

特許文献6には、周期的に起動される監視タスクが不定期に動作するタスクを監視することが記載されている。
特許2870250号公報 特開昭63−280345号公報 特開平1−154258号公報 特開2004−355384号公報 特開2002−149437号公報 特開2006−227962号公報
Patent Document 6 describes that a periodically started monitoring task monitors a task that operates irregularly.
Japanese Patent No. 2870250 JP-A 63-280345 JP-A-1-154258 JP 2004-355384 A JP 2002-149437 A JP 2006-227862 A

図1に示す従来のプログラムハング検出方法では、それぞれのOS処理5A,5B,5Cやドライバ6A,6B,6Cが必要と考えるときにWDTドライバ3に対しWDTクリア要求を出している。   In the conventional program hang detection method shown in FIG. 1, a WDT clear request is issued to the WDT driver 3 when each OS processing 5A, 5B, 5C and drivers 6A, 6B, 6C are considered necessary.

ここで、図2(A)に示すように、ドライバ6Aにおけるループ処理内でデバイス操作6A−1に続けて生存通知(WDTクリア要求)6A−2を行う設定となっている場合に正常に動作していたとする。ドライバの処理変更によって、図2(B)に示すように、ループ処理内にデバイス操作6A−3が追加されると、生存通知(WDTクリア要求)6A−2のタイミングが想定した場合より遅くなり、突然WDTリセットが発動してしまい、システムの信頼性を低下させるという問題があった。   Here, as shown in FIG. 2 (A), when the setting is made to perform the survival notification (WDT clear request) 6A-2 following the device operation 6A-1 in the loop processing in the driver 6A, the device operates normally. Suppose you were. When the device operation 6A-3 is added in the loop processing due to the driver processing change, the timing of the survival notification (WDT clear request) 6A-2 becomes slower than assumed, as shown in FIG. However, there was a problem that the WDT reset was suddenly activated and the reliability of the system was lowered.

また、図3(A)に示すように、ドライバ6Bにおけるデバイス操作6B−1のループ回数が少なく生存通知が不要で正常に動作していたとする。ドライバの処理変更によって、図3(B)に示すように、ループ回数が増加した場合はループ処理に係る時間が増大して生存通知のタイミングが想定した場合より遅くなり、ループ処理内に生存通知ステップが設けられていないために、突然WDTリセットが発動してしまい、システムの信頼性を低下させるという問題があった。   Further, as shown in FIG. 3A, it is assumed that the number of loops of the device operation 6B-1 in the driver 6B is small, and that the life notification is unnecessary and the driver 6B is operating normally. As shown in FIG. 3B, when the number of loops increases due to driver processing changes, the time for loop processing increases and the timing of survival notification is slower than expected, and the survival notification is included in the loop processing. Since no step is provided, a WDT reset is suddenly activated, and there is a problem that the reliability of the system is lowered.

また、従来方法では、OS4やOS配下のドライバ5A〜5Cがハングした場合と、OS上で動作するアプリ1A〜1Cがハングした場合とでは何ら区別がなく、一律にシステムリセット(CPUコア9のリセット)を行っている。   In the conventional method, there is no distinction between the case where the OS 4 or the drivers 5A to 5C under the OS hang and the case where the applications 1A to 1C operating on the OS hang, and the system reset (CPU core 9 Reset).

このように、WDT8自身が動作できなかったカウンタ満了によってシステム例外を発生させるため、プログラムハングの被疑要因となったタスクの特定が困難であり、システムのスタックデータ等から動作していたタスクを探し、プログラムトレースで被疑要因となったタスクを探していたことから、システムの平均修理時間(MTTR)が長くなり、システムの保守性と信頼性と可用性を低下させる要因となっていた。   In this way, because the system exception is generated due to the expiration of the counter that WDT 8 itself could not operate, it is difficult to identify the task that was the suspected cause of the program hang, and the task that was operating from the system stack data etc. is searched for Since searching for a task that became a suspicious factor in the program trace, the average repair time (MTTR) of the system was increased, which caused a decrease in system maintainability, reliability, and availability.

図4に、プログラムハング発生時の処理の流れを示す。先ず、CPUコア9のスタックデータを退避し、CPUコア9のリセットを行う。こののち、退避したスタックデータを収集して原因解析を行う。これにより原因が判明すると、その部分を修正する。この場合、CPUコア9のリセットを行った後は、見た目にはCPUコア9が回復し稼働しているように見えるものの、実際の稼働は原因が判明して修正を行った後である。   FIG. 4 shows the flow of processing when a program hang occurs. First, the stack data of the CPU core 9 is saved and the CPU core 9 is reset. After that, the saved stack data is collected and the cause is analyzed. If the cause is found by this, the part is corrected. In this case, after the CPU core 9 is reset, the CPU core 9 seems to be recovered and operating, but the actual operation is after the cause has been found and corrected.

本発明は、上記の点に鑑みなされたものであり、OSとOS配下のドライバが正常に動作している限り必ずWDTクリアを行って信頼性の高いプログラムハング検出ができるプログラムハング検出方法を提供することを目的とする。   The present invention has been made in view of the above points, and provides a program hang detection method capable of reliably performing a program hang detection by surely performing WDT clear as long as the OS and the driver under the OS are operating normally. The purpose is to do.

本発明の一実施態様では、プロセッサのシステムクロック割り込みを受信する割り込み受信手段と、
受信したシステムクロック割り込みを基にWDT生存確認要求を生成するドライバ生存確認手段と、
前記WDT生存確認要求を受信して前記プロセッサ内のウォッチドッグタイマのクリア要求を行うWDTクリア要求手段とを有し、
オペレーティングシステムの処理プログラム又はオペレーティングシステム配下のドライバプログラムのハングによる前記ドライバ生存確認手段又は前記WDTクリア要求手段の動作停止で前記ウォッチドッグタイマのクリアが停止し、前記ウォッチドッグタイマの閾値超過で前記プロセッサのリセットを行う。
In one embodiment of the present invention, an interrupt receiving means for receiving a processor system clock interrupt;
A driver existence confirmation means for generating a WDT existence confirmation request based on the received system clock interrupt;
WDT clear request means for receiving the WDT survival confirmation request and performing a clear request for a watchdog timer in the processor,
The watchdog timer clearing stops when the operation of the driver existence confirmation unit or the WDT clear request unit stops due to a hang of the operating system processing program or the driver program under the operating system, and the processor exceeds the threshold value of the watchdog timer. Reset.

好ましくは、前記ドライバ生存確認手段は、受信したシステムクロック割り込みを基にカウント要求を更に生成し、
前記オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行うシステム監視手段と、
アプリケーションプログラムの初期化を行う初期化制御手段と、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に少なくとも実行中のアプリケーションプログラムの初期化を指示するアプリハング処理手段とを
有する。
Preferably, the driver existence confirmation means further generates a count request based on the received system clock interrupt,
System monitoring means for monitoring the operation of an application program above the operating system and performing a survival notification;
Initialization control means for initializing the application program;
When the count request is received, the hang counter is counted. When the survival notification is received, the count value of the hang counter is reset. When the count value of the hang counter exceeds a threshold value, the initialization control means And an application hang processing means for instructing initialization of an application program being executed at least.

本発明によれば、OSとOS配下のドライバが正常に動作している限り必ずWDTクリアを行って信頼性の高いプログラムハング検出ができる。   According to the present invention, as long as the OS and the drivers under the OS are operating normally, WDT clear is always performed and highly reliable program hang detection can be performed.

更に好ましい例では、OSより上位のアプリのハング時にはOSは動作させたままアプリだけをリセットし被疑要因タスクの特定を容易に行うことができる。   In a more preferred example, when an app higher than the OS hangs, only the app can be reset while the OS is operating, and the suspected factor task can be easily identified.

以下、図面に基づいて本発明の実施形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

<実施形態>
図5は、本発明のプログラムハング検出方法を適用したコンピュータ装置の一実施形態のハードウェア構成例を示す。同図中、CPU10,RAM11,ROM12,チップセット13それぞれは内部バス14で接続されている。チップセット13にはフラッシュメモリ15,ハードディスク装置(HDD)16及び通信回路17等の周辺装置が接続されている。
<Embodiment>
FIG. 5 shows a hardware configuration example of an embodiment of a computer apparatus to which the program hang detection method of the present invention is applied. In the figure, each of the CPU 10, RAM 11, ROM 12, and chip set 13 is connected by an internal bus 14. Peripheral devices such as a flash memory 15, a hard disk device (HDD) 16, and a communication circuit 17 are connected to the chip set 13.

ハードディスク装置16にはOS、各種ドライバ、各種アプリ等のソフトウェアが格納されており、これらのソフトウェアはハードディスク装置16からRAM11に転送されてCPU10により実行される。   The hard disk device 16 stores software such as an OS, various drivers, and various applications. These software are transferred from the hard disk device 16 to the RAM 11 and executed by the CPU 10.

図6は、本発明のプログラムハング検出方法を適用したコンピュータ装置の一実施形態の構成例を示す。図7は、図6においてOSより上位のアプリのプログラムハング検出部を抽出した構成例を示す。図8は、図6においてOS処理及びOS配下のドライバのプログラムハング検出部を抽出した構成例を示す。   FIG. 6 shows a configuration example of an embodiment of a computer apparatus to which the program hang detection method of the present invention is applied. FIG. 7 shows a configuration example in which a program hang detection unit of an application higher than the OS in FIG. 6 is extracted. FIG. 8 shows a configuration example in which the OS process and the program hang detection unit of the driver under the OS in FIG. 6 are extracted.

図6及び図7において、TIC(Time Interval Counter)割り込み受信機能部(ハンドラ)21は、プロセッサ30内のシステムタイマ33から供給されるシステムクロック割り込みを受信して、これをTICドライバ生存確認機能部22に供給する。TIC割り込み受信機能部21とTICドライバ生存確認機能部22は最も優先度の高い処理である。   6 and 7, a TIC (Time Interval Counter) interrupt receiving function unit (handler) 21 receives a system clock interrupt supplied from a system timer 33 in the processor 30 and receives it as a TIC driver existence confirmation function unit. 22 is supplied. The TIC interrupt reception function unit 21 and the TIC driver existence confirmation function unit 22 are processes with the highest priority.

TICドライバ生存確認機能部(ドライバ)22は、TIC割り込み受信機能部21からのシステムクロック割り込みを基にWDTの生存確認要求としてのデクリメント要求(所定周期の信号)を生成してアプリハングドライバ23に対して供給すると共に、生存通知としてのWDTクリア要求(例えばデクリメント要求と同一周期の信号)を生成してWDTドライバ24に対して供給する。また、TICドライバ生存確認機能部22はシステムクロックをOS40に供給する。   The TIC driver existence confirmation function unit (driver) 22 generates a decrement request (a signal with a predetermined cycle) as a WDT existence confirmation request based on the system clock interrupt from the TIC interrupt reception function unit 21 and sends it to the application hang driver 23. The WDT clear request (for example, a signal having the same cycle as the decrement request) is generated and supplied to the WDT driver 24. Further, the TIC driver existence confirmation function unit 22 supplies a system clock to the OS 40.

WDTドライバ24は、OS40内の各種OS処理41A,41B,41C等、及びOS配下のドライバ42A,42B,42C等の生存を確認するものである。ドライバ42A,42B,42C等は例えば通信回路17等の周辺装置を制御するプログラムである。WDTドライバ24はTICドライバ生存確認機能部22からWDTクリア要求を受信すると、プロセッサ30のWDT31のカウント値を初期値に設定するWDTクリア(生存通知)を行う。また、WDT31からハングアップ通知を受けると、例えば不摘発性メモリであるハードディスク装置16に割付けられたカーネルログエリア35にハング要因の書き込みを行う。   The WDT driver 24 confirms the existence of various OS processes 41A, 41B, 41C, etc. in the OS 40 and the drivers 42A, 42B, 42C, etc. under the OS. The drivers 42A, 42B, 42C and the like are programs that control peripheral devices such as the communication circuit 17, for example. When the WDT driver 24 receives the WDT clear request from the TIC driver survival confirmation function unit 22, the WDT driver 24 performs WDT clear (survival notification) for setting the count value of the WDT 31 of the processor 30 to an initial value. When a hang-up notification is received from the WDT 31, for example, the hang factor is written in the kernel log area 35 allocated to the hard disk device 16 that is an unoccupied memory.

プロセッサ30は図5のCPU10に対応している。WDT31はシステムタイマ33からのシステムクロックをカウント(カウントダウン)し、カウント値(WDT31内のWDTレジスタに格納)が0となってWDTの閾値を超過すると、WDTリセット信号をCPUコア32に供給してCPUコア32のリセットを行う。なお、カーネルログエリア35は例えば図5のハードディスク装置16に設けられている。   The processor 30 corresponds to the CPU 10 in FIG. The WDT 31 counts (counts down) the system clock from the system timer 33. When the count value (stored in the WDT register in the WDT 31) becomes 0 and exceeds the WDT threshold, a WDT reset signal is supplied to the CPU core 32. The CPU core 32 is reset. The kernel log area 35 is provided, for example, in the hard disk device 16 of FIG.

図6及び図8において、アプリハングドライバ23は、OS40より上位のアプリ50A,50B,50C等の生存を確認するものである。アプリハングドライバ23はTICドライバ生存確認機能部22からのデクリメント要求を受信するとハングカウンタ25をデクリメントする。   6 and 8, the application hang driver 23 is for confirming the survival of the applications 50 </ b> A, 50 </ b> B, 50 </ b> C, etc. higher than the OS 40. The application hang driver 23 decrements the hang counter 25 when receiving a decrement request from the TIC driver existence confirmation function unit 22.

また、OS40より上位のシステム監視機能部51からアプリ50A,50B,50C等の生存通知(カウンタクリア要求)を受信した場合にハングカウンタ25を初期値(閾値)にリセットし、また、ハングカウンタ25が閾値を超えた場合(ハングカウンタ25のカウント値が0となったとき)に閾値超過通知をハング対象アプリID(ハングアップしたアプリの識別子)と共に初期化制御アプリ52に送信するか、又は、自律リセット信号を生成してCPUコア32に送信する。   Further, when a survival notification (counter clear request) of the applications 50A, 50B, 50C, etc. is received from the system monitoring function unit 51 higher than the OS 40, the hang counter 25 is reset to the initial value (threshold value). When the threshold value exceeds the threshold value (when the count value of the hang counter 25 becomes 0), the notification of exceeding the threshold value is transmitted to the initialization control application 52 together with the hang target application ID (identifier of the hanged app), or An autonomous reset signal is generated and transmitted to the CPU core 32.

ハングカウンタ25は、RAM11上に一又は複数設けられる。例えば第1、第2、第3のハングカウンタ25a,25b,25cを設けた場合の各閾値(各閾値は時間を表す)は、次のように設定される。   One or a plurality of hang counters 25 are provided on the RAM 11. For example, each threshold value (each threshold value represents time) when the first, second, and third hang counters 25a, 25b, and 25c are provided is set as follows.

ハングカウンタ25aの閾値<ハングカウンタ25bの閾値<ハングカウンタ25cの閾値<WDTの閾値
なお、ハングカウンタ25が一つの場合、ハングカウンタ25の閾値は上記ハングカウンタ25aの閾値と同じである。
The threshold of the hang counter 25a <the threshold of the hang counter 25b <the threshold of the hang counter 25c <the threshold of WDT When the hang counter 25 is one, the threshold of the hang counter 25 is the same as the threshold of the hang counter 25a.

ハングカウンタ25a,25b,25cはシステム立ち上げ時に初期値(閾値)を設定され、アプリハングドライバ23からデクリメントされる。   The hang counters 25a, 25b, and 25c are set to initial values (threshold values) when the system is started up, and are decremented from the application hang driver 23.

アプリハングドライバ23は、ハングカウンタ25が複数の場合、ハングカウンタ25aの閾値超過通知があればハング対象のアプリ(例えば50A)だけのリセットを初期化制御アプリ52に指示し、ハング回数=1とする。なお、ハング回数はRAM11に保持され初期値は0である。ハング回数=1のときハングカウンタ25bの閾値超過通知があればハング対象のアプリが属するアプリグループ(例えば50A,50B)だけのリセットを初期化制御アプリ52に指示し、ハング回数=2とする。ハング回数=2のときハングカウンタ25cの閾値超過通知があれば自律リセット信号を生成してCPUコア32に送信する。   In the case where there are a plurality of hang counters 25, the application hang driver 23 instructs the initialization control application 52 to reset only the hang target application (for example, 50A) if the hang counter 25a is in excess of the threshold value. To do. The number of hangs is held in the RAM 11 and the initial value is 0. When the hang count = 1, if there is a threshold excess notification of the hang counter 25b, the initialization control application 52 is instructed to reset only the application group (for example, 50A, 50B) to which the hang target application belongs, and the hang count = 2. When the number of hangs = 2, if there is a threshold excess notification of the hang counter 25c, an autonomous reset signal is generated and transmitted to the CPU core 32.

なお、ハングカウンタ25が一つの場合、アプリハングドライバ23は閾値超過通知を最初に受信したとき、ハング対象のアプリ(例えば50A)のハング回数=1としてRAM11に保持し、ハング対象のアプリ(例えば50A)だけのリセットを初期化制御アプリ52に指示する。次に、アプリ50Aがハングするとハング回数=2とし、ハング対象のアプリが属するアプリグループ(例えば50A,50B)だけのリセットを初期化制御アプリ52に指示する。更に、アプリ50Aがハングするとハング回数=3とし、全てのアプリ(例えば50A,50B,50c)のリセットを初期化制御アプリ52に指示し、更に、アプリ50Aがハングするとハング回数=4とし、自律リセット信号を生成してCPUコア32に送信する構成とする。   When there is only one hang counter 25, the application hang driver 23 stores the hang target application (for example, 50A) in the RAM 11 as the number of hangs of the hang target application (for example, 50A) = 1 when the hang counter 25 is first received. The initialization control application 52 is instructed to reset only 50A). Next, when the application 50A hangs, the number of hangs is set to 2, and the initialization control application 52 is instructed to reset only the application group (for example, 50A, 50B) to which the application to be hung belongs. Further, when the application 50A hangs, the number of hangs is set to 3, and the reset control application 52 is instructed to reset all applications (for example, 50A, 50B, 50c). The reset signal is generated and transmitted to the CPU core 32.

なお、上記実施形態ではハングカウンタ25をデクリメント(ダウンカウント)しているが、インクリメント(アップカウント)して閾値超過を判定するよう構成しても良い。   In the above embodiment, the hang counter 25 is decremented (down-counted), but it may be configured to increment (up-count) and determine whether the threshold is exceeded.

システム監視アプリ51は、OS40より上位の全てのアプリ50A,50B,50Cの生存を監視し、定期的に生存通知としてのカウンタクリア要求を生成してアプリハングドライバ23に供給する。システム監視アプリ51は、OS上のアプリケーションで最も優先度が低い例えばアイドルタスクであり、CPUコア31を占有して時分割で実行されるアプリ50A,50B,50Cそれぞれが切り替わる際にカウンタクリア要求を生成する。アプリ50A,50B,50Cのいずれかが例えば無限ループに陥りハングした場合には、CPUコア32の使用権がシステム監視アプリ51(アイドルタスク)に渡らないために、システム監視アプリ51は生存通知(カウンタクリア要求)を出さなくなる。   The system monitoring application 51 monitors the survival of all the applications 50A, 50B, 50C above the OS 40, periodically generates a counter clear request as a survival notification, and supplies it to the application hang driver 23. The system monitoring application 51 is, for example, an idle task having the lowest priority among the applications on the OS, and issues a counter clear request when the applications 50A, 50B, and 50C that occupy the CPU core 31 and are executed in a time division manner are switched. Generate. If any of the applications 50A, 50B, 50C falls into an infinite loop and hangs, for example, the right to use the CPU core 32 does not pass to the system monitoring application 51 (idle task), so the system monitoring application 51 notifies the existence notification ( (Counter clear request) will not be issued.

初期化制御アプリ52は、アプリハングドライバ23からリセット対象アプリの指示を含む閾値超過通知を受信した場合、該当するアプリの初期化(リセット)を行う。   When the initialization control application 52 receives a threshold excess notification including an instruction of the reset target application from the application hang driver 23, the initialization control application 52 initializes (resets) the corresponding application.

<システム立ち上げ時>
システム立ち上げ時には、ハングカウンタ25a〜25cの初期設定、すなわち、閾値の設定を行う。これ以降、アプリハングドライバ23がハングカウンタ25a〜25cののカウントダウンを開始する。
<At system startup>
When the system is started up, the hang counters 25a to 25c are initialized, that is, a threshold value is set. Thereafter, the application hang driver 23 starts counting down the hang counters 25a to 25c.

また、システム立ち上げ時にWDT31のカウント値の初期設定、すなわち、閾値の設定を行う。これ以降、WDT31のカウントダウンが始まる。   Also, the WDT 31 count value is initially set, that is, a threshold value is set when the system is started up. Thereafter, the countdown of the WDT 31 starts.

<通常動作時OS及びOS配下のドライバのハング監視>
図9は、図6に示すコンピュータ装置の通常動作時の動作シーケンスを示す。
<Hang monitoring of OS and driver under OS during normal operation>
FIG. 9 shows an operation sequence during normal operation of the computer apparatus shown in FIG.

図9において、プロセッサ30からのシステムクロック割り込みをTIC割り込み受信機能部21で受信する(ステップS0)。TICドライバ生存確認機能部22からWDTドライバ24に対し、WDTクリア要求を出す(ステップS1)。   In FIG. 9, the TIC interrupt reception function unit 21 receives a system clock interrupt from the processor 30 (step S0). The TIC driver existence confirmation function unit 22 issues a WDT clear request to the WDT driver 24 (step S1).

WDTドライバ24は生存通知(WDTクリア要求)を受け取ると、プロセッサ30のWDT31を初期値に戻すWDTクリアを出す(ステップS3)。これにより、WDT31は初期値からカウントダウンを始める。   When receiving the survival notification (WDT clear request), the WDT driver 24 issues a WDT clear that returns the WDT 31 of the processor 30 to the initial value (step S3). As a result, the WDT 31 starts counting down from the initial value.

<通常動作時OSより上位のアプリのハング監視>
図9において、プロセッサ30からのシステムクロック割り込みをTIC割り込み受信機能部21で受信する(ステップS0)。TICドライバ生存確認機能部22からアプリハングドライバ23に対し、ハングカウンタのデクリメント要求を出す(ステップS2)。アプリハングドライバ23はアプリハング検出用のハングカウンタ25a〜25cをデクリメントする(ステップS4)。この処理はOS配下で定期的に行われる。
<Hang monitoring of apps higher than OS during normal operation>
In FIG. 9, the TIC interrupt reception function unit 21 receives a system clock interrupt from the processor 30 (step S0). The TIC driver survival confirmation function unit 22 issues a hang counter decrement request to the application hang driver 23 (step S2). The application hang driver 23 decrements the hang counters 25a to 25c for detecting application hangs (step S4). This process is periodically performed under the OS.

一方、OSより上位のシステム監視アプリ51はアプリハングドライバ23に対しOS40を介して生存通知を出す(ステップS5,S6)。アプリハングドライバ23は生存通知を受信すると、アプリハング検出用のハングカウンタ25a〜25cを初期値に戻す(ステップS7)。ハングカウンタ25a〜25cは初期値からデクリメントを始める。   On the other hand, the system monitoring application 51 higher than the OS issues a survival notification to the application hang driver 23 via the OS 40 (steps S5 and S6). When the application hang driver 23 receives the survival notification, it returns the hang counters 25a to 25c for detecting application hangs to the initial values (step S7). The hang counters 25a to 25c start to decrement from the initial value.

<OS処理及びOS配下のドライバのハング検出>
図10は、図6に示すコンピュータ装置のドライバのハング検出時の動作シーケンスを示す。
<OS processing and driver hang detection under OS>
FIG. 10 shows an operation sequence when detecting a hang of the driver of the computer apparatus shown in FIG.

図10において、OS処理41A〜41C又はOS配下で動作するドライバ42A〜42Cにおいて、例えばドライバ42Aが無限ループに陥りハングした場合(ステップS11)、CPUコア32の使用権がTIC生存確認機能22又はWDTドライバ24に渡らないことになる。なお、TIC割り込み受信機能部21までは動作する。   In FIG. 10, in the OS processing 41A to 41C or the drivers 42A to 42C operating under the OS, for example, when the driver 42A falls into an infinite loop and hangs (step S11), the right to use the CPU core 32 is the TIC survival confirmation function 22 or It does not pass to the WDT driver 24. The operation up to the TIC interrupt reception function unit 21 is also performed.

このため、WDTドライバ24は生存通知(WDTクリア要求)を受け取れなくなるか、受け取っても処理できなくなるので、プロセッサ30のWDT31のカウント値を初期値に戻すWDTクリア要求が出せなくなる。また、アプリハングドライバ23も同じ理由で動作しなくなるので、アプリハングカウンタ25a〜25cのデクリメントも停止する。また、OS配下のドライバ42A〜42C及びOS処理41A〜41Cも停止する。   For this reason, the WDT driver 24 cannot receive the survival notification (WDT clear request) or cannot process it even if it is received. Therefore, the WDT clear request for returning the count value of the WDT 31 of the processor 30 to the initial value cannot be issued. Further, since the application hang driver 23 does not operate for the same reason, the decrement of the application hang counters 25a to 25c is also stopped. Further, the drivers 42A to 42C and the OS processes 41A to 41C under the OS are also stopped.

やがてプロセッサ30の機能でWDT31のカウントダウンが進み(ステップS12)、カウント値が0になり(ステップS13)、CPUコア31に対しリセット信号が発生し、ハードウェアからのシステムリセットとなる(ステップS14)。   Eventually, the countdown of the WDT 31 proceeds by the function of the processor 30 (step S12), the count value becomes 0 (step S13), a reset signal is generated for the CPU core 31, and the system is reset from the hardware (step S14). .

このように、OS処理とOS配下のドライバが正常に動作している限り必ずWDTクリアを行って信頼性の高いプログラムハング検出ができる。   As described above, as long as the OS process and the driver under the OS are operating normally, WDT clear can be performed without fail to detect a highly reliable program hang.

OS処理やOS配下のドライバの生存通知を、OSやドライバそれぞれの処理内容に依存してWDTクリアするかしないかを決めるのではなく、一律にシステムクロックからWDTクリアを出すことで、CPUからのシステムクロックがOSやドライバには無関係に定期的にトリガを発動し、OSとドライバ処理が正常に動作している限り必ずWDTクリアのトリガが与えられ、信頼性の高いプログラムハング検出ができる。   Rather than deciding whether or not to clear the OS process and the survival notification of the driver under the OS depending on the processing contents of the OS and the driver, the WDT clear is issued from the system clock in a uniform manner. The system clock periodically triggers regardless of the OS and the driver, and as long as the OS and the driver process are operating normally, a trigger for WDT clear is always given, so that a highly reliable program hang can be detected.

<OSより上位のアプリのハング検出>
図11は、図6に示すコンピュータ装置のアプリのハング検出時の動作シーケンスを示す。
<Hang detection of apps higher than OS>
FIG. 11 shows an operation sequence at the time of detecting an application hang in the computer apparatus shown in FIG.

図11において、OS40より上位のアプリ50A〜50Cのうち、例えばアプリ50Aが無限ループに陥りハングした場合(ステップS21)、CPUコア32の使用権がシステム監視アプリ51に渡らないことになり、システム監視アプリ51からの生存通知(カウンタクリア要求)が出なくなる。   In FIG. 11, among the applications 50A to 50C higher than the OS 40, for example, when the application 50A falls into an infinite loop and hangs (step S21), the right to use the CPU core 32 is not passed to the system monitoring application 51. The survival notification (counter clear request) from the monitoring application 51 is not issued.

WDT31の閾値はハングカンウンタ25a〜25cの閾値より長い時間を設定しているのでWDT31が先に閾値超過することはない。これにより、OS処理41A〜41C又はOS配下のドライバ42A〜42Cでハングが発生しない限り、アプリハングドライバ23はTICドライバ生存確認機能部22からのデクリメント要求を受けるので、ハングカウンタ25a〜25cのデクリメントは行われ続ける(ステップS22,S23)。   Since the threshold of WDT 31 is set to be longer than the threshold of hang counters 25a to 25c, WDT 31 never exceeds the threshold first. As a result, the application hang driver 23 receives a decrement request from the TIC driver existence confirmation function unit 22 unless the hang occurs in the OS processing 41A to 41C or the drivers 42A to 42C under the OS. Is continued (steps S22 and S23).

システム監視アプリ51からの生存通知(ハングカウンタクリア要求)が出なくなることで、第1のハングカウンタ25aが閾値を超えてカウント値が0になる。これをアプリハングドライバ23が検出した場合、RAM11に保持されているOS40の管理情報から実行中もしくは実行権を保持したままのアプリ50Aを見つけ出し(ステップS24)、不摘発性メモリのカーネルログエリア35にハングしているアプリ50Aのタスク詳細情報とハング回数をセーブし(ステップS25)、初期化制御アプリ52に対して、第1のハングカンウンタ25aの閾値超過とハングしているアプリ50Aのタスク詳細情報とを通知する(ステップS26,S27)。   When the survival notification (hang counter clear request) is not issued from the system monitoring application 51, the first hang counter 25a exceeds the threshold value and the count value becomes zero. If the application hang driver 23 detects this, the application 50A being executed or holding the execution right is found from the management information of the OS 40 held in the RAM 11 (step S24), and the kernel log area 35 of the unexpected memory is detected. The task detailed information and the number of hangs of the application 50A that is hung are saved (step S25), and the threshold value of the first hang counter 25a is exceeded with respect to the initialization control application 52, and the task of the hung application 50A Detailed information is notified (steps S26 and S27).

初期化制御アプリ52は、ハングカンウンタ25aの閾値超過とハングしているアプリ50Aのタスク詳細情報を受け取り、ハングカンウンタ25aの閾値超過に該当する例えばアプリ50Aのみの再初期化を行う(ステップS28)。   The initialization control application 52 receives the detailed task information of the hang counter 25a exceeding the threshold and the hang counter 25a, and performs re-initialization of only the application 50A corresponding to the hang counter 25a exceeding the threshold (step) S28).

上記の再初期化でアプリ50Aのハングが解決した場合は、CPU使用権がシステム監視アプリ51に渡ることになるのでシステム監視アプリ51からの生存通知(ハングカウンタクリア要求)が出るようになり(ステップS29)、アプリハングドライバ23はアプリハング検出用のハングカウンタ25a〜25cを初期値に戻すので、再度監視が始まる。   When the hang of the application 50A is resolved by the above re-initialization, the CPU usage right is passed to the system monitoring application 51, so that a survival notification (hang counter clear request) is issued from the system monitoring application 51 ( In step S29), the application hang driver 23 resets the hang counters 25a to 25c for detecting application hangs to the initial values, so that monitoring starts again.

上記の再初期化でアプリ50Aのハングが解決しない場合は、CPU使用権がシステム監視アプリ51に渡らないことになるのでシステム監視アプリ51からの生存通知が出ない。   If the hang of the application 50 </ b> A is not resolved by the above re-initialization, the CPU usage right does not pass to the system monitoring application 51, so that no survival notification is issued from the system monitoring application 51.

システム監視アプリ51からの生存通知が出なくなることで、第2のハングカウンタ25bが閾値を超えてカウント値が0になる。これをアプリハングドライバ23が検出した場合、OSの管理情報から実行中もしくは実行権を保持したままのアプリ50Aを見つけ出し、カーネルログエリア35にハングしているアプリ50Aのタスク詳細情報とハング回数をセーブし、初期化制御アプリ52に対して、第2のハングカウンタ25bの閾値超過をハングしているアプリ50Aのタスク詳細情報と共に通知する。   Since the survival notification from the system monitoring application 51 is not issued, the second hang counter 25b exceeds the threshold value and the count value becomes zero. When this is detected by the application hang driver 23, the application 50A that is being executed or has the execution right held is found from the management information of the OS, and the task detailed information and the number of hangs of the application 50A that is hung in the kernel log area 35 are obtained. Save and notify the initialization control application 52 together with the task detail information of the application 50A that is hung when the second hang counter 25b exceeds the threshold value.

初期化制御アプリ52はハングカウンタ25bの閾値超過とハングしているアプリ50Aのタスク詳細情報を受け取り、ハングカンウンタ25bの閾値超過に該当する例えばアプリ50Aの属するグループのアプリ50A,50Bの再初期化を行う。   The initialization control application 52 receives the task detail information of the hang counter 25b exceeding the threshold value and the hung application 50A, and re-initializes the applications 50A and 50B of the group to which the application 50A belongs, for example, corresponding to the hang counter 25b exceeding the threshold value. To do.

この再初期化でアプリ50Aのハングが解決した場合は、CPU使用権がシステム監視アプリ51に渡ることになるのでシステム監視アプリ51からの生存通知が出るようになり、アプリハングドライバ23はアプリハング検出用のハングカウンタ25a〜25cを初期値に戻すので、再度監視が始まる。   When the hang of the application 50A is resolved by this re-initialization, the CPU usage right is passed to the system monitoring application 51, so that a survival notification is issued from the system monitoring application 51, and the application hang driver 23 sets the application hang. Since the detection hang counters 25a to 25c are returned to the initial values, monitoring starts again.

この再初期化で、アプリ50Aのハングが解決しない場合は、CPU使用権がシステム監視アプリ51に渡らないことになるのでシステム監視アプリ51からの生存通知が出ない。   If the re-initialization does not solve the hang of the application 50 </ b> A, the CPU usage right does not pass to the system monitoring application 51, so that no survival notification is issued from the system monitoring application 51.

システム監視アプリ51からの生存通知が出なくなることで、第3のハングカウンタ25cが閾値を超えてカウント値が0になる。これをアプリハングドライバ23が検出した場合、OSの管理情報から実行中もしくは実行権を保持したままのアプリ50Aを見つけ出し、カーネルログエリア35にハングしているアプリ50Aのタスク詳細情報とハング回数をセーブし、初期化制御アプリ52に対して、第3のハングカンウンタ25cの閾値超過をハングしているアプリ50Aのタスク詳細情報と共に通知する。   When the survival notification from the system monitoring application 51 is not issued, the third hang counter 25c exceeds the threshold value and the count value becomes zero. When this is detected by the application hang driver 23, the application 50A that is being executed or has the execution right held is found from the management information of the OS, and the task detailed information and the number of hangs of the application 50A that is hung in the kernel log area 35 are obtained. Save and notify the initialization control application 52 of the third hang counter 25c with the task detail information of the hanged application 50A that exceeds the threshold value.

第3のハングカンウンタ25cの閾値超過を最終エスカレーションフェーズとして、アプリハングドライバ23はCPUコア32に対して自律リセット信号を出し、システム全体のリセットを行う。   With the third hang counter 25c exceeding the threshold as the final escalation phase, the application hang driver 23 issues an autonomous reset signal to the CPU core 32 to reset the entire system.

このように、OSやOS配下のドライバのハングの場合はハードウェアからのWDTリセットでシステムリセットさせ、OSより上位のアプリのハング時にはOSは動作させたままアプリだけをリセットすることで、OSが動作していることから、ハングしているアプリのタスク詳細情報とハング回数を不揮発性メモリのカーネルログエリア35にセーブすることができ、被疑要因タスクの特定を容易に行うことができる。
(付記1)
プロセッサのシステムクロック割り込みを受信する割り込み受信手段と、
受信したシステムクロック割り込みを基にWDT生存確認要求を生成するドライバ生存確認手段と、
前記WDT生存確認要求を受信して前記プロセッサ内のウォッチドッグタイマのクリア要求を行うWDTクリア要求手段とを有し、
オペレーティングシステムの処理プログラム又はオペレーティングシステム配下のドライバプログラムのハングによる前記ドライバ生存確認手段又は前記WDTクリア要求手段の動作停止で前記ウォッチドッグタイマのクリアが停止し、前記ウォッチドッグタイマの閾値超過で前記プロセッサのリセットを行うことを特徴とするコンピュータ装置。
(付記2)
付記1記載のコンピュータ装置において、
前記ドライバ生存確認手段は、受信したシステムクロック割り込みを基にカウント要求を更に生成し、
前記オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行うシステム監視手段と、
アプリケーションプログラムの初期化を行う初期化制御手段と、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に少なくとも実行中のアプリケーションプログラムの初期化を指示するアプリハング処理手段とを
有することを特徴とするコンピュータ装置。
(付記3)
付記2記載のコンピュータ装置において、
閾値の異なる複数のハングカウンタを設けたことを特徴とするコンピュータ装置。
(付記4)
付記3記載のコンピュータ装置において、
前記アプリハング処理手段は、前記複数のハングカウンタのうち第1のハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に実行中のアプリケーションプログラムの初期化を指示することを特徴とするコンピュータ装置。
(付記5)
付記4記載のコンピュータ装置において、
前記アプリハング処理手段は、前記複数のハングカウンタのうち第2のハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に実行中のアプリケーションプログラムと同一グループのアプリケーションプログラムの初期化を指示することを特徴とするコンピュータ装置。
(付記6)
付記5記載のコンピュータ装置において、
前記アプリハング処理手段は、前記複数のハングカウンタのうち第3のハングカウンタのカウント値が閾値を超えたとき、前記プロセッサのリセットを行うことを特徴とするコンピュータ装置。
(付記7)
プロセッサのシステムクロック割り込みを受信する割り込み受信手段と、
受信したシステムクロック割り込みを基にカウント要求を生成するドライバ生存確認手段と、
オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行うシステム監視手段と、
アプリケーションプログラムの初期化を行う初期化制御手段と、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に少なくとも実行中のアプリケーションプログラムの初期化を指示するアプリハング処理手段とを
有することを特徴とするコンピュータ装置。
(付記8)
プロセッサのシステムクロック割り込みを受信し、
受信したシステムクロック割り込みを基にWDT生存確認要求を生成し、
前記WDT生存確認要求を受信して前記プロセッサ内のウォッチドッグタイマのクリア要求を行い、
オペレーティングシステムの処理プログラム又はオペレーティングシステム配下のドライバプログラムのハングによる前記WDT生存確認要求の生成又は前記ウォッチドッグタイマのクリア要求の停止で前記ウォッチドッグタイマのクリアが停止し、前記ウォッチドッグタイマの閾値超過で前記プロセッサのリセットを行うことを特徴とするプログラムハング検出方法。
(付記9)
付記8記載のプログラムハング検出方法において、
前記受信したシステムクロック割り込みを基にカウント要求を更に生成し、
前記オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行い、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記アプリケーションプログラムの初期化を指示する、
ことを特徴とするプログラムハング検出方法。
(付記10)
プロセッサのシステムクロック割り込みを受信し、
受信したシステムクロック割り込みを基にカウント要求を生成し、
オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行い、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記アプリケーションプログラムの初期化を指示する、
ことを特徴とするプログラムハング検出方法。
(付記11)
付記2記載のコンピュータ装置において、
前記ハングカウンタのカウント値の閾値は、前記ウォッチドッグタイマの閾値より小さいことを特徴とするコンピュータ装置。
(付記12)
付記2記載のコンピュータ装置において、
前記アプリハング処理手段は、前記ハングカウンタのカウント値が閾値を超えたとき、ハング回数をカウントし、ハング回数に応じて前記初期化制御手段に異なる初期化指示を行うことを特徴とするコンピュータ装置。
In this way, if the OS or driver under the OS hangs, the system is reset by a WDT reset from the hardware, and when the app higher than the OS hangs, only the application is reset while the OS is operating, so that the OS Since it is operating, it is possible to save the task detail information and the number of hangs of the hung application in the kernel log area 35 of the nonvolatile memory, and the suspicious factor task can be easily identified.
(Appendix 1)
An interrupt receiving means for receiving a system clock interrupt of the processor;
A driver existence confirmation means for generating a WDT existence confirmation request based on the received system clock interrupt;
WDT clear request means for receiving the WDT survival confirmation request and performing a clear request for a watchdog timer in the processor,
The watchdog timer clearing stops when the operation of the driver existence confirmation unit or the WDT clear request unit stops due to a hang of the operating system processing program or the driver program under the operating system, and the processor exceeds the threshold value of the watchdog timer. The computer apparatus characterized by resetting.
(Appendix 2)
In the computer apparatus according to attachment 1,
The driver existence confirmation means further generates a count request based on the received system clock interrupt,
System monitoring means for monitoring the operation of an application program above the operating system and performing a survival notification;
Initialization control means for initializing the application program;
When the count request is received, the hang counter is counted. When the survival notification is received, the count value of the hang counter is reset. When the count value of the hang counter exceeds a threshold value, the initialization control means A computer apparatus comprising: an application hang processing means for instructing at least initialization of an application program being executed.
(Appendix 3)
In the computer apparatus according to attachment 2,
A computer apparatus comprising a plurality of hang counters having different threshold values.
(Appendix 4)
In the computer apparatus according to attachment 3,
The application hang processing means instructs the initialization control means to initialize an application program being executed when a count value of a first hang counter of the plurality of hang counters exceeds a threshold value. Computer equipment to do.
(Appendix 5)
In the computer device according to attachment 4,
The application hang processing means initializes an application program in the same group as the application program being executed to the initialization control means when a count value of a second hang counter of the plurality of hang counters exceeds a threshold value. A computer device characterized by indicating.
(Appendix 6)
In the computer device according to attachment 5,
The computer apparatus, wherein the application hang processing means resets the processor when a count value of a third hang counter of the plurality of hang counters exceeds a threshold value.
(Appendix 7)
An interrupt receiving means for receiving a system clock interrupt of the processor;
Driver survival confirmation means for generating a count request based on the received system clock interrupt,
System monitoring means for monitoring the operation of an application program higher than the operating system and performing a survival notification;
Initialization control means for initializing the application program;
When the count request is received, the hang counter is counted. When the survival notification is received, the count value of the hang counter is reset. When the count value of the hang counter exceeds a threshold value, the initialization control means A computer apparatus comprising: an application hang processing means for instructing at least initialization of an application program being executed.
(Appendix 8)
Receive the processor system clock interrupt,
Generate a WDT survival confirmation request based on the received system clock interrupt,
Upon receiving the WDT existence confirmation request, a clear request for a watchdog timer in the processor is performed,
The watchdog timer clearing stops when the WDT existence confirmation request is generated or the watchdog timer clear request is stopped due to the hang of the operating system processing program or the driver program under the operating system, and the watchdog timer threshold is exceeded. A program hang detection method comprising: resetting the processor.
(Appendix 9)
In the program hang detection method according to attachment 8,
Further generating a count request based on the received system clock interrupt,
Monitor the operation of the application program above the operating system to give a survival notification,
The hang counter is counted when the count request is received, the count value of the hang counter is reset when the survival notification is received, and the application program is initialized when the count value of the hang counter exceeds a threshold value Instruct,
A program hang detection method characterized by the above.
(Appendix 10)
Receive the processor system clock interrupt,
Generate a count request based on the received system clock interrupt,
Monitors the operation of application programs higher than the operating system and sends a survival notification.
The hang counter is counted when the count request is received, the count value of the hang counter is reset when the survival notification is received, and the application program is initialized when the count value of the hang counter exceeds a threshold value Instruct,
A program hang detection method characterized by the above.
(Appendix 11)
In the computer apparatus according to attachment 2,
The computer apparatus according to claim 1, wherein a threshold value of the count value of the hang counter is smaller than a threshold value of the watchdog timer.
(Appendix 12)
In the computer apparatus according to attachment 2,
The application hang processing means counts the number of hangs when the count value of the hang counter exceeds a threshold value, and issues a different initialization instruction to the initialization control means according to the number of hangs. .

従来のプログラムハング検出方法を用いたコンピュータ装置の一例の構成図である。It is a block diagram of an example of the computer apparatus using the conventional program hang detection method. 従来方法の問題点を説明するための図である。It is a figure for demonstrating the problem of the conventional method. 従来方法の問題点を説明するための図である。It is a figure for demonstrating the problem of the conventional method. プログラムハング発生時の処理の流れを示す図である。It is a figure which shows the flow of a process at the time of program hang occurrence. 本発明のプログラムハング検出方法を適用したコンピュータ装置の一実施形態のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of one Embodiment of the computer apparatus to which the program hang detection method of this invention is applied. 本発明のプログラムハング検出方法を適用したコンピュータ装置の一実施形態の構成例を示す図である。It is a figure which shows the structural example of one Embodiment of the computer apparatus to which the program hang detection method of this invention is applied. OSより上位のアプリのプログラムハング検出部を抽出した構成例を示す図である。It is a figure which shows the structural example which extracted the program hang detection part of the high-order application from OS. OS処理及びOS配下のドライバのプログラムハング検出部を抽出した構成例を示す図である。It is a figure which shows the structural example which extracted the program hang detection part of the OS process and the driver under OS. コンピュータ装置の通常動作時の動作シーケンスである。It is an operation | movement sequence at the time of normal operation | movement of a computer apparatus. コンピュータ装置のドライバのハング検出時の動作シーケンスである。It is an operation | movement sequence at the time of the hang detection of the driver of a computer apparatus. コンピュータ装置のアプリのハング検出時の動作シーケンスである。It is an operation | movement sequence at the time of the hang detection of the application of a computer apparatus.

符号の説明Explanation of symbols

10 CPU
11 RAM
12 ROM
13 チップセット
14 内部バス
15 フラッシュメモリ
16 ハードディスク装置
17 通信回路
21 割り込み受信機能部
22 TICドライバ生存確認機能部
23 アプリハングドライバ
24 WDTドライバ
25 ハングカウンタ
30 プロセッサ
31 WDT
32 CPUコア
33 システムタイマ
40 OS
41A〜41C OS処理
42A〜42C ドライバ
50A〜50C アプリ
51 システム監視アプリ
52 初期化制御アプリ
10 CPU
11 RAM
12 ROM
13 Chipset 14 Internal Bus 15 Flash Memory 16 Hard Disk Device 17 Communication Circuit 21 Interrupt Reception Function Unit 22 TIC Driver Life Confirmation Function Unit 23 App Hang Driver 24 WDT Driver 25 Hang Counter 30 Processor 31 WDT
32 CPU core 33 System timer 40 OS
41A to 41C OS processing 42A to 42C driver 50A to 50C application 51 system monitoring application 52 initialization control application

Claims (10)

プロセッサのシステムクロック割り込みを受信する割り込み受信手段と、
受信したシステムクロック割り込みを基にWDT生存確認要求を生成するドライバ生存確認手段と、
前記WDT生存確認要求を受信して前記プロセッサ内のウォッチドッグタイマのクリア要求を行うWDTクリア要求手段とを有し、
オペレーティングシステムの処理プログラム又はオペレーティングシステム配下のドライバプログラムのハングによる前記ドライバ生存確認手段又は前記WDTクリア要求手段の動作停止で前記ウォッチドッグタイマのクリアが停止し、前記ウォッチドッグタイマの閾値超過で前記プロセッサのリセットを行うことを特徴とするコンピュータ装置。
An interrupt receiving means for receiving a system clock interrupt of the processor;
A driver existence confirmation means for generating a WDT existence confirmation request based on the received system clock interrupt;
WDT clear request means for receiving the WDT survival confirmation request and performing a clear request for a watchdog timer in the processor,
The watchdog timer clearing stops when the operation of the driver existence confirmation unit or the WDT clear request unit stops due to a hang of the operating system processing program or the driver program under the operating system, and the processor exceeds the threshold value of the watchdog timer. The computer apparatus characterized by resetting.
請求項1記載のコンピュータ装置において、
前記ドライバ生存確認手段は、受信したシステムクロック割り込みを基にカウント要求を更に生成し、
前記オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行うシステム監視手段と、
アプリケーションプログラムの初期化を行う初期化制御手段と、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に少なくとも実行中のアプリケーションプログラムの初期化を指示するアプリハング処理手段とを
有することを特徴とするコンピュータ装置。
The computer apparatus of claim 1.
The driver existence confirmation means further generates a count request based on the received system clock interrupt,
System monitoring means for monitoring the operation of an application program above the operating system and performing a survival notification;
Initialization control means for initializing the application program;
When the count request is received, the hang counter is counted. When the survival notification is received, the count value of the hang counter is reset. When the count value of the hang counter exceeds a threshold value, the initialization control means A computer apparatus comprising: an application hang processing means for instructing at least initialization of an application program being executed.
請求項2記載のコンピュータ装置において、
閾値の異なる複数のハングカウンタを設けたことを特徴とするコンピュータ装置。
The computer device according to claim 2.
A computer apparatus comprising a plurality of hang counters having different threshold values.
請求項3記載のコンピュータ装置において、
前記アプリハング処理手段は、前記複数のハングカウンタのうち第1のハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に実行中のアプリケーションプログラムの初期化を指示することを特徴とするコンピュータ装置。
The computer apparatus according to claim 3.
The application hang processing means instructs the initialization control means to initialize an application program being executed when a count value of a first hang counter of the plurality of hang counters exceeds a threshold value. Computer equipment to do.
請求項4記載のコンピュータ装置において、
前記アプリハング処理手段は、前記複数のハングカウンタのうち第2のハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に実行中のアプリケーションプログラムと同一グループのアプリケーションプログラムの初期化を指示することを特徴とするコンピュータ装置。
The computer device according to claim 4.
The application hang processing means initializes an application program in the same group as the application program being executed to the initialization control means when a count value of a second hang counter of the plurality of hang counters exceeds a threshold value. A computer device characterized by indicating.
請求項5記載のコンピュータ装置において、
前記アプリハング処理手段は、前記複数のハングカウンタのうち第3のハングカウンタのカウント値が閾値を超えたとき、前記プロセッサのリセットを行うことを特徴とするコンピュータ装置。
The computer device according to claim 5.
The computer apparatus, wherein the application hang processing means resets the processor when a count value of a third hang counter of the plurality of hang counters exceeds a threshold value.
プロセッサのシステムクロック割り込みを受信する割り込み受信手段と、
受信したシステムクロック割り込みを基にカウント要求を生成するドライバ生存確認手段と、
オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行うシステム監視手段と、
アプリケーションプログラムの初期化を行う初期化制御手段と、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記初期化制御手段に少なくとも実行中のアプリケーションプログラムの初期化を指示するアプリハング処理手段とを
有することを特徴とするコンピュータ装置。
An interrupt receiving means for receiving a system clock interrupt of the processor;
Driver survival confirmation means for generating a count request based on the received system clock interrupt,
System monitoring means for monitoring the operation of an application program higher than the operating system and performing a survival notification;
Initialization control means for initializing the application program;
When the count request is received, the hang counter is counted. When the survival notification is received, the count value of the hang counter is reset. When the count value of the hang counter exceeds a threshold value, the initialization control means A computer apparatus comprising: an application hang processing means for instructing at least initialization of an application program being executed.
プロセッサのシステムクロック割り込みを受信し、
受信したシステムクロック割り込みを基にWDT生存確認要求を生成し、
前記WDT生存確認要求を受信して前記プロセッサ内のウォッチドッグタイマのクリア要求を行い、
オペレーティングシステムの処理プログラム又はオペレーティングシステム配下のドライバプログラムのハングによる前記WDT生存確認要求の生成又は前記ウォッチドッグタイマのクリア要求の停止で前記ウォッチドッグタイマのクリアが停止し、前記ウォッチドッグタイマの閾値超過で前記プロセッサのリセットを行うことを特徴とするプログラムハング検出方法。
Receive the processor system clock interrupt,
Generate a WDT survival confirmation request based on the received system clock interrupt,
Upon receiving the WDT existence confirmation request, a clear request for a watchdog timer in the processor is performed,
The watchdog timer clearing stops when the WDT existence confirmation request is generated or the watchdog timer clear request is stopped due to the hang of the operating system processing program or the driver program under the operating system, and the watchdog timer threshold is exceeded. A program hang detection method comprising: resetting the processor.
請求項8記載のプログラムハング検出方法において、
前記受信したシステムクロック割り込みを基にカウント要求を更に生成し、
前記オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行い、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記アプリケーションプログラムの初期化を指示する、
ことを特徴とするプログラムハング検出方法。
The method of detecting a program hang according to claim 8.
Further generating a count request based on the received system clock interrupt,
Monitor the operation of the application program above the operating system to give a survival notification,
The hang counter is counted when the count request is received, the count value of the hang counter is reset when the survival notification is received, and the application program is initialized when the count value of the hang counter exceeds a threshold value Instruct,
A program hang detection method characterized by the above.
プロセッサのシステムクロック割り込みを受信し、
受信したシステムクロック割り込みを基にカウント要求を生成し、
オペレーティングシステムより上位のアプリケーションプログラムの動作を監視して生存通知を行い、
前記カウント要求を受信したときハングカウンタのカウントを行い、前記生存通知を受信したとき前記ハングカウンタのカウント値をリセットし、前記ハングカウンタのカウント値が閾値を超えたとき、前記アプリケーションプログラムの初期化を指示する、
ことを特徴とするプログラムハング検出方法。
Receive the processor system clock interrupt,
Generate a count request based on the received system clock interrupt,
Monitors the operation of application programs higher than the operating system and sends a survival notification.
The hang counter is counted when the count request is received, the count value of the hang counter is reset when the survival notification is received, and the application program is initialized when the count value of the hang counter exceeds a threshold value Instruct,
A program hang detection method characterized by the above.
JP2007327226A 2007-12-19 2007-12-19 Program hang-up detection method and computer device adopting the same method Withdrawn JP2009151440A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007327226A JP2009151440A (en) 2007-12-19 2007-12-19 Program hang-up detection method and computer device adopting the same method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007327226A JP2009151440A (en) 2007-12-19 2007-12-19 Program hang-up detection method and computer device adopting the same method

Publications (1)

Publication Number Publication Date
JP2009151440A true JP2009151440A (en) 2009-07-09

Family

ID=40920553

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007327226A Withdrawn JP2009151440A (en) 2007-12-19 2007-12-19 Program hang-up detection method and computer device adopting the same method

Country Status (1)

Country Link
JP (1) JP2009151440A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794244A (en) * 2010-03-18 2010-08-04 上海乐毅信息科技有限公司 Multi-thread watch dog monitoring method
CN102135919A (en) * 2010-01-27 2011-07-27 深圳富泰宏精密工业有限公司 Element detection system and method
JP2011258032A (en) * 2010-06-10 2011-12-22 Contec Co Ltd Information processing unit
JP2016001414A (en) * 2014-06-12 2016-01-07 株式会社日立産機システム Monitor notification device and reboot control method using the same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135919A (en) * 2010-01-27 2011-07-27 深圳富泰宏精密工业有限公司 Element detection system and method
CN101794244A (en) * 2010-03-18 2010-08-04 上海乐毅信息科技有限公司 Multi-thread watch dog monitoring method
JP2011258032A (en) * 2010-06-10 2011-12-22 Contec Co Ltd Information processing unit
JP2016001414A (en) * 2014-06-12 2016-01-07 株式会社日立産機システム Monitor notification device and reboot control method using the same

Similar Documents

Publication Publication Date Title
JP4060322B2 (en) Application management apparatus and storage medium storing software thereof
US20100306602A1 (en) Semiconductor device and abnormality detecting method
EP3025233B1 (en) Robust hardware/software error recovery system
JP2001154885A (en) Method for preventing lock-up of computer system and method for monitoring the same system
CN111273923B (en) FPGA (field programmable Gate array) upgrading method based on PCIe (peripheral component interface express) interface
US10379931B2 (en) Computer system
JP2016224883A (en) Fault detection method, information processing apparatus, and fault detection program
JP2009151440A (en) Program hang-up detection method and computer device adopting the same method
JP2007323631A (en) Cpu runaway determination circuit
JP2009193492A (en) Computer system, information processing method, and program
JP6049961B1 (en) CPU monitoring device
JP5652198B2 (en) Electronic control device, start control method
JP2004302731A (en) Information processor and method for trouble diagnosis
KR101300806B1 (en) Apparatus and method for handling abnormal processing in multi process system
CN107133130B (en) Computer operation monitoring method and device
JP2006227962A (en) System and method for monitoring application task
JP2010009258A (en) Fault detection device of software
JP5327591B2 (en) Information processing apparatus maintenance management method, apparatus and program thereof
JP2002149437A (en) Method for restarting software
EP3729271B1 (en) Devices with networking functionality
CN102521089A (en) Hardware equipment error detection method
JP4773715B2 (en) How to get checkpoint
JP2005293164A (en) Task monitoring system
JP6424134B2 (en) Computer system and computer system control method
JP5716396B2 (en) Information processing apparatus and information processing method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110301