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
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?
The text was updated successfully, but these errors were encountered:
The matrix of supported variants for this image is already pretty large (multiplied by base image combinations and supported architectures), and compiling Python from source is kind of heavy, so we're not super comfortable supporting even more variance. 😅
And this is the reason it wasn't a good idea. ( Luiz-Monad@af7b613 ) . Alpine didn't have the package for systemtap (aka dtrace), oh well.
An idea would be for the debug image to be only available for the latest platforms on x64 only, that would cut the amount of extra images. Also, when you have a problem its a good thing to just update the image to see if it solves itself before attempting to actually debug inside the container, or just fork the repository and add specifically the images you need.
You could at least have the option in the script for the debug so we can do that ourselves if we needed, but that would also be extra thing to maintain.
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?
The text was updated successfully, but these errors were encountered: