'Use gdb to debug running Python programs,get 0x00007f1b8850ca66 in ?? ()'
I'm debugging the python program. The program is running in the contains.
I used the ps to get the pid (server.py, 97).
ps -ef
UID PID PPID C STIME TTY TIME CMD
sn 1 0 0 00:18 ? 00:00:14 /home/sn/bin/runtime-manager
snuser 97 1 0 10:13 ? 00:01:03 /usr/bin/python3.8 /home/snuser/runtime/server.py 10.42.0.147:31607 10.42.0.147:31
I use gdb to debug it, command is gdb python3.8 --pid 97
I get the message '0x00007f1b8850ca66 in ?? ()'
Reading symbols from python3.8...Reading symbols from /usr/lib/debug/.build-id/46/26b2aa784f1d7eee14936ba441180e2824c1dd.debug...done.done.
Attaching to program: /usr/bin/python3.8, process 97
[New LWP 100]
[New LWP 101]
[New LWP 102]
[New LWP 103]
[New LWP 104]
[New LWP 105]
[New LWP 106]
[New LWP 107]
[New LWP 108]
[New LWP 109]
[New LWP 110]
[New LWP 111]
[New LWP 112]
[New LWP 113]
[New LWP 114]
[New LWP 115]
[New LWP 116]
[New LWP 117]
[New LWP 118]
0x00007f1b8850ca66 in ?? ()
And I use py-bt, get the message 'Unable to locate python frame'.
(gdb) py-bt
Unable to locate python frame
(gdb) py-list
Unable to locate gdb frame for python bytecode interpreter
(gdb) info thread
Id Target Id Frame
* 1 LWP 97 "python3.8" 0x00007f1b8850ca66 in ?? ()
2 LWP 100 "python3.8" 0x00007f1b881db8c2 in ?? ()
3 LWP 101 "default-executo" 0x00007f1b88505839 in ?? ()
4 LWP 102 "resolver-execut" 0x00007f1b88505839 in ?? ()
5 LWP 103 "grpc_global_tim" 0x00007f1b88505839 in ?? ()
6 LWP 104 "python3.8" 0x00007f1b8850bbb7 in ?? ()
7 LWP 105 "python3.8" 0x00007f1b881db6d6 in ?? ()
8 LWP 106 "python3.8" 0x00007f1b881db6d6 in ?? ()
9 LWP 107 "ZMQbg/Reaper" 0x00007f1b8850bbb7 in ?? ()
10 LWP 108 "ZMQbg/IO/0" 0x00007f1b8850bbb7 in ?? ()
11 LWP 109 "python3.8" 0x00007f1b884febf9 in ?? ()
12 LWP 110 "python3.8" 0x00007f1b8850cbd7 in ?? ()
13 LWP 111 "ZMQbg/Reaper" 0x00007f1b8850bbb7 in ?? ()
14 LWP 112 "ZMQbg/IO/0" 0x00007f1b8850bbb7 in ?? ()
15 LWP 113 "python3.8" 0x00007f1b884febf9 in ?? ()
16 LWP 114 "ZMQbg/Reaper" 0x00007f1b8850bbb7 in ?? ()
17 LWP 115 "ZMQbg/IO/0" 0x00007f1b8850bbb7 in ?? ()
18 LWP 116 "python3.8" 0x00007f1b884febf9 in ?? ()
19 LWP 117 "grpc_global_tim" 0x00007f1b88505839 in ?? ()
20 LWP 118 "python3.8" 0x00007f1b881db6d6 in ?? ()
(gdb) quit
I'd like to see the python code.
the others inforamtion:
1)I was installed python3.8-gdb. The progarm of python3.8 is stripped.
2)I use another gdb to debug it, command is
gdb --pid 97, and get the message 'warning: Could not load vsyscall page because no executable was specified'
Attaching to process 97
[New LWP 100]
[New LWP 101]
[New LWP 102]
[New LWP 103]
[New LWP 104]
[New LWP 105]
[New LWP 106]
[New LWP 107]
[New LWP 108]
[New LWP 109]
[New LWP 110]
[New LWP 111]
[New LWP 112]
[New LWP 113]
[New LWP 114]
[New LWP 115]
[New LWP 116]
[New LWP 117]
[New LWP 118]
warning: Could not load vsyscall page because no executable was specified
0x00007f1b8850ca66 in ?? ()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
