Skip to content

pylint 2.7 hangs on many-core Windows machines #6965

@randomascii

Description

@randomascii

Bug description

We use PyLint in Chromium and we have been switching to Python 3 and PyLint 2.7 recently. While testing on a many-core (96 logical processor) machine I found that PyLint reliably hangs. This is due to a known Python 3 bug with multi-processing on machines with more than 56 (possibly more than 63 or 64) logical processors. We first hit this bug last year (discussed in crbug.com/1190269) but only recently discovered that PyLint is vulnerable.

If we were running PyLint from the command line then we could just pass a -j value that is capped at 56 (or 63, or 64) but I have not been able to figure out how to cap the jobs value when invoking PyLint through lint.Run().

Internally PyLint should cap its parallelism until the Python 3 bug (not yet reported I believe, sorry) is fixed.

Configuration

96 logical processor Windows machine
The version of Windows does not seem to matter. This only happens on Python 3 and it is believed to affect all versions of Python 3.

Command used

I invoke pylint quite directly using "git cl presubmit --all --force" from Chromium. This ends up invoking many steps including pylint_main.py, like this:

  from pylint import lint  # pylint: disable=bad-option-value,import-outside-toplevel
  lint.Run(argv)

https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:pylint_main.py;l=17?q=pylint_main.py&sq=

Pylint output

No output - it hangs.

Expected behavior

I expect the PyLint run to complete.

Pylint version

pylint 2.7
Python 3.8.10

OS / Environment

Windows 10

Additional dependencies

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions