Debugging a MySQL Server
2825
21.3.1.5. Using a Stack Trace
On some operating systems, the error log contains a stack trace if
mysqld
dies unexpectedly. You can
use this to find out where (and maybe why)
mysqld
died. See
Section 5.2.1, “The Error Log”
. To get
a stack trace, you must not compile
mysqld
with the
-fomit-frame-pointer
option to gcc. See
Section 21.3.1.1, “Compiling MySQL for Debugging”
.
A stack trace in the error log looks something like this:
mysqld got signal 11;
Attempting backtrace. You can use the following information
to find out where mysqld died. If you see no messages after
this, something went terribly wrong...
stack range sanity check, ok, backtrace follows
0x40077552
0x81281a0
0x8128f47
0x8127be0
0x8127995
0x8104947
0x80ff28f
0x810131b
0x80ee4bc
0x80c3c91
0x80c6b43
0x80c1fd9
0x80c1686
You can use the
resolve_stack_dump
utility to determine where
mysqld
died by using the following
procedure:
1. Copy the preceding numbers to a file, for example
mysqld.stack
:
0x9da402
0x6648e9
0x7f1a5af000f0
0x7f1a5a10f0f2
0x7412cb
0x688354
0x688494
0x67a170
0x67f0ad
0x67fdf8
0x6811b6
0x66e05e
2. Make a symbol file for the
mysqld
server:
shell>
nm -n libexec/mysqld > /tmp/mysqld.sym
If
mysqld
is not linked statically, use the following command instead:
shell>
nm -D -n libexec/mysqld > /tmp/mysqld.sym
If you want to decode C++ symbols, use the
--demangle
, if available, to
nm
. If your version of
nm
does not have this option, you will need to use the
c++filt
command after the stack dump has
been produced to demangle the C++ names.
3. Execute the following command:
shell>
resolve_stack_dump -s /tmp/mysqld.sym -n mysqld.stack
If you were not able to include demangled C++ names in your symbol file, process the
resolve_stack_dump
output using
c++filt
:
shell>
resolve_stack_dump -s /tmp/mysqld.sym -n mysqld.stack | c++filt
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...