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

Race condition in pytest-dev hangs coverage 6.3 #520

Open
nedbat opened this issue Jan 30, 2022 · 3 comments
Open

Race condition in pytest-dev hangs coverage 6.3 #520

nedbat opened this issue Jan 30, 2022 · 3 comments

Comments

@nedbat
Copy link
Collaborator

nedbat commented Jan 30, 2022

See nedbat/coveragepy#1310 . Removing pytest-cov solves the problem. What is pytest-cov doing that causes this problem?

@ionelmc
Copy link
Member

ionelmc commented Jan 30, 2022

pytest-cov basically just forcibly enables coverage in multiprocess's subprocesses but that in turn just spurs problems caused by locks being shared between processes after a fork.

@nedbat
Copy link
Collaborator Author

nedbat commented Jan 30, 2022

I think I have seen race conditions between erasing the data files and writing new data. I'm working on getting more information.

@ionelmc
Copy link
Member

ionelmc commented Jan 30, 2022

pytest-cov does have a different way of setting up for multiprocessing (using register_after_fork and a finalizer) - maybe I could try to just copy whatever coverage has for subprocesses (reusing won't work since there's a different way coverage configuration is being set) but still, using fork mode is just asking for trouble...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants