pytest-dev / pytest-dev/pytest-xdist

pytest-xdist sometimes deadlocks/fails to terminate on Python 3.8, Linux

Open
#492 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
287
Avg merge
9h 30m
Merged PRs (30d)
2

Description

I've found that on Linux, pytest-xdist will sometimes timeout when it has (probably) completed all tests for Python 3.8, it will continue to run indefinitely as if deadlocked. Equivalent tests on older Pythons work fine.

It is, unfortunately, a lengthy test suite.
github.com/jbarlow83/OCRmyPDF

The test suite in question passes using pytest -n0.

This has been confirmed on Fedora Rawhide and Ubuntu 18.04. I can also confirm the issue does not occur on Python 3.8 with Windows. Not tested on macOS.

Here is a run of the test suite showing Windows and Linux all working except for Python 3.8 on Linux:
https://dev.azure.com/jim0585/ocrmypdf/_build/results?buildId=173&view=results

There's a decent chance this is a Python 3.8 internal bug too, but I figured I'd start here because you probably better ideas how to test this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the OCRmyPDF test suite on Linux with Python 3.8 using pytest-xdist, then compare it with pytest -n0 and the working older-Python or Windows runs. Done means the Python 3.8 Linux run terminates reliably under parallel execution, with a regression test or documented reproduction covering the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.