René's URL Explorer Experiment


Title: Change in OSX Catalina makes matplotlib + multiprocessing crash · Issue #15410 · matplotlib/matplotlib · GitHub

Open Graph Title: Change in OSX Catalina makes matplotlib + multiprocessing crash · Issue #15410 · matplotlib/matplotlib

X Title: Change in OSX Catalina makes matplotlib + multiprocessing crash · Issue #15410 · matplotlib/matplotlib

Description: I'm getting a crash on macOS Catalina when running some multiprocessing code after doing some plotting with matplotlib. Looks like this: libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't close file...

Open Graph Description: I'm getting a crash on macOS Catalina when running some multiprocessing code after doing some plotting with matplotlib. Looks like this: libc++abi.dylib: terminating with uncaught exception of type...

X Description: I'm getting a crash on macOS Catalina when running some multiprocessing code after doing some plotting with matplotlib. Looks like this: libc++abi.dylib: terminating with uncaught exception of ...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/15410

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Change in OSX Catalina makes matplotlib + multiprocessing crash","articleBody":"I'm getting a crash on macOS Catalina when running some multiprocessing code after doing some plotting with matplotlib.\r\n\r\nLooks like this:\r\n```\r\nlibc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't close file\r\nFatal Python error: Aborted\r\n```\r\nand using `print(psutil.Process().open_files())` I figured out that likely the issue is that this MPL TTF font file is opened multiple times and (I guess) for some reason closing the file occurs only later, from my multiprocessing code, and that fails on macOS Catalina.\r\n```\r\nopen files: [popenfile(path='/Users/deil/anaconda3/envs/gammapy-dev/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf', fd=5), popenfile(path='/Users/deil/anaconda3/envs/gammapy-dev/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf', fd=6), popenfile(path='/Users/deil/anaconda3/envs/gammapy-dev/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSansDisplay.ttf', fd=7), popenfile(path='/Users/deil/anaconda3/envs/gammapy-dev/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSansDisplay.ttf', fd=8)]\r\n```\r\n\r\nI tried to extract a minimal test case that doesn't involve our software, but couldn't so far, sorry.\r\nBut you should be able to reproduce the crash by copy \u0026 pasting these commands:\r\n```\r\ngit clone https://github.com/gammapy/gammapy.git\r\ncd gammapy\r\nconda env create -f environment-dev.yml\r\npip install -e .\r\npytest -s -v gammapy/cube\r\n```\r\nLog: https://gist.github.com/cdeil/a75211856a3bcab751ead707df9708c9#file-gistfile1-txt-L88\r\n\r\nI know MPL isn't thread-safe. But it should be possible to do some plotting, and then later after plotting is done to run some multiprocessing code, no?\r\n\r\nIs it normal that the file handle for `DejaVuSansDisplay.ttf` remains open?\r\nShouldn't MPL load the file content and close the file handle directly?\r\nMaybe that is a bug?\r\n\r\nI don't think it matters for this issue, but in case it does -- we are calling `plt.close()` after all plotting from our tests, because previously we had a problem with too many open figures (see [here](\r\nhttps://github.com/gammapy/gammapy/blob/d4db11d559b210c0e0d03bba75ddcff9c03e0511/gammapy/utils/testing.py#L209-L230\r\n\r\n```\r\n(gammapy-dev) hfm-1804a:gammapy deil$ python --version\r\nPython 3.7.0\r\n(gammapy-dev) hfm-1804a:gammapy deil$ python -c 'import matplotlib; print(matplotlib.__version__)'\r\n3.1.1\r\n(gammapy-dev) hfm-1804a:gammapy deil$ python -c 'import matplotlib; print(matplotlib.get_backend())'\r\nMacOSX\r\n```","author":{"url":"https://github.com/cdeil","@type":"Person","name":"cdeil"},"datePublished":"2019-10-12T09:49:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":38},"url":"https://github.com/15410/matplotlib/issues/15410"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:13282003-77bc-d7c7-1f5f-b25e8c15032f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA3F4:26AD97:E8EDFE:1385E6C:6A52916E
html-safe-noncef628d91e9c961c5911d87f75c1514462cc85f361f6c15920d38f5f1758d3cbe1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0Y0OjI2QUQ5NzpFOEVERkU6MTM4NUU2Qzo2QTUyOTE2RSIsInZpc2l0b3JfaWQiOiI2MTY4NTA1NDI0NzAwMTUwMTI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac52dd21c63b0907be46d220cc374d119cc1dcb76f9269de4a629d66eff00adede
hovercard-subject-tagissue:506163599
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/matplotlib/matplotlib/15410/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a27e7dc4c8b56c13d209544ad8dc0077e6d6cf7eb0703bae0acbcfb7b308050c/matplotlib/matplotlib/issues/15410
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a27e7dc4c8b56c13d209544ad8dc0077e6d6cf7eb0703bae0acbcfb7b308050c/matplotlib/matplotlib/issues/15410
og:image:altI'm getting a crash on macOS Catalina when running some multiprocessing code after doing some plotting with matplotlib. Looks like this: libc++abi.dylib: terminating with uncaught exception of type...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecdeil
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
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
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/15410#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F15410
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2Fmatplotlib%2Fmatplotlib%2Fissues%2F15410
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=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/15410
Reloadhttps://github.com/matplotlib/matplotlib/issues/15410
Reloadhttps://github.com/matplotlib/matplotlib/issues/15410
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/15410
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/15410
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 408 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Change in OSX Catalina makes matplotlib + multiprocessing crashhttps://github.com/matplotlib/matplotlib/issues/15410#top
OS: Applehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22OS%3A%20Apple%22
status: needs clarificationIssues that need more information to resolve.https://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22status%3A%20needs%20clarification%22
v3.3.0https://github.com/matplotlib/matplotlib/milestone/48
https://github.com/cdeil
cdeilhttps://github.com/cdeil
on Oct 12, 2019https://github.com/matplotlib/matplotlib/issues/15410#issue-506163599
https://gist.github.com/cdeil/a75211856a3bcab751ead707df9708c9#file-gistfile1-txt-L88https://gist.github.com/cdeil/a75211856a3bcab751ead707df9708c9#file-gistfile1-txt-L88
https://github.com/gammapy/gammapy/blob/d4db11d559b210c0e0d03bba75ddcff9c03e0511/gammapy/utils/testing.py#L209-L230https://github.com/gammapy/gammapy/blob/d4db11d559b210c0e0d03bba75ddcff9c03e0511/gammapy/utils/testing.py#L209-L230
OS: Applehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22OS%3A%20Apple%22
status: needs clarificationIssues that need more information to resolve.https://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22status%3A%20needs%20clarification%22
v3.3.0https://github.com/matplotlib/matplotlib/milestone/48
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.