2005년 02월 27일
Fault Analysis and Diagnosis
1. Fault Analysis and Diagnosis
1.1. The Fault Analysis Method
Fault Analysis : 문제의 인식, 문제의 수집 비교 를 통한 분석
Diagnosis : 복구하고 테스트하고 문제를 레포팅 하는 것
1.2. Step of Fault Analysis and Diagnosis
l stating the problem
어떤것(object, device or subsystem) 이 문제인지 결정하고 가설을 세워라
이미 알려진 문제인지 확인해라(Patch)
l Describing the problem
모든 시스템의 메시지를 모으고 확인하며 조건과 현상에 대해 확인해라
가장최근의 관련된 변화를 찾아라
l Listing All Observed Facts
육하원칙에 의거 문제를 제기하라
l Establishing Comparative Facts
같은 시스템, 문제없는 시스템과 비교하라
※. Core 분석을 다른 시스템에서 해야 할 경우는 같은 OS, 같은 H/W 이야 한다.
l Identifying Differences
사적인 의견이 아닌 객관적으로 한번에 하나씩 비교하여 다른점을 찾아라
기록을 유지해라
l Listing Relevant Changes
어떤 기간에 문제가 발생하는지, 비정상적인 변화가 있는지 찾아라
l Generating Likely Causes
유사한(가능성있는) 가설(원인)을 세워라
l Testing Likely Causes
세운 가설을 테스트해봐라
l Verification
사실적이고 논리적으로 분석하라
l Verifying the Most Likely Cause
가장 시스템 영향, 비용, 시간 이 적은 가능성 있는 이유를 확인하라
l Taking Corrective Action
완벽히 복구하고, 확인 테스트 하고, 문서로 남겨라
1.3. Diagnostic Tool
1.3.1. Type of Errors
l software ? core발생, return code발생
예) # cat
ctrl +
# ls core
# file core
진단 : truss명령으로 program진행 추적
adb등의 tool으로 분석
l hardwaere
① 일반적으로 고쳐질수 있는 system(H/W) error
예) ECC error
- prtdiag로 확인
② watchdog-reset (치명적 H/W Error)
- 확인불가
- ok모드처럼 watchdog-reset 프롬프트로 떨어짐
l panic
① system panic :panic()이 호출되면서 fail
② hang : panic()가 호출되지 않아 system log가 없다.
2. Kernel Core Dump Analysis
Core Dump 순서
start end
뒤쪽에서부터 저장
system hang soft hang e stop + a , ok sync a core dump 생성
hard hang e stop + a 사용않됨
single swap disk 영역이 메모리 영역보다 크거나 같아야 한다.
/var/crash 를 위해 공간이 충분해야 한다.
# sync 동기화
$ sync
OK sync 동기화 & core 생성
2.1. Analyzing Core Dumps Using the MDB Utility
2.1.1. Introducing the mdb Utility
# mdb
Loading modules : [ unix krtld genunix ip ufs_log nfs random ptm lofs ipc logindmux cpc ]
>
> $P”mdb: “ // mdb의 prompt를 변경
mdb: ::help ps
::ps [-fltTP] ? list processes (and associated thr, lwp)
mdb: ::ps ?lt // -lt 옵션은 thread들과 LWPs를 보여준다.
….
필드는 Panic의 원인인 thread를 나타낸다.
….
2.1.2. Features of the mdb Utility
Mdb Utility는 Kernel과 user process들의 debugger와 Analyzer(분석기)에 일반적인 목적이 있다. 또한 running kernel, kernel crash dumps, running processes, process core files, object files등을 검토하거나 수정할때도 사용된다.
2.1.3. General mdb Commad Formats
● ? ? Displays code or variables in an executable object file
● / - Displays data from the core file
● = - Prints values in different formats
● $< - Includes macro invocations for miscellaneous commands
● > - Assigns a value to a variable or a register
● < - Reads a value from a variable or a register
● Return ? Repeats the previous command with a count of 1 and increments the current location represented by a dot(.)
2.1.4. Examing System Dumps by the mdb Utility
# mdb ?k unix.# vmcore.#
Ø $ //부팅당시의 kernel image 정보를 보이도록하는 macro
Ø $r // register의 정보확인
%pc = 가
// panic을 유발하는 instrction주소
Ø panic_thread/K
//panic시 동작한 thread의 주소
panic_thread : 나
//g7의 값과 동일한 값이 나온다.
Ø 나 $ //panic시 동작한 thread의 데이터 구조 주소를 나타내는 pointer
proc의 값
//process의 주소값
Ø proc의 값$ //process가 실행될 당시의 상태의 원인 추적
panic시의 프로세스의 이름 및 psargs 값을 확인하여 프로그램에 전달된 aguments확인
3. Messages
3.1. Memory Error : [AFT*]
0 : correctable error
1 : uncorrectable or fatal error
2 : Sun support
3 : kernel error recovery code
3.2. Error and Events (ultraSPARC II CPUs)
● ETP : Ecache Tag Parity
● EDP : Ecache Data Parity
● LDP : Load Data Parity
● WP : Writeback Parity
● CP : Copyout Parity
● UE : Uncorrectavle memory error
● CE : Correctable memory error
3.3. Error and Events (ultraSPARC III CPUs)
● UCC : Software correctable external cache ECC error
● UCU : Uncorrectable external cache ECC error
● EDC : Hardware corrected external cache ECC error
1.1. The Fault Analysis Method
Fault Analysis : 문제의 인식, 문제의 수집 비교 를 통한 분석
Diagnosis : 복구하고 테스트하고 문제를 레포팅 하는 것
1.2. Step of Fault Analysis and Diagnosis
l stating the problem
어떤것(object, device or subsystem) 이 문제인지 결정하고 가설을 세워라
이미 알려진 문제인지 확인해라(Patch)
l Describing the problem
모든 시스템의 메시지를 모으고 확인하며 조건과 현상에 대해 확인해라
가장최근의 관련된 변화를 찾아라
l Listing All Observed Facts
육하원칙에 의거 문제를 제기하라
l Establishing Comparative Facts
같은 시스템, 문제없는 시스템과 비교하라
※. Core 분석을 다른 시스템에서 해야 할 경우는 같은 OS, 같은 H/W 이야 한다.
l Identifying Differences
사적인 의견이 아닌 객관적으로 한번에 하나씩 비교하여 다른점을 찾아라
기록을 유지해라
l Listing Relevant Changes
어떤 기간에 문제가 발생하는지, 비정상적인 변화가 있는지 찾아라
l Generating Likely Causes
유사한(가능성있는) 가설(원인)을 세워라
l Testing Likely Causes
세운 가설을 테스트해봐라
l Verification
사실적이고 논리적으로 분석하라
l Verifying the Most Likely Cause
가장 시스템 영향, 비용, 시간 이 적은 가능성 있는 이유를 확인하라
l Taking Corrective Action
완벽히 복구하고, 확인 테스트 하고, 문서로 남겨라
1.3. Diagnostic Tool
1.3.1. Type of Errors
l software ? core발생, return code발생
예) # cat
ctrl +
# ls core
# file core
진단 : truss명령으로 program진행 추적
adb등의 tool으로 분석
l hardwaere
① 일반적으로 고쳐질수 있는 system(H/W) error
예) ECC error
- prtdiag로 확인
② watchdog-reset (치명적 H/W Error)
- 확인불가
- ok모드처럼 watchdog-reset 프롬프트로 떨어짐
l panic
① system panic :panic()이 호출되면서 fail
② hang : panic()가 호출되지 않아 system log가 없다.
2. Kernel Core Dump Analysis
Core Dump 순서
start end
뒤쪽에서부터 저장
system hang soft hang e stop + a , ok sync a core dump 생성
hard hang e stop + a 사용않됨
single swap disk 영역이 메모리 영역보다 크거나 같아야 한다.
/var/crash 를 위해 공간이 충분해야 한다.
# sync 동기화
$ sync
OK sync 동기화 & core 생성
2.1. Analyzing Core Dumps Using the MDB Utility
2.1.1. Introducing the mdb Utility
# mdb
Loading modules : [ unix krtld genunix ip ufs_log nfs random ptm lofs ipc logindmux cpc ]
>
> $P”mdb: “ // mdb의 prompt를 변경
mdb: ::help ps
::ps [-fltTP] ? list processes (and associated thr, lwp)
mdb: ::ps ?lt // -lt 옵션은 thread들과 LWPs를 보여준다.
….
필드는 Panic의 원인인 thread를 나타낸다.
….
2.1.2. Features of the mdb Utility
Mdb Utility는 Kernel과 user process들의 debugger와 Analyzer(분석기)에 일반적인 목적이 있다. 또한 running kernel, kernel crash dumps, running processes, process core files, object files등을 검토하거나 수정할때도 사용된다.
2.1.3. General mdb Commad Formats
● ? ? Displays code or variables in an executable object file
● / - Displays data from the core file
● = - Prints values in different formats
● $< - Includes macro invocations for miscellaneous commands
● > - Assigns a value to a variable or a register
● < - Reads a value from a variable or a register
● Return ? Repeats the previous command with a count of 1 and increments the current location represented by a dot(.)
2.1.4. Examing System Dumps by the mdb Utility
# mdb ?k unix.# vmcore.#
Ø $ //부팅당시의 kernel image 정보를 보이도록하는 macro
Ø $r // register의 정보확인
%pc = 가
// panic을 유발하는 instrction주소
Ø panic_thread/K
//panic시 동작한 thread의 주소
panic_thread : 나
//g7의 값과 동일한 값이 나온다.
Ø 나 $ //panic시 동작한 thread의 데이터 구조 주소를 나타내는 pointer
proc의 값
//process의 주소값
Ø proc의 값$ //process가 실행될 당시의 상태의 원인 추적
panic시의 프로세스의 이름 및 psargs 값을 확인하여 프로그램에 전달된 aguments확인
3. Messages
3.1. Memory Error : [AFT*]
0 : correctable error
1 : uncorrectable or fatal error
2 : Sun support
3 : kernel error recovery code
3.2. Error and Events (ultraSPARC II CPUs)
● ETP : Ecache Tag Parity
● EDP : Ecache Data Parity
● LDP : Load Data Parity
● WP : Writeback Parity
● CP : Copyout Parity
● UE : Uncorrectavle memory error
● CE : Correctable memory error
3.3. Error and Events (ultraSPARC III CPUs)
● UCC : Software correctable external cache ECC error
● UCU : Uncorrectable external cache ECC error
● EDC : Hardware corrected external cache ECC error
# by | 2005/02/27 00:30 | Technical.Doc | 트랙백



☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]