`./mach lint -l rst` does not respond at all on a 64-thread machine
Categories
(Developer Infrastructure :: Lint and Formatting, defect, P2)
Tracking
(firefox132 fixed)
Tracking | Status | |
---|---|---|
firefox132 | --- | fixed |
People
(Reporter: saschanaz, Unassigned)
References
(Blocks 1 open bug)
Details
./mach lint -l rst --fix docs/code-quality/lint/linters/eslint-plugin-mozilla/use-isInstance.rst
This does not show any visual output at all, and does not respond to Control+C, so I need to kill python to stop it. Killing the most memory-consuming Python process among multiple dozens of them logs the following error:
> Traceback (most recent call last):
File "c:\users\sasch\documents\github\gecko-dev\python\mozlint\mozlint\roller.py", line 71, in _run_worker
res = func(paths, config, **lintargs)
File "c:\users\sasch\documents\github\gecko-dev\python\mozlint\mozlint\types.py", line 57, in __call__
return self._lint(paths, config, **lintargs)
File "c:\users\sasch\documents\github\gecko-dev\python\mozlint\mozlint\types.py", line 148, in _lint
return func(files, config, **lintargs)
File "C:\Users\sasch\Documents\GitHub\gecko-dev\tools\lint\rst\__init__.py", line 100, in lint
filename, lineno, level, message = parse_with_split(errors)
File "C:\Users\sasch\Documents\GitHub\gecko-dev\tools\lint\rst\__init__.py", line 72, in parse_with_split
filename, lineno, level, message = match.groups()
AttributeError: 'NoneType' object has no attribute 'groups'
This happens on both Python 3.9 and 3.10.
Reporter | ||
Comment 1•3 years ago
|
||
This happens on my build machine with 64 logical core but not on my laptop. 🤔
Reporter | ||
Comment 2•3 years ago
|
||
Ha, C:\Users\sasch\Documents\GitHub\gecko-dev\obj-x86_64-pc-mingw32\_virtualenvs\common\Scripts\python.EXE C:\Users\sasch\Documents\GitHub\gecko-dev\obj-x86_64-pc-mingw32\_virtualenvs\ common\Scripts\rstcheck.EXE --ignore-language=cpp,json C:/Users/sasch/Documents/GitHub/gecko-dev/docs/code-quality/lint/linters/eslint-plugin-mozilla/use-isInstance.rst
throws this error:
Exception in thread Thread-1 (_handle_workers):
Traceback (most recent call last):
File "C:\Users\sasch\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
self.run()
File "C:\Users\sasch\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\sasch\AppData\Local\Programs\Python\Python310\lib\multiprocessing\pool.py", line 519, in _handle_workers
cls._wait_for_updates(current_sentinels, change_notifier)
File "C:\Users\sasch\AppData\Local\Programs\Python\Python310\lib\multiprocessing\pool.py", line 499, in _wait_for_updates
wait(sentinels, timeout=timeout)
File "C:\Users\sasch\AppData\Local\Programs\Python\Python310\lib\multiprocessing\connection.py", line 884, in wait
ready_handles = _exhaustive_wait(waithandle_to_obj.keys(), timeout)
File "C:\Users\sasch\AppData\Local\Programs\Python\Python310\lib\multiprocessing\connection.py", line 816, in _exhaustive_wait
res = _winapi.WaitForMultipleObjects(L, False, timeout)
ValueError: need at most 63 handles, got a sequence of length 66
... which means this is https://github.com/myint/rstcheck/pull/86 again.
Can we somehow patch this library not to hit this?
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
https://bugs.python.org/issue45077 is the relevant python issue.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 4•3 years ago
|
||
The severity field is not set for this bug.
:ahal, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 5•3 years ago
|
||
As a workaround, maybe we could limit the num_procs
to max 63 here? (or whatever number keeps us under the limit)
https://searchfox.org/mozilla-central/rev/d34f9713ae128a3138c2b70d8041a535f1049d19/python/mozlint/mozlint/roller.py#364
Reporter | ||
Comment 6•3 years ago
|
||
It should be 61 as Python keeps 3. See also https://bugs.python.org/issue26903.
I can submit a patch if a local patch is okay.
Updated•2 years ago
|
Comment 7•9 months ago
|
||
Given https://github.com/myint/rstcheck/pull/86 is now fixed and long released, could we upgrade rstcheck to include that?
Unfortunately I can't work out how to get the upgrade to work properly - it looks like there's conflicting packages for some reason.
Comment 8•1 month ago
|
||
Bug 1917163 has now upgraded rstcheck, could you confirm if this is now fixed please?
Reporter | ||
Comment 9•1 month ago
|
||
Thanks, this works now.
Updated•17 days ago
|
Description
•