pytest-dev / pytest-dev/pytest-xdist
Running the code on Debian server, I encountered some unknown errors. I hope to get your help
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 287
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 2
Description

Jenkins 2.292
python 3.7
pytest==6.0.1
pytest-xdist==2.3.0
The running environment of the project is shown above
I encountered the following error reports:
INTERNALERROR> def worker_internal_error(self, node, formatted_error):
INTERNALERROR> """
INTERNALERROR> pytest_internalerror() was called on the worker.
INTERNALERROR>
INTERNALERROR> pytest_internalerror() arguments are an excinfo and an excrepr, which can't
INTERNALERROR> be serialized, so we go with a poor man's solution of raising an exception
INTERNALERROR> here ourselves using the formatted message.
INTERNALERROR> """
INTERNALERROR> self._active_nodes.remove(node)
INTERNALERROR> try:
INTERNALERROR> > assert False, formatted_error
INTERNALERROR> E AssertionError: Traceback (most recent call last):
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/_pytest/main.py", line 240, in wrap_session
INTERNALERROR> E session.exitstatus = doit(config, session) or 0
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/_pytest/main.py", line 296, in _main
INTERNALERROR> E config.hook.pytest_runtestloop(session=session)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/hooks.py", line 286, in call
INTERNALERROR> E return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> E return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/manager.py", line 87, in
INTERNALERROR> E firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> E return outcome.get_result()
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> E raise ex[1].with_traceback(ex[2])
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> E res = hook_impl.function(*args)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/xdist/remote.py", line 72, in pytest_runtestloop
INTERNALERROR> E self.run_one_test(torun)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/xdist/remote.py", line 89, in run_one_test
INTERNALERROR> E self.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/hooks.py", line 286, in call
INTERNALERROR> E return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> E return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/manager.py", line 87, in
INTERNALERROR> E firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> E return outcome.get_result()
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> E raise ex[1].with_traceback(ex[2])
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> E res = hook_impl.function(*args)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/_pytest/runner.py", line 100, in pytest_runtest_protocol
INTERNALERROR> E runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/_pytest/runner.py", line 111, in runtestprotocol
INTERNALERROR> E rep = call_and_report(item, "setup", log)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/_pytest/runner.py", line 211, in call_and_report
INTERNALERROR> E hook.pytest_runtest_logreport(report=report)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/hooks.py", line 286, in call
INTERNALERROR> E return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> E return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/manager.py", line 87, in
INTERNALERROR> E firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> E return outcome.get_result()
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> E raise ex[1].with_traceback(ex[2])
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> E res = hook_impl.function(*args)
INTERNALERROR> E File "/usr/local/lib/python3.7/dist-packages/xdist/remote.py", line 120, in pytest_runtest_logreport
INTERNALERROR> E assert self.session.items[self.item_index].nodeid == report.nodeid
INTERNALERROR> E AssertionError
INTERNALERROR> E assert False
INTERNALERROR>
INTERNALERROR> /usr/local/lib/python3.7/dist-packages/xdist/dsession.py:187: AssertionError
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/_pytest/main.py", line 240, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/_pytest/main.py", line 296, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pluggy/hooks.py", line 286, in call
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pluggy/manager.py", line 87, in
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/xdist/dsession.py", line 112, in pytest_runtestloop
INTERNALERROR> self.loop_once()
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/xdist/dsession.py", line 135, in loop_once
INTERNALERROR> call(**kwargs)
INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/xdist/dsession.py", line 174, in worker_workerfinished
INTERNALERROR> assert not crashitem, (crashitem,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported Jenkins/Debian run with Python 3.7, pytest 6.0.1, and pytest-xdist 2.3.0. Read xdist/remote.py and xdist/dsession.py around the worker_internal_error, pytest_runtest_logreport, and worker_workerfinished paths. Done means identifying a reproducible cause and preventing the reported INTERNALERROR without breaking distributed test execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100