Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different results with -j4 and -j8 #4356

Closed
nedbat opened this issue Apr 14, 2021 · 4 comments · Fixed by pylint-dev/astroid#2208 or pylint-dev/astroid#2303
Closed

Different results with -j4 and -j8 #4356

nedbat opened this issue Apr 14, 2021 · 4 comments · Fixed by pylint-dev/astroid#2208 or pylint-dev/astroid#2303
Assignees
Labels
Milestone

Comments

@nedbat
Copy link
Contributor

nedbat commented Apr 14, 2021

I'm not sure if this is a duplicate of #2573 or #374 because I don't know if those are particular to the specific checks they mention.

Steps to reproduce

  1. git clone https://github.com/nedbat/coveragepy; cd coveragepy
  2. git checkout 50cc68846f
  3. pip install tox
  4. tox -e lint --notest
  5. .tox/lint/bin/python -m pylint --notes= -j 4 coverage tests doc ci igor.py setup.py __main__.py
  6. No violations are reported
  7. .tox/lint/bin/python -m pylint --notes= -j 8 coverage tests doc ci igor.py setup.py __main__.py
************* Module coverage.pytracer
coverage/pytracer.py:140 E: self.should_start_context is not callable (not-callable)
coverage/pytracer.py:165 E: self.should_trace is not callable (not-callable)
coverage/pytracer.py:166 E: 'self.should_trace_cache' does not support item assignment (unsupported-assignment-operation)
coverage/pytracer.py:171 E: Value 'self.data' doesn't support membership test (unsupported-membership-test)
coverage/pytracer.py:172 E: 'self.data' does not support item assignment (unsupported-assignment-operation)
coverage/pytracer.py:173 E: Value 'self.data' is unsubscriptable (unsubscriptable-object)
coverage/pytracer.py:259 E: self.warn is not callable (not-callable)

A different manifestation of what might be the same underlying cause: in my CI, running -j4, I get occasional failures with these same violations reported.

Expected behavior

The number of processes shouldn't change the results, only the performance.

pylint --version output

Result of pylint --version output:

$ .tox/lint/bin/python -m pylint --version
pylint 2.7.4
astroid 2.5.3
Python 3.8.8 (default, Mar 21 2021, 13:50:20)
[Clang 12.0.0 (clang-1200.0.32.29)]
nedbat added a commit to nedbat/coveragepy that referenced this issue Apr 14, 2021
-j seems to introduce non-determinism:
pylint-dev/pylint#4356

With -j4, we'd have occasional (1 in 20?) failures on CI.
@Pierre-Sassoulas
Copy link
Member

Closing as duplicate of #374

@Pierre-Sassoulas Pierre-Sassoulas added the Duplicate 🐫 Duplicate of an already existing issue label Jul 1, 2022
@jacobtylerwalls
Copy link
Member

Thanks for the beautiful reproducer. Working on a fix for this that seems distinct from the freeform discussion in #374.

@jacobtylerwalls jacobtylerwalls removed the Duplicate 🐫 Duplicate of an already existing issue label Jun 9, 2023
@jacobtylerwalls jacobtylerwalls self-assigned this Jun 9, 2023
@jacobtylerwalls jacobtylerwalls added the Astroid Related to astroid label Jun 9, 2023
@jacobtylerwalls jacobtylerwalls added this to the 3.0.0a7 milestone Jun 9, 2023
@jacobtylerwalls
Copy link
Member

jacobtylerwalls commented Jun 9, 2023

Regression in pylint-dev/astroid@55076ca.

@jacobtylerwalls
Copy link
Member

Never mind, the indeterminacy goes a little deeper than that commit. PR to come, with luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants