pytest-dev / pytest-dev/pytest-forked

Pytest hangs when using faulthandler_timeout with pytest-forked

Open
#49 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
83
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce

Create two files in root workspace

# foo.py
def test_bar():
    fjaoisjdfoiajsdofi
# pyproject.toml
[tool.pytest.ini_options]
faulthandler_timeout=1800

Create a minimal venv with pytest-forked

mkvirtualenv foo --python 3.7
pip install pytest-forked==1.3.0

Run the following,

pytest foo.py --forked

pytest should hang indefinitely during collection

=========================================================================================== test session starts ============================================================================================
platform linux -- Python 3.7.5, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: /home/tyler/playground/pytest-forked-repro, configfile: pyproject.toml
plugins: forked-1.3.0
collected 1 item                                                                                                                                                                                           

foo.py 

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

Reproduce the issue with foo.py and pyproject.toml from the report, using Python 3.7, pytest-forked 1.3.0, and pytest foo.py --forked. Start by tracing what happens during collection when faulthandler_timeout is configured. Done means the command completes collection and no longer hangs indefinitely.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.