Skip to content

Instantly share code, notes, and snippets.

@dimaqq
Created July 1, 2019 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimaqq/867350a64be5d1dcca78c4e3e8a6d7d0 to your computer and use it in GitHub Desktop.
Save dimaqq/867350a64be5d1dcca78c4e3e8a6d7d0 to your computer and use it in GitHub Desktop.
/app # wget https://raw.githubusercontent.com/python/cpython/master/Tools/gdb/libpython.py
...
/app # apk add gdb
...
/app # env PYTHONPATH=. gdb
GNU gdb (GDB) 8.2
...
(gdb) python import libpython
(gdb) attach 14
Attaching to process 14
[New LWP 26]
[New LWP 27]
0x00007fb0a26733d0 in epoll_pwait () from /lib/ld-musl-x86_64.so.1
(gdb) py-bt
Traceback (most recent call first):
File "/usr/local/lib/python3.7/selectors.py", line 468, in select
fd_event_list = self._selector.poll(timeout, max_ev)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1739, in _run_once
event_list = self._selector.select(timeout)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
self._run_once()
...
@dimaqq
Copy link
Author

dimaqq commented Jul 1, 2019

ssh -i ~/.ssh/your_special_key ec2-user@52.xx.xx.xx

[ec2-user@ip-10-0-x-xxx ~]$ docker exec -it b1xxxxxxxxxx sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment