-
Notifications
You must be signed in to change notification settings - Fork 586
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
tests/cover/test_lookup.py::test_resolving_mutually_recursive_types{,_with_defaults} fail randomly when running the test suite w/ xdist #3671
Comments
|
I'm not able to reproduce — but that is hardly surprising, from your description. I would be curious if it may be related to borderline recursion limits, if perhaps the tests are executed at different stack depths depending on the specific pytest-xdist workload. One way to rule this out would be to add f.x. near the top of |
|
@jobh, indeed that seems to help. Could you add it or should I make a pull request? |
|
(that said, I'm not 100% sure if it just doesn't change some other random factor but I'm happy enough that the issue disappears for now) |
|
@mgorny I'm not sure if this is the right fix, but it certainly helps with narrowing down the problem. On my local runs, a limit of 300 is sufficient (already a lot), and the default is 1000. I wonder what makes it grow so much. |
|
Hmm, we do try to handle recursion-depth problems internally, but maybe need to repeat this trick somewhere else to handle strategy resolution? hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/engine.py Lines 183 to 197 in fc566bf
|
|
@Zac-HD That was my concern, that this problem was in strategy resolution due to the new recursion guard not doing its job. But it seems that it's "just" the new test having deeper effective nesting than any of the old. I.e., it could happen without recursion, at roughly 30-deep strategies (but >100-deep to fail consistently). The error happens in strategy validation, starting here:
...but I don't know if bumping the limit here will just move the problem elsewhere (draw time)? To answer your previous question @mgorny , I don't have time to follow up further now I'm afraid. |
|
... except possibly to add a skip to the two failing tests as a short term measure |
We're already skipping them on our end via |
|
Thanks! I have reenabled the tests in Gentoo for 6.80.0 and I have seen no problems so far. |
|
Thanks for confirming! Here's hoping that everything keeps working 😁 |
Well, you're not going to like this but I'm getting quasi-random test failures from the following two tests when running the large subset of the test suite in parallel:
This seems to be very flaky. It has been happening to us with PyPy3 before but I've assumed it's PyPy-specific. With 6.76.0, it suddenly started happening with CPython 3.11 as well. Curiously enough, I can reproduce it reliably when running a very specific set of tests:
but if I change tested files even a little, it stops happening.
Full log with tracebacks: dev-python:hypothesis-6.76.0:20230606-074652.log
I realize this is going to be very hard to reproduce, and I'll be glad to try anything you may suggest while I still can.
The text was updated successfully, but these errors were encountered: