【STACKX】Oracle core file分析利器STACKX 使用指南
- Introduction
- Supported Platforms
- Download STACKX
- Debuggers Recognized
- Installing STACKX
- Uninstalling STACKX
- Running STACKX
- Thread Support
- Bug Fixes
- Open Issues and Limitations
- Reporting Feedback
stackx is a shell script utility for extracting diagnostic stack trace information from core file on UNIX/LINUX platforms. Core files are typically created when an application program fails in such a way it cannot continue operation. Often this is from an attempt by the application program to access a memory location outside its range permitted by the operating system. When this happens, the operating system sends a signal to the program, which in turn may produce a disk file containing information about its operation, prior to the program terminating execution. This file is the "core" file, and contains information on program functions called immediately prior to program failure. This information is called a "stack trace" or "back trace" and is embedded within the binary core file, which is not human readable. In order to extract the useful information and put it into human readable form, some effort is required.
stackx assists in that effort.
Stack trace information normally consists of a list of the current program function (at time of termination) as well as the "stack" of functions called prior to the current function. This information can be instrumental in determining the cause of a program failure, if it is extracted properly.
Extracting stack trace information from a core is not difficult, but this operation requires an operating system utility known as a debugger, or other similar utility, and the specific technique required varies with the debugging utility used. To simplify this effort,
stackx was created to provide a simpler and consistent command line interface for automating this operation.
stackx works as follows:
- Chooses a debugger from a list of supported utilities in the current environment path, or a user-specified debugger passed as a command line argument.
- Finds the core-generating application program name from inside the core file.
- Runs the debugger and passes appropriate commands to that debugger.
Output is text, normally displayed to the users screen. Output can be redirected to a trace file by passing an appropriate redirect operator and output filename, in the conventional UNIX manner. This is shown in the RUNNING STACKX section below.
Core stack trace extraction is supported on the following platforms:
- IBM AIX
- Intel Linux (RedHat and SuSE)
- HP-UX (10.* and 11.*)
- HP Tru64
- Sun Solaris (2.5 - 2.10)
Current
stackx Version: 1.3.0 December, 2015
to download the file
(use the name stackx1_3.tar when saving).
If a file download dialog box does not appear when clicking on the above link, you may need to clear your web browser's cache and/or restart your web browser.
Debuggers recognized and discovered by
stackx are (in order of preference):
stackx is distributed as a tar archive, stackx.tar.
To install
stackx,
Three files will be extracted:
To uninstall
stackx remove the files in the
stackx directory created during the install.
To run
stackx simply invoke the
stackx script, passing either a local core filename or the fully qualified core filename as an argument. In the following examples a core file named core.1234 is used.
Processes that run multiple threads present a special case for diagnostic efforts. In order to be useful for diagnosing problems, a stack trace for each thread must be generated.
stackx will invoke appropriate commands for debuggers to extract stack traces for all threads in a core, if the underlying debugger supports this type of operation. Such utilities include:
However, such support is not universally available on each debugger. In particular, older versions of adb and dbx do not support multi-threaded cores. Unfortunately, there is no reliable way to determine the version of a debugger prior to running it. As such,
stackx may not operate properly if a multi-threaded core is generated and a non multi-threaded debugger is used. It is recommended to install a debugging utility that supports multi-threaded programs and cores. The gdb debugger is generally available as an open-source utility and can be freely downloaded and installed for most platforms. Current versions of gdb support multi-threaded cores.
stackx may also be run on platforms not listed in this document, but support is nevertheless restricted to those debuggers listed here. To determine if a debugger is available on your platform, do the following for each debugger of interest:
If a debugger is available, it will be displayed with the fully qualified pathname. However, if a particular debugger is not found, it may simply be that the current path does not reflect its location. For further assistance, consult the administrator of the machine of interest.
Oracle Support recommends testing unlisted platforms on a non-production server first, as behavior may be unpredictable.
Removed support for pstack, as mdb provides better output.
Improved tagging to identify for stack traces of all threads, and to contain stack trace of current thread.
Added tag section to contain initial debugger output for ease in parsing output by other tools.
Cleanup of output, including duplicate errorstack output when multiple executable names are discovered in the core. Now, only first executable name is used.
Cleanedup discovered executable name to express full path. eg, ./a.out becomes /use/bin/whatever/a.out.
Tidied up header information, renamed CPU Bits to CPU Type.
Corrected comparator operator to -gt
Added register info (all registers), gdb only
Corrected for AIX, 'file' command output variation.
Improved output tagging, to more uniform xml-like presentation to ease parsing for support tools.
For dbx, added redundant debug command syntax to accommodate syntax variations among non-detectable versions of the dbx
debugger. Some spurious output will be generated, but probability of stack extraction is greatly improved.
The two character limitation on detected program name no longer applies.
stackx is expected to reliably find the name of all core-generating executables.
Corrected expression syntax in determining execCount
AIX has differences in output from 'which' command, corrections made to accommodate this platform issue.
AIX has differences in output from 'file' command, corrections made to accommodate this platform issue.
dbx now given priority over adb as default debugger selection.
Documentation clarifies need to run
stackx on same machine on which corefile was created.
$ tar -xvf stackx.tar
$ stackx core.1234
Optionally, if a particular debugger is desired, or no debugger is available in the path, a fully qualified debugger name can be passed as an optional first argument. If the desired debugger is in the current path, then it does not have to be fully qualified with path name. However, a fully-qualified name will eliminate issues of ambiguity where more than one otherwise-identical debugger executable is installed on a machine:
$ stackx /usr/bin/adb core.1234
If you want output sent to a text file:
$ stackx core.1234 > stacktrace.txt
or
$ stackx /usr/bin/adb core.1234 > stacktrace.txt
NOTE: The core file does not have to be in the local directory. A fully qualified filename can be accessed by
stackx, but only if read permission is available to the executing session on that file. It may be necessary to execute
stackx as root, or to change permissions on the core file. For a core file named core.1234, you can set global read permission this way:
$ chmod +r core.1234
$ which <debuggername>
and Enhancements, release 1.3 (December 3, 2015)
and Enhancements, release 1.2 (August 22, 2007)
and Enhancements, release 1.1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29487349/viewspace-2849639/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- .Net Core使用File ProvidersIDE
- Oracle:db file scattered readOracle
- Oracle ASM Cluster File Systems (ACOracleASM
- Oracle 12C Database File Mapping for Oracle ASM FilesOracleDatabaseAPPASM
- Oracle 18.3 Resize operation completed for file#Oracle
- 2Gb - File limits in Oracle(轉)MITOracle
- php效能分析利器:xhprofPHP
- ulimit: core file size: cannot modify limit: Operation not permittedMIT
- 資料分析利器之Pandas
- Oracle資料庫挖坑利器-精簡卷Oracle資料庫
- [20220128]Check the datapump file header information in Oracle.txtHeaderORMOracle
- 測量系統分析 (MSA)使用指南
- ASP.NET Core 裝X利器SignalR:電子畫板ASP.NETSignalR
- oracle ORA-01157: cannot identify/lock data file 64OracleIDE
- Oracle RAC+DG 調整redo/standby log fileOracle
- 理解ASP.NET Core - 檔案伺服器(File Server)ASP.NET伺服器Server
- AnalySDK使用者資料分析使用指南
- 爬蟲分析利器:谷歌Chrome F12抓包分析爬蟲谷歌Chrome
- .net core 原始碼分析原始碼
- EF Core 原始碼分析原始碼
- oracle 匯入報錯:field in data file exceeds maximum lengthOracle
- Oracle RAC 重置db_recovery_file_dest_size引數Oracle
- 【TUNE_ORACLE】等待事件之日誌等待“log file sync”Oracle事件
- iOS逆向(9)-Cycript,動態分析APP利器iOSAPP
- 新一代資料分析利器:Google Dremel原理分析KLGoREM
- 【TUNE_ORACLE】等待事件之日誌等待“log file parallel write”Oracle事件Parallel
- 【ASM】Oracle RAC css啟動報錯"Duplicate voting file found"ASMOracleCSS
- 【TUNE_ORACLE】等待事件之IO等待“db file scattered read”Oracle事件
- 【TUNE_ORACLE】等待事件之IO等待“db file sequential read”Oracle事件
- 【TUNE_ORACLE】等待事件之IO等待“db file parallel write”Oracle事件Parallel
- java core dump分析實戰Java
- 一些JDK自帶的效能分析利器JDK
- 【LOG】Oracle資料庫清理日誌、跟蹤檔案利器Oracle資料庫
- 以太坊原始碼分析(19)core-blockchain分析原始碼Blockchain
- Element package.json 中的 scripts 分析 —— "build:file"PackageJSONUI
- Oracle啟動報錯:ORA-03113: end-of-file on communication channelOracle
- oracle12.2 adg ORA-46952: standby database format mismatch for password fileOracleDatabaseORM
- 網路分析利器:在 Ubuntu 16.04 上安裝 BroUbuntu