René's URL Explorer Experiment


Title: Dict memory leak in Python 3.12.x / msgpack 1.0.x · Issue #612 · msgpack/msgpack-python · GitHub

Open Graph Title: Dict memory leak in Python 3.12.x / msgpack 1.0.x · Issue #612 · msgpack/msgpack-python

X Title: Dict memory leak in Python 3.12.x / msgpack 1.0.x · Issue #612 · msgpack/msgpack-python

Description: Hello, I think I've found a second Python 3.12 memory leak (having read the issue for the other one, and tried upgrading to msgpack 1.0.8 to fix). This issue occurs with dicts, and key uniqueness seems to be a major consideration. (A bun...

Open Graph Description: Hello, I think I've found a second Python 3.12 memory leak (having read the issue for the other one, and tried upgrading to msgpack 1.0.8 to fix). This issue occurs with dicts, and key uniqueness s...

X Description: Hello, I think I've found a second Python 3.12 memory leak (having read the issue for the other one, and tried upgrading to msgpack 1.0.8 to fix). This issue occurs with dicts, and key uniquene...

Opengraph URL: https://github.com/msgpack/msgpack-python/issues/612

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dict memory leak in Python 3.12.x / msgpack 1.0.x","articleBody":"Hello,\r\n\r\nI think I've found a second Python 3.12 memory leak (having read the issue for the other one, and tried upgrading to msgpack 1.0.8 to fix).\r\n\r\nThis issue occurs with dicts, and key uniqueness seems to be a major consideration. (A bunch of dicts with the exact same keys don't cause the problem -- some kind of key caching issue maybe?)\r\n\r\nHere's a repro:\r\n\r\n```\r\nimport psutil\r\nimport msgpack\r\n\r\n# Set up a list of packed dicts\r\np = [\r\n    msgpack.packb(\r\n        {f'{p}.{r}': True for r in range(1000)}\r\n    )\r\n    for p in range(1000)\r\n]\r\n\r\n# Check initial state\r\nprint(f'initial mem: {psutil.Process().memory_info().rss}')\r\n\r\n# Loop and unpack\r\ni = 0\r\nfor x in p:\r\n    y = msgpack.unpackb(x)\r\n    i += 1\r\n    if i % 100 == 0:\r\n        print(f'subsequent mem: {psutil.Process().memory_info().rss}')\r\n```\r\n\r\nOutput, msgpack 1.0.8 on Python 3.12.3:\r\n```\r\ninitial mem: 24571904\r\nsubsequent mem: 34029568\r\nsubsequent mem: 42627072\r\nsubsequent mem: 47493120\r\nsubsequent mem: 60088320\r\nsubsequent mem: 64684032\r\nsubsequent mem: 69550080\r\nsubsequent mem: 89878528\r\nsubsequent mem: 94744576\r\nsubsequent mem: 99340288\r\nsubsequent mem: 104206336\r\n```\r\n\r\nOutput, msgpack 0.6.2 on Python 3.12.3 or msgpack 1.0.8 on Python 3.11.9 (slightly different numbers but same effect):\r\n```\r\ninitial mem: 22761472\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\nsubsequent mem: 23089152\r\n```\r\n\r\np.s. apologies for using `psutil` in the script, I didn't remember until later that it isn't a Python built-in.\r\n","author":{"url":"https://github.com/amachanic","@type":"Person","name":"amachanic"},"datePublished":"2024-05-24T20:15:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/612/msgpack-python/issues/612"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:436f44e3-6359-4dbd-0868-87d78ee7688f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE310:297F82:19DA11B:2394F0F:696AB34C
html-safe-nonce41d21e71d03d92ca123a507a7c59ed195a9deccf7096556a178c2179d0dd6132
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzEwOjI5N0Y4MjoxOURBMTFCOjIzOTRGMEY6Njk2QUIzNEMiLCJ2aXNpdG9yX2lkIjoiNjAxNDM2OTg2NzQ1NDEzMzA2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac86da1139db32ad51097d56ba7fcfef995aaa5a66926f39ff99b5415a7dce6371
hovercard-subject-tagissue:2316191603
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/msgpack/msgpack-python/612/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4fbfa1ae5b94dfb366fa88014901c6e9f1387b00e7cff9f6ff127421e5350093/msgpack/msgpack-python/issues/612
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4fbfa1ae5b94dfb366fa88014901c6e9f1387b00e7cff9f6ff127421e5350093/msgpack/msgpack-python/issues/612
og:image:altHello, I think I've found a second Python 3.12 memory leak (having read the issue for the other one, and tried upgrading to msgpack 1.0.8 to fix). This issue occurs with dicts, and key uniqueness s...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameamachanic
hostnamegithub.com
expected-hostnamegithub.com
None4fa1799b6a53c2d30c950d74230781bef9e7f61138c72c7727e4b83f0743752b
turbo-cache-controlno-preview
go-importgithub.com/msgpack/msgpack-python git https://github.com/msgpack/msgpack-python.git
octolytics-dimension-user_id198264
octolytics-dimension-user_loginmsgpack
octolytics-dimension-repository_id2242705
octolytics-dimension-repository_nwomsgpack/msgpack-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2242705
octolytics-dimension-repository_network_root_nwomsgpack/msgpack-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
release41f276818bd204c4a30a0281fb3c576298d9474c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/msgpack/msgpack-python/issues/612#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmsgpack%2Fmsgpack-python%2Fissues%2F612
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmsgpack%2Fmsgpack-python%2Fissues%2F612
Sign up https://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=msgpack%2Fmsgpack-python
Reloadhttps://github.com/msgpack/msgpack-python/issues/612
Reloadhttps://github.com/msgpack/msgpack-python/issues/612
Reloadhttps://github.com/msgpack/msgpack-python/issues/612
msgpack https://github.com/msgpack
msgpack-pythonhttps://github.com/msgpack/msgpack-python
Notifications https://github.com/login?return_to=%2Fmsgpack%2Fmsgpack-python
Fork 237 https://github.com/login?return_to=%2Fmsgpack%2Fmsgpack-python
Star 2.1k https://github.com/login?return_to=%2Fmsgpack%2Fmsgpack-python
Code https://github.com/msgpack/msgpack-python
Issues 3 https://github.com/msgpack/msgpack-python/issues
Pull requests 3 https://github.com/msgpack/msgpack-python/pulls
Discussions https://github.com/msgpack/msgpack-python/discussions
Actions https://github.com/msgpack/msgpack-python/actions
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/msgpack/msgpack-python/security
Please reload this pagehttps://github.com/msgpack/msgpack-python/issues/612
Insights https://github.com/msgpack/msgpack-python/pulse
Code https://github.com/msgpack/msgpack-python
Issues https://github.com/msgpack/msgpack-python/issues
Pull requests https://github.com/msgpack/msgpack-python/pulls
Discussions https://github.com/msgpack/msgpack-python/discussions
Actions https://github.com/msgpack/msgpack-python/actions
Security https://github.com/msgpack/msgpack-python/security
Insights https://github.com/msgpack/msgpack-python/pulse
New issuehttps://github.com/login?return_to=https://github.com/msgpack/msgpack-python/issues/612
New issuehttps://github.com/login?return_to=https://github.com/msgpack/msgpack-python/issues/612
Dict memory leak in Python 3.12.x / msgpack 1.0.xhttps://github.com/msgpack/msgpack-python/issues/612#top
https://github.com/amachanic
https://github.com/amachanic
amachanichttps://github.com/amachanic
on May 24, 2024https://github.com/msgpack/msgpack-python/issues/612#issue-2316191603
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.