You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@516ce4c20e51:/# gdb -p 8
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 563, in <module>
main()
File "/usr/lib/python2.7/site.py", line 545, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python2.7/site.py", line 237, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python2.7/sysconfig.py", line 582, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python2.7/sysconfig.py", line 528, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python2.7/sysconfig.py", line 412, in _init_posix
from _sysconfigdata import build_time_vars
File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in <module>
from _sysconfigdata_nd import *
ImportError: No module named _sysconfigdata_nd
It would appear the problem is that gdb depends on: file gdbserver libc6-dbg libexpat1 libmagic1 libpython2.7 libpython2.7-minimal libpython2.7-stdlib mime-support. Looks like gdb is rigged to work with the python from the repositories, not whatever is available.
I have a python docker image built with modifications from the current 3.6.3 dockerfile (i'll be making that a public repo today). This does require doing a debug build of python, and running the container with SYS_PTRACE capability. These both increase repo size and decrease container security. The container size increase is unavoidable; but the use of sys_ptrace is only needed when you know you will need to attach to the container.
I'll update this issue when I have a the exemplar repository available.
My example repo is here https://github.com/vertexproject/pydebug. After pulling the images built from docker-cloud there is pretty negligible size difference.
vertexproject/pydebug 3.6-slim dc5245838148 About an hour ago 174MB
vertexproject/pydebug 3.6.3-slim a18b561907c6 About an hour ago 174MB
python 3.6-slim a79297999298 4 weeks ago 156MB
python 3.6.3-slim a79297999298 4 weeks ago 156MB
#251 seems to imply that this potentially might require compiling GDB from source in order to actually fix it, which is really nasty (and I hope not the case) 😞
Closing, since this seems to be something we can't easily enable (without possibly compiling GDB from source, which is kind of nasty and we don't want to embed GDB itself in the image). Sorry!
Activity
ionelmc commentedon Apr 16, 2016
It would appear the problem is that
gdbdepends on:file gdbserver libc6-dbg libexpat1 libmagic1 libpython2.7 libpython2.7-minimal libpython2.7-stdlib mime-support. Looks like gdb is rigged to work with the python from the repositories, not whatever is available.What's a nice way to sort this out?
tianon commentedon Aug 8, 2016
Is this related in some way to #89?
ionelmc commentedon Aug 8, 2016
Perhaps that could provide a solution, no idea. I'm not that versed in gdb features.
vEpiphyte commentedon Dec 5, 2017
@ionelmc / @tianon
I have a python docker image built with modifications from the current 3.6.3 dockerfile (i'll be making that a public repo today). This does require doing a debug build of python, and running the container with
SYS_PTRACEcapability. These both increase repo size and decrease container security. The container size increase is unavoidable; but the use of sys_ptrace is only needed when you know you will need to attach to the container.I'll update this issue when I have a the exemplar repository available.
cc: @jennolsen84
vEpiphyte commentedon Dec 6, 2017
My example repo is here https://github.com/vertexproject/pydebug. After pulling the images built from docker-cloud there is pretty negligible size difference.
tianon commentedon Apr 25, 2018
#251 seems to imply that this potentially might require compiling GDB from source in order to actually fix it, which is really nasty (and I hope not the case) 😞
tianon commentedon Sep 6, 2018
Closing, since this seems to be something we can't easily enable (without possibly compiling GDB from source, which is kind of nasty and we don't want to embed GDB itself in the image). Sorry!