Analyze a Stack Frame
Use the analyze_stack_frame.py script to analyze a stack frame from an error in the mtx_debug.log file or a specified text file and retrieve the filename and line number in which the error occurred. This information can be sent to a MATRIXX representative for troubleshooting errors in the MATRIXX Engine code.
Before you begin
LM_ERROR
message and is preceded with the --Stack
notation. The stack frame
is in the following
format:filename(function_name+offset)
[return_address_in_hex]
--Stack=
, for example:
/home/workspace/MTX/test/Test01/Test01() [0x407459]
LM_ERROR
message is written to the
mtx.log file:
LM_ERROR 11922|11922 2013-10-24 04:24:37.636823 [/home/workspace/MTX/test/Test01/Test01] | latchAndFetch: unable to acquire latch
--Stack=
/home/workspace/MTX/test/Test01/Test01(_ZN58Test01_Header_Test8TestBodyEv+0xb10) [0x409b20]
/home/workspace/MTX/publish_linux/opt/mtx/lib/libgtest.so(_ZN7testing4Test3RunEv+0xaa) [0x7f9f8bb6553a]
/home/workspace/MTX/publish_linux/opt/mtx/lib/libgtest.so(_ZN7testing8internal12TestInfoImpl3RunEv+0xf8) [0x7f9f8bb65638]
/home/workspace/MTX/publish_linux/opt/mtx/lib/libgtest.so(_ZN7testing8TestCase3RunEv+0xab) [0x7f9f8bb656eb]
/home/workspace/MTX/publish_linux/opt/mtx/lib/libgtest.so(_ZN7testing8internal12UnitTestImpl11RunAllTestsEv+0x15d) [0x7f9f8bb6589d]
/home/workspace/MTX/test/Test01/Test01(main+0x43) [0x407563]
/lib64/libc.so.6(__libc_start_main+0xfd) [0x3f1701ecdd]
/home/workspace/MTX/test/Test01/Test01() [0x407459]
Procedure
-
Run the following command:
kubectl exec -it engine_pod_name -n matrixx -- bash --login -c
"analyze_stack_frame.py "strack_line
""Where stack_line is a method call following the
--Stack
notation. The entire call must be inside double quotes (" ") and might include the number in brackets ([ ]) at the end of the line. For example:kubectl exec -it engine_pod_name -n matrixx -- bash --login -c
"analyze_stack_frame.py "/home/workspace/MTX/test/Test01/Test01(_ZN58Test01_Header_Test8TestBodyEv+0xb10) [0x409b20]"
"orkubectl exec -it engine_pod_name -n matrixx -- bash --login -c
"analyze_stack_frame.py "/home/workspace/MTX/test/Test01/Test01(_ZN58Test01_Header_Test8TestBodyEv+0xb10)"
"This command prints information similar to the following, which shows the error occurred in the Test01.cpp file at line 51:Test01_Header_Test::TestBody()/home/workspace/MTX/test/Test01/Test01.cpp:51
- Give this information to your MATRIXX support representative to aid in troubleshooting errors.