René's URL Explorer Experiment


Title: Debbuging a `-slim` image? · Issue #903 · docker-library/python · GitHub

Open Graph Title: Debbuging a `-slim` image? · Issue #903 · docker-library/python

X Title: Debbuging a `-slim` image? · Issue #903 · docker-library/python

Description: We are hitting a rare deadlock in production that can't be reproduced using debug images. Only way to debug it is to attach to the production image as the problem happens. Problem is that production are based on the -slim images. apt ins...

Open Graph Description: We are hitting a rare deadlock in production that can't be reproduced using debug images. Only way to debug it is to attach to the production image as the problem happens. Problem is that productio...

X Description: We are hitting a rare deadlock in production that can't be reproduced using debug images. Only way to debug it is to attach to the production image as the problem happens. Problem is that produ...

Opengraph URL: https://github.com/docker-library/python/issues/903

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Debbuging a `-slim` image?","articleBody":"We are hitting a rare deadlock in production that can't be reproduced using debug images.\r\nOnly way to debug it is to attach to the production image as the problem happens.\r\nProblem is that production are based on the `-slim` images.\r\n\r\n`apt install gdb` and `python3-dbg` is not enough because the python running is built from source and not aligned with what is available in apt.\r\n\r\nI've tried to start the corresponding non-slim image but their binaries don't seem to align enough to make gdb happy:\r\n\r\n### Start python inside `-slim` image\r\n:arrow_right: *My end goal is to run gdb `py-bt` on this process:* \r\n`docker run -ti python:3.11-slim-bookworm python3 -c \"import time; time.sleep(1000)\"`\r\n\r\nInside this image there is no chance to debug at all due to missing gdb and debug symbols. This is expected.\r\n\r\n### Build a debugger image from the corresponding non`-slim` image.\r\n```\r\nFROM python:3.11-bookworm\r\n\r\nRUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \\\r\n    apt update -y && \\\r\n    apt install -y gdb\r\n```\r\n`docker build -t mydebugpython .`\r\n\r\n### Use the newly built debug image to attach into the first running container\r\nFind the container id and use that to attach to the same pid-namespace.\r\n```\r\ndocker run \\\r\n    --cap-add SYS_PTRACE \\\r\n    --pid container:15aab7ea5f57 \\\r\n    --privileged  \\\r\n    -ti \\\r\n    --entrypoint bash docker.io/library/mydebugpython\r\n```\r\n```\r\nroot@bb90d04f8722:/# gdb -q python --pid 1 -ex \"py-bt\"\r\n\r\nReading symbols from python...\r\nAttaching to program: /usr/local/bin/python, process 1\r\n\r\nwarning: Build ID mismatch between current exec-file /usr/local/bin/python\r\nand automatically determined exec-file /usr/local/bin/python3.11\r\nexec-file-mismatch handling is currently \"ask\"\r\n\r\nLoad new symbol table from \"/usr/local/bin/python3.11\"? (y or n) y\r\nReading symbols from /usr/local/bin/python3.11...\r\nReading symbols from target:/usr/local/bin/../lib/libpython3.11.so.1.0...\r\n(No debugging symbols found in target:/usr/local/bin/../lib/libpython3.11.so.1.0)\r\nReading symbols from target:/lib/x86_64-linux-gnu/libc.so.6...\r\nReading symbols from /usr/lib/debug/.build-id/82/ce4e6e4ef08fa58a3535f7437bd3e592db5ac0.debug...\r\nReading symbols from target:/lib/x86_64-linux-gnu/libm.so.6...\r\nReading symbols from /usr/lib/debug/.build-id/ea/87e1b3daf095cd53f1f99ab34a88827eccce80.debug...\r\nReading symbols from target:/lib64/ld-linux-x86-64.so.2...\r\nReading symbols from /usr/lib/debug/.build-id/38/e7d4a67acf053c794b3b8094e6900b5163f37d.debug...\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".\r\n__GI___clock_nanosleep (clock_id=1, flags=1, req=0x7ffd9d9ec458, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:71\r\n71\t../sysdeps/unix/sysv/linux/clock_nanosleep.c: No such file or directory.\r\nTraceback (most recent call first):\r\n  (unable to read python frame information)    # \u003c--------------   :(\r\n```\r\n\r\n--------------\r\nSo it seems like the difference of `slim` and non`-slim` isn't only the _presence_ of debug symbols or not, but also the binary is built differently?\r\nIs this possible to solve somehow? My knowledge of how python is built and how to operate gdb are only moderate.","author":{"url":"https://github.com/hterik","@type":"Person","name":"hterik"},"datePublished":"2024-02-02T10:27:48Z","url":"https://github.com/docker-library/python/issues/903"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ec4fc7f0-bc14-76bd-edbc-f4376eb3dac5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id91C0:30C434:C30C38:10C07A4:6AFE8B8B
html-safe-nonce3416cafdfd939174ab2e5b9f7b02832e0872bf4c8f86f16673656e3e3113e45f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUMwOjMwQzQzNDpDMzBDMzg6MTBDMDdBNDo2QUZFOEI4QiIsInZpc2l0b3JfaWQiOiI4MDc4NDM3OTI3NjczMDM5NzU1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9d830500ea134dc61faa32ab0e166122ee163db82284ab2b25b54c949c0995ea
hovercard-subject-tagissue:2114599831
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/docker-library/python/903/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ef6b1d31f18fed4f97f3f3c9032a3b10d0b91ff96fb49f2c33d027ffce3e083a/docker-library/python/issues/903
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ef6b1d31f18fed4f97f3f3c9032a3b10d0b91ff96fb49f2c33d027ffce3e083a/docker-library/python/issues/903
og:image:altWe are hitting a rare deadlock in production that can't be reproduced using debug images. Only way to debug it is to attach to the production image as the problem happens. Problem is that productio...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehterik
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/docker-library/python git https://github.com/docker-library/python.git
octolytics-dimension-user_id7739233
octolytics-dimension-user_logindocker-library
octolytics-dimension-repository_id21054928
octolytics-dimension-repository_nwodocker-library/python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21054928
octolytics-dimension-repository_network_root_nwodocker-library/python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/docker-library/python/issues/903#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdocker-library%2Fpython%2Fissues%2F903
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdocker-library%2Fpython%2Fissues%2F903
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=docker-library%2Fpython
Reloadhttps://github.com/docker-library/python/issues/903
Reloadhttps://github.com/docker-library/python/issues/903
Reloadhttps://github.com/docker-library/python/issues/903
docker-libraryhttps://github.com/docker-library
pythonhttps://github.com/docker-library/python
Codehttps://github.com/docker-library/python
Issues23 (23)https://github.com/docker-library/python/issues
Pull requests5 (5)https://github.com/docker-library/python/pulls
Discussionshttps://github.com/docker-library/python/discussions
Actionshttps://github.com/docker-library/python/actions
Projectshttps://github.com/docker-library/python/projects
Security and qualityhttps://github.com/docker-library/python/security
Insightshttps://github.com/docker-library/python/insights
https://github.com/docker-library/python
New issuehttps://github.com/login?return_to=https://github.com/docker-library/python/issues/903
New issuehttps://github.com/login?return_to=https://github.com/docker-library/python/issues/903
Debbuging a -slim image?https://github.com/docker-library/python/issues/903#top
https://github.com/hterik
hterikhttps://github.com/hterik
on Feb 2, 2024https://github.com/docker-library/python/issues/903#issue-2114599831
https://github.com/Luiz-Monad
Luiz-Monadhttps://github.com/Luiz-Monad
on Mar 4, 2024https://github.com/docker-library/python/issues/903#issuecomment-1977260350
#807https://github.com/docker-library/python/issues/807
Luiz-Monad@fe752b6#diff-b3c0fcf605d397bd3fce8ea61588d2c9da8b24a9fe6886b2e640d97914f1d01fhttps://github.com/Luiz-Monad/docker-python/commit/fe752b6410d1defc6e42400120f2605bf9d6f3e7#diff-b3c0fcf605d397bd3fce8ea61588d2c9da8b24a9fe6886b2e640d97914f1d01f
#701https://github.com/docker-library/python/pull/701
Sign up for freehttps://github.com/signup?return_to=https://github.com/docker-library/python/issues/903
Sign in to commenthttps://github.com/login?return_to=https://github.com/docker-library/python/issues/903
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.