René's URL Explorer Experiment


Title: Regression in multiprocessing example using venv on Windows in 3.11rc2 · Issue #98360 · python/cpython · GitHub

Open Graph Title: Regression in multiprocessing example using venv on Windows in 3.11rc2 · Issue #98360 · python/cpython

X Title: Regression in multiprocessing example using venv on Windows in 3.11rc2 · Issue #98360 · python/cpython

Description: I'm programming in PyCharm in Virtual Environment on Win11 on a 12900k I use 2 modules: • mp_tst_all.py • mp_tst_a.py Details mp_tst_all.py import multiprocessing import platform import mp_tst_a def run_my_multi(): p_xyz = multiprocessin...

Open Graph Description: I'm programming in PyCharm in Virtual Environment on Win11 on a 12900k I use 2 modules: • mp_tst_all.py • mp_tst_a.py Details mp_tst_all.py import multiprocessing import platform import mp_tst_a de...

X Description: I'm programming in PyCharm in Virtual Environment on Win11 on a 12900k I use 2 modules: • mp_tst_all.py • mp_tst_a.py Details mp_tst_all.py import multiprocessing import platform import mp_tst_...

Opengraph URL: https://github.com/python/cpython/issues/98360

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression in multiprocessing example using venv on Windows in 3.11rc2","articleBody":"I'm programming in PyCharm in Virtual Environment on Win11 on a 12900k\r\n\r\nI use 2 modules:\r\n• mp_tst_all.py\r\n• mp_tst_a.py\r\n\r\n\u003cdetails\u003e\r\n\r\n# mp_tst_all.py\r\n```\r\nimport multiprocessing\r\nimport platform\r\n\r\nimport mp_tst_a\r\n\r\n\r\ndef run_my_multi():\r\n    p_xyz = multiprocessing.Process(\r\n        target=mp_tst_a.run_main,\r\n        args=())\r\n\r\n    # p_... = ...\r\n\r\n    p_xyz.start()\r\n    # p_... .start()\r\n\r\n    p_xyz.join()\r\n    # p_... .join()\r\n\r\n    return\r\n\r\n\r\nif __name__ == '__main__':\r\n\r\n    print('py:', platform.python_version())\r\n\r\n    run_my_multi()\r\n\r\n```\r\n\r\n# mp_tst_a.py\r\n```\r\nimport multiprocessing\r\nimport time\r\nimport platform\r\n\r\nmain_queue = multiprocessing.Queue()\r\n\r\n\r\ndef load_directory(def_queue):\r\n\r\n    content_def = def_queue.get()\r\n    content_def['load_directory_is_alive'] = True\r\n    def_queue.put(content_def)\r\n\r\n    # ---- do something ... --------\r\n    print('\\n' + 'LOAD DIRECTORY:')\r\n    for x in range(3):\r\n        time.sleep(.6)\r\n        print('do something ...')\r\n    print('\\n' + 'LOAD ok' + '\\n')\r\n\r\n\r\n    content_def = def_queue.get()\r\n    content_def['load_directory_is_alive'] = False\r\n    content_def['run_load_file'] = True\r\n    def_queue.put(content_def)\r\n\r\n    return\r\n\r\n\r\ndef load_files(def_queue):\r\n\r\n    content_def = def_queue.get()\r\n    run_load_file_i = content_def['run_load_file']\r\n    def_queue.put(content_def)\r\n\r\n    # ---- do something ... --------\r\n    print('LOAD FILE:')\r\n    if run_load_file_i:\r\n        for x in range(3):\r\n            time.sleep(.6)\r\n            print('FILE ' + str(x))\r\n    print('\\n' + 'LOAD ok' + '\\n')\r\n\r\n    return\r\n\r\n\r\ndef run_main():\r\n\r\n    global main_queue\r\n\r\n    content = {\r\n        'load_directory_is_alive': None,\r\n        'run_load_file': None,\r\n        'last_download_date': None\r\n        }\r\n\r\n    main_queue.put(content)\r\n\r\n    rest = 0.2  # for test, try different values\r\n    time.sleep(rest)\r\n\r\n    jobs = []\r\n\r\n    content = main_queue.get()\r\n    content['last_download_date'] = 'xx.xx.xxxx'\r\n    main_queue.put(content)\r\n    time.sleep(rest)\r\n\r\n\r\n    # ---- process_1.1: load_directory -----------------------------------\r\n    process_1_1 = multiprocessing.Process(\r\n        target=load_directory, name='load_directory',\r\n        args=(main_queue, ))\r\n\r\n    jobs.append(process_1_1)\r\n    process_1_1.start()\r\n    time.sleep(rest)\r\n\r\n\r\n    # ---- do not begin process_2 before process_1.1: load_directory exits\r\n    while process_1_1.is_alive():\r\n        pass\r\n        time.sleep(rest)\r\n\r\n\r\n    # ---- process_2: load_files -----------------------------------------\r\n    process_2 = multiprocessing.Process(\r\n        target=load_files, name='load_files',\r\n        args=(main_queue, ))\r\n\r\n    jobs.append(process_2)\r\n    process_2.start()\r\n\r\n\r\n    process_1_1.join()\r\n    process_2.join()\r\n\r\n    return\r\n\r\n\r\nif __name__ == \"__main__\":\r\n\r\n    print('py:', platform.python_version())\r\n    run_main()\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\r\n# Bug\r\n\r\n**first:  with PyCharm**\r\n\r\nmp_tst_a.py works in py 3.11.0_rc2 and in py 3.10(.7)\r\n\r\n**but**\r\n\r\n**when mp_tst_a.py is called from mp_tst_all.py there is an error in py 3.11.0_rc2,**\r\nhowever, in py 3.10(.7) it works\r\n\r\nthe error message varies depending on the 'rest' variable (mp_tst_a.py -\u003e def run_main)\r\n\r\n```\r\nProcess load_directory:\r\nTraceback (most recent call last):\r\n  File \"C:\\...\\Python311\\Lib\\multiprocessing\\process.py\", line 314, in _bootstrap\r\n    self.run()\r\n  File \"C:\\...Python311\\Lib\\multiprocessing\\process.py\", line 108, in run\r\n    self._target(*self._args, **self._kwargs)\r\n  File \"C:\\...\\mp_test_single_a.py\", line 10, in load_directory\r\n    content_def = def_queue.get()\r\n                  ^^^^^^^^^^^^^^^\r\n  File \"C:\\...\\Python311\\Lib\\multiprocessing\\queues.py\", line 102, in get\r\n    with self._rlock:\r\n  File \"C:\\...\\Python311\\Lib\\multiprocessing\\synchronize.py\", line 95, in __enter__\r\n    return self._semlock.__enter__()\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\r\n**PermissionError: [WinError 5]** Zugriff verweigert\r\n```\r\n\r\n\r\n```\r\nProcess load_directory:\r\nTraceback (most recent call last):\r\n  File \"C:\\...\\Python311\\Lib\\multiprocessing\\process.py\", line 314, in _bootstrap\r\n    self.run()\r\n  File \"C:\\...\\Python311\\Lib\\multiprocessing\\process.py\", line 108, in run\r\n    self._target(*self._args, **self._kwargs)\r\n  File \"C:\\...\\mp_test_single_a.py\", line 10, in load_directory\r\n    content_def = def_queue.get()\r\n                  ^^^^^^^^^^^^^^^\r\n  File \"C:\\...\\Python311\\Lib\\multiprocessing\\queues.py\", line 102, in get\r\n    with self._rlock:\r\n  File \"C:\\...\\Python311\\Lib\\multiprocessing\\synchronize.py\", line 98, in __exit__\r\n    return self._semlock.__exit__(*args)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n**OSError: [WinError 6]** Das Handle ist ungültig\r\n```\r\n\r\n\r\n\r\n**secondly: in Command Prompt Window (cmd) it runs:**\r\n\r\n```\r\nC:\\...\\Python311\\Lib\\site-packages\u003emp_tst_all.py\r\npy: 3.11.0rc2\r\n\r\nLOAD DIRECTORY:\r\ndo something ...\r\ndo something ...\r\ndo something ...\r\n\r\nLOAD ok\r\n\r\nLOAD FILE:\r\nFILE 0\r\nFILE 1\r\nFILE 2\r\n\r\nLOAD ok\r\n\r\n\r\nC:\\...\\Python311\\Lib\\site-packages\u003e\r\n```\r\n\r\n\r\n\r\n**_is it a bug in 3.11.0_rc2 or do i need to change something in the code ?_**\r\n**Thank you**\r\n","author":{"url":"https://github.com/edge-python","@type":"Person","name":"edge-python"},"datePublished":"2022-10-17T17:03:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/98360/cpython/issues/98360"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3eb75ddc-8fe2-6955-7517-7cfd57d11cea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAB4E:26204A:A3AA95:DBE232:696991CE
html-safe-nonceb7b5a3a0e37e9c78cce894fe4b6b751cf5595f190e4ff9f14d8429b9bd4d93c5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjRFOjI2MjA0QTpBM0FBOTU6REJFMjMyOjY5Njk5MUNFIiwidmlzaXRvcl9pZCI6IjQ5OTcwMTUzNTkxMTgyMTc2NzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac69ee5e6949a655ad6880a335efe433fda29e8eb5551502f52e707f2aee56b581
hovercard-subject-tagissue:1411913276
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/python/cpython/98360/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a99322dbf9edacdbd16ad52dd3b867b407c05372a349ec204897c04de1d6052b/python/cpython/issues/98360
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a99322dbf9edacdbd16ad52dd3b867b407c05372a349ec204897c04de1d6052b/python/cpython/issues/98360
og:image:altI'm programming in PyCharm in Virtual Environment on Win11 on a 12900k I use 2 modules: • mp_tst_all.py • mp_tst_a.py Details mp_tst_all.py import multiprocessing import platform import mp_tst_a de...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameedge-python
hostnamegithub.com
expected-hostnamegithub.com
None3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751
turbo-cache-controlno-preview
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
releaseaf80af7cc9e3de9c336f18b208a600950a3c187c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/98360#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F98360
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%2Fissues%2F98360
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=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/98360
Reloadhttps://github.com/python/cpython/issues/98360
Reloadhttps://github.com/python/cpython/issues/98360
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/98360
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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 Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/98360
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/98360
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/98360
Regression in multiprocessing example using venv on Windows in 3.11rc2https://github.com/python/cpython/issues/98360#top
3.11only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.11%22
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
topic-multiprocessinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-multiprocessing%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/edge-python
https://github.com/edge-python
edge-pythonhttps://github.com/edge-python
on Oct 17, 2022https://github.com/python/cpython/issues/98360#issue-1411913276
3.11only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.11%22
3.12only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.12%22
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
topic-multiprocessinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-multiprocessing%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
Release and Deferred blockers 🚫https://github.com/orgs/python/projects/2
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.