René's URL Explorer Experiment


Title: gh-104090: Update Resource Tracker to return exit code based on resource leaked found or not by bityob · Pull Request #106807 · python/cpython · GitHub

Open Graph Title: gh-104090: Update Resource Tracker to return exit code based on resource leaked found or not by bityob · Pull Request #106807 · python/cpython

X Title: gh-104090: Update Resource Tracker to return exit code based on resource leaked found or not by bityob · Pull Request #106807 · python/cpython

Description: Add tests to catch the resource leak bug in collectedDurations and verified that it fails without the fix Show output $ ./python -m unittest test.test_concurrent_futures.FailingInitializerResourcesTest . /home/user/cpython/Lib/multiprocessing/resource_tracker.py:228: UserWarning: resource_tracker: There appear to be 3 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d ' FTraceback (most recent call last): File "/home/user/cpython/Lib/multiprocessing/util.py", line 300, in _run_finalizers finalizer() File "/home/user/cpython/Lib/multiprocessing/util.py", line 224, in __call__ res = self._callback(*self._args, **self._kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/cpython/Lib/multiprocessing/synchronize.py", line 87, in _cleanup sem_unlink(name) FileNotFoundError: [Errno 2] No such file or directory . . . ====================================================================== FAIL: test_forkserver (test.test_concurrent_futures.FailingInitializerResourcesTest.test_forkserver) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/user/cpython/Lib/test/test_concurrent_futures.py", line 318, in test_forkserver self._test(ProcessPoolForkserverFailingInitializerTest) File "/home/user/cpython/Lib/test/test_concurrent_futures.py", line 312, in _test self.assertEqual(_resource_tracker._exitcode, 0) AssertionError: 256 != 0 ====================================================================== FAIL: test_spawn (test.test_concurrent_futures.FailingInitializerResourcesTest.test_spawn) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/user/cpython/Lib/test/test_concurrent_futures.py", line 315, in test_spawn self._test(ProcessPoolSpawnFailingInitializerTest) File "/home/user/cpython/Lib/test/test_concurrent_futures.py", line 312, in _test self.assertEqual(_resource_tracker._exitcode, 0) AssertionError: 256 != 0 ---------------------------------------------------------------------- Ran 2 tests in 0.727s FAILED (failures=2) 0.33s Add returning exit code from resource_tracker.py based on the cleanup result, so we can check what was the result Add tests for Resource Tracker exit code based on leaked/no leaked resources Issue: gh-104090

Open Graph Description: Add tests to catch the resource leak bug in collectedDurations and verified that it fails without the fix Show output $ ./python -m unittest test.test_concurrent_futures.FailingInitializerResour...

X Description: Add tests to catch the resource leak bug in collectedDurations and verified that it fails without the fix Show output $ ./python -m unittest test.test_concurrent_futures.FailingInitializerResour...

Opengraph URL: https://github.com/python/cpython/pull/106807

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:15750e49-02f5-77d3-462d-a309cb0b3d47
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBC60:342079:185816C:2245FE7:699724B7
html-safe-noncef727b00161878fe9f8286b06dd03a94973e4d57aab16f817892eb0cdf961afc1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzYwOjM0MjA3OToxODU4MTZDOjIyNDVGRTc6Njk5NzI0QjciLCJ2aXNpdG9yX2lkIjoiNDc2NDgwMjU0MDYwNDE3MTQ0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac083462c8df5e40d9c01b6b4469dfc44a8bfdf35f2759420032b39cae6e617d21
hovercard-subject-tagpull_request:1436248094
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
twitter:imagehttps://avatars.githubusercontent.com/u/20026896?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/20026896?s=400&v=4
og:image:altAdd tests to catch the resource leak bug in collectedDurations and verified that it fails without the fix Show output $ ./python -m unittest test.test_concurrent_futures.FailingInitializerResour...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7e6af791057690a60ffd9f5bb19a1e7b7637429945357211e6d6d09f15f081ae
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
releasee6b01c3dc21c2addba0d96343ac1390c86c8bdfd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F106807%2Fcommits%2F3b21d5c17018012f6990c6aa5d51aacc4be8545e
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%2Fpython%2Fcpython%2Fpull%2F106807%2Fcommits%2F3b21d5c17018012f6990c6aa5d51aacc4be8545e
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%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
Reloadhttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
Reloadhttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.6k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
bityobhttps://github.com/bityob
python:mainhttps://github.com/python/cpython/tree/main
bityob:gh-104090-fix-leaked-semaphors-on-test_concurrent_futures-v2https://github.com/bityob/cpython/tree/gh-104090-fix-leaked-semaphors-on-test_concurrent_futures-v2
Conversation 41 https://github.com/python/cpython/pull/106807
Commits 22 https://github.com/python/cpython/pull/106807/commits
Checks 0 https://github.com/python/cpython/pull/106807/checks
Files changed https://github.com/python/cpython/pull/106807/files
Please reload this pagehttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
gh-104090: Update Resource Tracker to return exit code based on resource leaked found or not https://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e#top
Show all changes 22 commits https://github.com/python/cpython/pull/106807/files
70a35a2 Updated Resource Tracker to return exit code based on leaking found o… bityob Jul 16, 2023 https://github.com/python/cpython/pull/106807/commits/70a35a2fe38dcae7d176ce200d9bf902cc4d7e4b
da7e245 Add NEWS file bityob Jul 16, 2023 https://github.com/python/cpython/pull/106807/commits/da7e245cf0070495956a9ff3c3a21036f6c3cc16
1de022d Use subTest for the parametrize the same tests with different values bityob Jul 17, 2023 https://github.com/python/cpython/pull/106807/commits/1de022d390734727c4a857a8d2ca3ad25e63afe6
48bea84 Merge branch 'main' into gh-104090-fix-leaked-semaphors-on-test_concu… bityob Jul 17, 2023 https://github.com/python/cpython/pull/106807/commits/48bea8412fcf44afd4e50103abd0af3066fa761a
31bc4af Updated tests based on PR comments, and fix the resource_tracker code… bityob Jul 18, 2023 https://github.com/python/cpython/pull/106807/commits/31bc4afae5994ee17d705f399523a52f160a7233
47551a3 Clean test bityob Jul 18, 2023 https://github.com/python/cpython/pull/106807/commits/47551a3014f98c905d9e587842fde27767b1b0f5
a02fdbe Added comment for test and simplified the logic bityob Jul 18, 2023 https://github.com/python/cpython/pull/106807/commits/a02fdbe486c2038f0d838296f4d973d2024313fd
9d0369e Merge branch 'main' into gh-104090-fix-leaked-semaphors-on-test_concu… bityob Jul 18, 2023 https://github.com/python/cpython/pull/106807/commits/9d0369e18d80375baa5830422ef0e0116e7b5783
4dbb777 Fix tests and News based on PR comments bityob Jul 18, 2023 https://github.com/python/cpython/pull/106807/commits/4dbb777451a2d32542995769f61a94f09a8edf0e
bfd1e8e Added reseting the exit code when the process should run again bityob Jul 18, 2023 https://github.com/python/cpython/pull/106807/commits/bfd1e8ee65010040115d35611d01975596353fef
043ae90 Added more clearing queue methods beside del (closing and calling gc.… bityob Jul 18, 2023 https://github.com/python/cpython/pull/106807/commits/043ae90b58f6f35ef36c0178849f2a0ccd25dd5b
850b5bb Merge branch 'main' into gh-104090-fix-leaked-semaphors-on-test_concu… bityob Jul 18, 2023 https://github.com/python/cpython/pull/106807/commits/850b5bb44c96533e5bc7c839935ca033a6391f52
6e82940 Merge branch 'main' into gh-104090-fix-leaked-semaphors-on-test_concu… bityob Jul 19, 2023 https://github.com/python/cpython/pull/106807/commits/6e829407850a08011a9d24e27e6fd09d01373665
a5cb934 Merge branch 'gh-104090-fix-leaked-semaphors-on-test_concurrent_futur… bityob Jul 19, 2023 https://github.com/python/cpython/pull/106807/commits/a5cb9347471efe17a4b467e0785883eff2e67fcd
ccd736c Merge branch 'main' into gh-104090-fix-leaked-semaphors-on-test_concu… bityob Jul 20, 2023 https://github.com/python/cpython/pull/106807/commits/ccd736c4113c9646156c9ab8649394b2a027c178
3b21d5c Merge branch 'main' into gh-104090-fix-leaked-semaphors-on-test_concu… bityob Jul 23, 2023 https://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
fbd18ec Merge main bityob Aug 31, 2023 https://github.com/python/cpython/pull/106807/commits/fbd18ec36c3a93ea471b7c543d15c298ee69e8f3
e258cb3 Moved FailingInitializerResourcesTest class from old path (Lib/test/t… bityob Aug 31, 2023 https://github.com/python/cpython/pull/106807/commits/e258cb3a99f428fe4575a7b66caaa498c35c44a5
5b886bf Merge branch 'gh-104090-fix-leaked-semaphors-on-test_concurrent_futur… bityob Aug 31, 2023 https://github.com/python/cpython/pull/106807/commits/5b886bf01c597abcbe0dce6489aed1a589b3ec24
915c8a3 Added missing import bityob Aug 31, 2023 https://github.com/python/cpython/pull/106807/commits/915c8a397158f5fe397459334a1803fdf9166f6b
cd377e6 Merge branch 'main' into gh-104090-fix-leaked-semaphors-on-test_concu… pitrou Sep 19, 2023 https://github.com/python/cpython/pull/106807/commits/cd377e691ab205c19abecf6d06480042dd63acf3
27245ec Merge branch 'main' into gh-104090-fix-leaked-semaphors-on-test_concu… encukou Feb 5, 2024 https://github.com/python/cpython/pull/106807/commits/27245ec952f3cd932b10552bcee7bec7cc89e4e1
Clear filters https://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
Please reload this pagehttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
Please reload this pagehttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
Prev https://github.com/python/cpython/pull/106807/commits/ccd736c4113c9646156c9ab8649394b2a027c178
Next https://github.com/python/cpython/pull/106807/commits/fbd18ec36c3a93ea471b7c543d15c298ee69e8f3
gh-104090https://github.com/python/cpython/issues/104090
Please reload this pagehttps://github.com/python/cpython/pull/106807/commits/3b21d5c17018012f6990c6aa5d51aacc4be8545e
https://github.com/bityob
bityobhttps://github.com/python/cpython/commits?author=bityob
view the diff.https://github.com/python/cpython/commit/3b21d5c17018012f6990c6aa5d51aacc4be8545e
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.