docker-library / docker-library/python
"debug build" for at least one image
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 2.8k
- Forks
- 1.1k
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Description
Recently we had a C extension for python failing in production in an environment that we do not own ourselves. The data in that environment was causing the issues. Because for that reason, it was complicated to reproduce it in different environments, we looked into running a debug version of python in that environment to understand where it was crashing, but that turned out quite complicated to do.
In the end I managed to home in on the data issues, set up data locally to reproduce it and build a debug version of the slim-bullseye image that I could use as a source for our application image. This allowed us to dump a core and investigate the back traces.
Would it be helpful to have at least one image that contains a debug build of python in this stack, so that it's easier for developers to switch to that image and do this analysis?
An image that adds these lines to .,/configure
--with-pydebug \
CFLAGS="-g -O0" \
and sets LDFLAGS="" instead of LDFLAGS="-Wl,--strip-all"; \ ,
installs gdb and gdb extensions (# enable GDB to load debugging data: https://github.com/docker-library/python/pull/701)
If that's not a good idea, could you let me know what you'd recommend otherwise as a better process?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how the slim-bullseye image is built and where its ./configure options and LDFLAGS are set. Check the proposed Python debug-build flags, GDB installation, and GDB extensions against the existing image process. Done means the project has a documented debug image or a clear maintainer-approved alternative for producing core dumps and backtraces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- build-system, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100