3.6.4.0 on python3.9: SemLock __exit__ throws '[WinError 6] The handle is invalid'
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- backend, operating-systems
Research direction
Start by reading SimpleQueue.get_payload and SemLock.exit, then reproduce the failure under Python 3.9.2 on Windows using the pytest setup described. Use the shutdown log to identify where the invalid handle is raised; done means the exception no longer occurs during pool shutdown and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Description
When the semLock acquired in SimpleQueue.get_payload exits, I get an exception: [WinError 6] The handle is invalid
I'm calling billiard from pytest unit tests running under pyCharm 2019.2.2 (Professional Edition)
The problem has appeared after upgrading from python3.6 to python3.9.2
Log extract:
2021-06-16 15:56:45,628 Setting up handler pool
[DEBUG/MainProcess] created semlock with handle 612
[DEBUG/MainProcess] created semlock with handle 1052
[DEBUG/MainProcess] created semlock with handle 860
[DEBUG/MainProcess] worker handler starting
[DEBUG/MainProcess] result handler starting
2021-06-16 15:56:45,637 Worker process started worker_id=0
[DEBUG/MainProcess] closing pool
[DEBUG/MainProcess] task handler got sentinel
[DEBUG/MainProcess] task handler sending sentinel to result handler
[DEBUG/MainProcess] task handler sending sentinel to workers
[DEBUG/MainProcess] task handler exiting
[DEBUG/MainProcess] result handler got sentinel
[DEBUG/MainProcess] recreated blocker with handle 20
[DEBUG/MainProcess] recreated blocker with handle 24
[DEBUG/MainProcess] worker handler exiting
[DEBUG/MainProcess] joining worker handler
[DEBUG/MainProcess] joining task handler
[DEBUG/MainProcess] joining result handler
[DEBUG/MainProcess] recreated blocker with handle 28
[DEBUG/MainProcess] recreated blocker with handle 32
[INFO/SpawnPoolWorker-1] child process 12964 calling self.run()
[DEBUG/SpawnPoolWorker-1] worker got OSError -- exiting
[DEBUG/MainProcess] Supervisor: cleaning up worker 0
[DEBUG/MainProcess] Supervisor: worked 0 joined
[DEBUG/MainProcess] result handler: all workers terminated, timeout in 4.0s
[DEBUG/MainProcess] result handler: all workers terminated, timeout in 3.0s
[DEBUG/MainProcess] result handler: all workers terminated, timeout in 2.0s
[DEBUG/MainProcess] result handler: all workers terminated, timeout in 1.0s
[DEBUG/MainProcess] result handler: all workers terminated, timeout in 0.0s
[DEBUG/MainProcess] result handler exiting: timed out
[DEBUG/MainProcess] ensuring that outqueue is not full
[DEBUG/MainProcess] result handler exiting: len(cache)=1, thread._state=0
[DEBUG/MainProcess] result handler joined
[DEBUG/MainProcess] pool join complete
- Dominant language
- Python
- Stars
- 436
- Forks
- 273
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from celery/billiard
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
return in finally can swallow exceptionsMay be free again @auvipy claimed this 602 days ago, and no pull request is open. Open
celery/billiard#414 · 6 comments · 3 reactions · 1 assignee ·
-
Handling numpyOpen
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
AI bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AUTO-MAS-Project/AUTO-MAS#1960 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
btclib-org/btclib-wallet#872 ·
Maintainers usually reply within 1 day
-
[Bug]: Scheduled returns scan all accepted minion keys causing extreme loadPossibly taken A pull request linked to this issue is open or already merged. Openbug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
saltstack/salt#70789 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
btclib-org/btclib#3093 ·
Maintainers usually reply within 1 day