Today we will see a common error message and its solution.
We will install pstack on debian based system and see an error message and the solution how to alternatively find the process stack.
I. Bug/Error Message
$ sudo pstack 38455 38455: /usr/lib/rtkit/rtkit-daemon (No symbols found) crawl: Input/output error Error tracing through process 38455 0x7f27328fe819: ????
The error comes because of the bug in AMD64/Debian machines where it is not able to crawl and will not able to back track the processes.
The bug details can be found at:
II. Alternative Option
The alternative to pstack is to use gdb to backtrack the processes
Lets see how to do this.
[user@ngelinux001 ~]$ gdb GNU gdb (Debian 8.2.1-2+b3) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". (gdb) attach 29246 Attaching to process 29246 Reading symbols from /usr/bin/tcsh...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.6...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libcrypt.so.1...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...(no debugging symbols found)...done. Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. 0x00007f44c512bb09 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) thread apply all bt Thread 1 (process 29246): #0 0x00007f44c512bb09 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x0000557dbad550dd in ?? () #2 0x0000557dbad5747f in ?? () #3 0x0000557dbad5708b in ?? () #4 0x0000557dbad389d1 in ?? () #5 0x0000557dbad391f9 in ?? () #6 0x0000557dbad394d2 in ?? () #7 0x0000557dbad3954a in ?? () #8 0x0000557dbad377ad in ?? () #9 0x00007f44c511809b in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #10 0x0000557dbad37b7a in ?? () (gdb)
The another un-official solution to run pstack is to copy the Linux Binary of this command to Debian system and work.
I have tested this and its working for my debian system, however i will not go to explain this as this is not recommended way.
The always available way to build the pstack on our debian system.