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

Since 8.2.0, automatic multiprocessing causes race conditions in my project #12278

Closed
Schwaneberg opened this issue Apr 30, 2024 · 7 comments
Closed
Labels
stale status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity

Comments

@Schwaneberg
Copy link

I got a project that cannot be tested with parallelism, as it requires exclusive access to some resources.
Unfortunately, this also applies during unit testing. This wasn't a problem up to pytest 8.1.2, but it is since 8.2.0.
Since 8.2.0, pytest instantly spawns six child processes, which are blocking each other.
I couldn't find a switch to turn this off nor could I identify the PR that caused this (yet).

@RonnyPfannschmidt
Copy link
Member

More context needed

Core pytest doesn't start processes at all

@RonnyPfannschmidt RonnyPfannschmidt added the status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity label Apr 30, 2024
@alkino
Copy link

alkino commented May 1, 2024

Hello, in our case (I and @pramodk that link the issue above):
We have reproducible segfaults with pytest 8.2.0 on our code.
Once we set pytest back to 8.1.1 it works again.
Running with pytest 8.2.0 with -v or by specifying all files instead of the directory works too (pytest dir/file1.py dir/file2.py instead of pytest dir).

@fossdd
Copy link

fossdd commented May 4, 2024

This can be reproduced by running pytest (v8.2.0) on waitress or black

Copy link
Contributor

This issue is stale because it has the status: needs information label and requested follow-up information was not provided for 14 days.

@github-actions github-actions bot added the stale label May 19, 2024
Copy link
Contributor

This issue was closed because it has the status: needs information label and follow-up information has not been provided for 7 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
@Schwaneberg
Copy link
Author

Schwaneberg commented May 26, 2024 via email

@The-Compiler
Copy link
Member

@fossdd What is "this" exactly? As already mentioned, pytest doesn't do any parallelism itself. As for black, it runs pytest 8.2.0 on CI just fine... I also tried running the waitress tests locally with pytest 8.2.1 and they work fine.

Please be more specific - what exactly is happening? Are you sure it's related to this issue at all?

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

5 participants