poll_mirrors.py release script doesn't fork processes properly on Mac machine [LUCENE-10006]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
On my Mac machine with Python 3.9.5 running:
`python3 -u dev-tools/scripts/poll-mirrors.py -version 8.9.0 -o`
results in following recursive errors, unless manually forced to stop:
```java
"/\~/.lucene-releases/8.9.0/lucene-solr/dev-tools/scripts/poll-mirrors.py", line 158, in
with Pool(processes=5) as pool:
File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 119, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild,
File
....
File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if _name_ == '_main_':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
```
---
Migrated from [LUCENE-10006](https://issues.apache.org/jira/browse/LUCENE-10006) by Mayya Sharipova (@mayya-sharipova)
Attachments: [mypatch.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-10006/mypatch.patch)
Contributor guide
Research direction
Start with dev-tools/scripts/poll-mirrors.py around line 158 and reproduce the issue with the Python 3.9 command shown on a Mac. Done means the release script no longer enters the recursive multiprocessing errors when run with those arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- release
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100