-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Cache: Crash on Windows when using pytest-xdist #12671
Comments
This error means that the two workers collected a different set of tests... this usually is caused by some error occurring during collection.
Can you elaborate on this? Is that related to that If that plugin does something during collection/initialization, it probably needs to be adjusted in order to account for xdist collecting workers in parallel. |
The problem I see is that one worker crashes with
which is (presumably) during a call to this function (the directory name matches what that code is doing). I don't see which function there would be throwing a As one of the worker crashes with this error, it doesn't finish test collection, and therefore reports the second error, but the root cause is that cache initialization doesn't work for some reason. I fixed one problem related to that in #12580 already. We are indeed doing things in the worker init/during test collection using the pytest cache in our |
More details needed to figure if we hit a platform specific race condition |
This issue is stale because it has the |
The easy way to reproduce this doesn't work https://github.com/criemen/pytest-crash-win (i.e. it doesn't crash), so I'll need to put in some more effort into distilling down what we're doing internally to an external reproducer. |
This issue is stale because it has the |
This issue was closed because it has the |
pytest: 8.3.2
OS: Windows Server 2022 (GH Actions)
We're seeing the following spurious failure on Windows:
Note that we're collecting one test (so test collection is fast), and we have code that is creating cache entries at the same time.
Probably, this is in the same area as #12580 (which I filed and fixed), but it's not entirely clear to me what's happening here.
I'm mainly looking for advice how to get a proper stacktrace here, then I'm happy to investigate further on my own.
The text was updated successfully, but these errors were encountered: