-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Pytest internal error due to infinite recursion on final test #3163
Comments
Looking at the traceback it indeed seems there is a recursion inside the
What options are you passing to pytest? What happens if you pass Also if you can produce a reproducible case it would be great. |
The exact options passed to pytest.main were: |
@ceridwen OK thanks. Here's some code inside pytest which tries to find recursions in tracebacks: Lines 329 to 351 in 89a55d8
Your traceback seems to occur inside the builtin |
I took a look at the Python 3.6 bugs and changelog, so if this is a bug in CPython, it doesn't seem to have been reported before. My best guess, though, is that pytest somehow created a traceback with a loop in it, and that when format_exception_only tries to print tracebacks with loops, it infinitely recurses. Is it possible that could happen if pytest receives SIGTERM or some such? The tests take a long time to run, so I don't have results yet. If the error doesn't show up that will at least tell me it's nondeterministic. |
The exact logging output with some environment variables specific to our setup snipped:
There are five tests in that last file:
The last two tests are identical. They share a fixture that uses
contextlib.ExitStack
. They've been run many, many times before and I've never seen this happen.Pytest in this case is running inside a Docker container on a Jenkins server. The container is based on python:3.6-alpine and has the following packages:
I can try to rerun the exact job that failed with debugging settings if that would help.
The text was updated successfully, but these errors were encountered: