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

Pytest crashes with internal error when run with several threads on Py3.8 #11052

Closed
nielstron opened this issue May 29, 2023 · 3 comments
Closed
Labels
stale status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity

Comments

@nielstron
Copy link

Running the following command in OpShin repository works fine

$ pytest

However as soon as I add more workers, there is an internal error

$ pytest -n 2

/home/niels/git/eopsin-lang/venv/lib/python3.8/site-packages/xdist/dsession.py:73: PytestDeprecationWarning: The hookimpl DSession.pytest_sessionstart uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(trylast=True) decorator instead
 to configure the hooks.
 See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
  @pytest.mark.trylast
/home/niels/git/eopsin-lang/venv/lib/python3.8/site-packages/xdist/dsession.py:96: PytestDeprecationWarning: The hookimpl DSession.pytest_xdist_make_scheduler uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(trylast=True) decorator instead
 to configure the hooks.
 See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
  @pytest.mark.trylast
========================================================================================================= test session starts ==========================================================================================================
platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/niels/git/eopsin-lang
plugins: typeguard-2.13.3, xdist-1.27.0, hypothesis-6.75.3, forked-1.6.0
gw0 [172] / gw1 [172]
.......................!!!!!!!!!!!!!!!!!!!! <ExceptionInfo TypeError("__init__() got an unexpected keyword argument 'filelocrepr'") tblen=3>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/niels/git/eopsin-lang/venv/lib/python3.8/site-packages/xdist/workermanage.py", line 327, in process_from_remote
INTERNALERROR>     rep = unserialize_report(eventname, kwargs["data"])
INTERNALERROR>   File "/home/niels/git/eopsin-lang/venv/lib/python3.8/site-packages/xdist/workermanage.py", line 434, in unserialize_report
INTERNALERROR>     return runner.TestReport(**assembled_report(reportdict))
INTERNALERROR>   File "/home/niels/git/eopsin-lang/venv/lib/python3.8/site-packages/xdist/workermanage.py", line 409, in assembled_report
INTERNALERROR>     reprentry = ReprEntry(
INTERNALERROR> TypeError: __init__() got an unexpected keyword argument 'filelocrepr'
[gw1] node down: <ExceptionInfo TypeError("__init__() got an unexpected keyword argument 'filelocrepr'") tblen=3>
FReplacing crashed worker gw1

Run with pytest 7.3.1 on Ubuntu 22
platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0

pip list

Package                  Version     Editable project location
------------------------ ----------- ---------------------------
appdirs                  1.4.4
asn1crypto               1.5.1
astunparse               1.6.3
atomicwrites             1.4.1
attrs                    23.1.0
black                    23.3.0
blockfrost-python        0.5.3
build                    0.10.0
CacheControl             0.12.11
cbor2                    5.4.6
certifi                  2023.5.7
certvalidator            0.11.1
cffi                     1.15.1
cfgv                     3.3.1
charset-normalizer       3.1.0
cleo                     2.0.1
click                    8.1.3
cose                     0.9.dev8
coverage                 6.5.0
coveralls                3.3.1
crashtest                0.4.1
cryptography             40.0.2
distlib                  0.3.6
docopt                   0.6.2
dulwich                  0.21.5
ecdsa                    0.18.0
ECPy                     1.2.5
exceptiongroup           1.1.1
execnet                  1.9.0
filelock                 3.12.0
frozendict               2.3.8
frozenlist               1.3.3
html5lib                 1.1
hypothesis               6.75.3
identify                 2.5.24
idna                     3.4
importlib-metadata       6.6.0
importlib-resources      5.12.0
iniconfig                2.0.0
installer                0.7.0
jaraco.classes           3.2.3
jeepney                  0.8.0
JPype1                   0.7.0
jsonschema               4.17.3
keyring                  23.13.1
lockfile                 0.12.2
Mako                     1.2.4
Markdown                 3.4.1
MarkupSafe               2.1.2
mnemonic                 0.20
more-itertools           9.1.0
msgpack                  1.0.5
mypy                     0.782
mypy-extensions          1.0.0
nagini                   0.9.0
nodeenv                  1.7.0
opshin                   0.13.0      /home/niels/git/eopsin-lang
oscrypto                 1.3.0
packaging                23.1
parameterized            0.9.0
pathspec                 0.11.1
pdoc3                    0.10.0
pexpect                  4.8.0
pip                      23.1.2
pkginfo                  1.9.6
pkgutil_resolve_name     1.3.10
platformdirs             2.6.2
pluggy                   1.0.0
pluthon                  0.3.7
poetry                   1.4.2
poetry-bumpversion       0.3.0
poetry-core              1.5.2
poetry-plugin-export     1.3.1
pprintpp                 0.4.0
pre-commit               3.3.2
ptyprocess               0.7.0
py                       1.11.0
pyaiken                  0.4.0
pycardano                0.9.0
pycparser                2.21
pydantic                 1.10.7
PyNaCl                   1.5.0
pyproject_hooks          1.0.0
pyrsistent               0.19.3
pytest                   7.3.1
pytest-forked            1.6.0
pytest-xdist             1.27.0
python-secp256k1-cardano 0.2.3
PyYAML                   6.0
rapidfuzz                2.15.1
requests                 2.30.0
requests-toolbelt        0.10.1
rply                     0.7.8
SecretStorage            3.3.3
setuptools               67.7.2
shellingham              1.5.0.post1
six                      1.16.0
sortedcontainers         2.4.0
tomli                    2.0.1
tomlkit                  0.11.8
toposort                 1.5
trove-classifiers        2023.5.2
typed-ast                1.4.0
typeguard                2.13.3
typing_extensions        4.5.0
uplc                     0.6.6
urllib3                  1.26.15
virtualenv               20.21.1
webencodings             0.5.1
websocket-client         1.5.1
wheel                    0.40.0
z3-solver                4.8.7.0
zipp                     3.15.0
@nicoddemus
Copy link
Member

Your pytest-xdist seems too old, can you upgrade it to the latest version (3.3.1) and try again?

@nicoddemus nicoddemus added the status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity label May 29, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Jun 13, 2023
@nielstron
Copy link
Author

Latest version fixes this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity
Projects
None yet
Development

No branches or pull requests

2 participants