-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Random error #22
Comments
It is random in the sense that it appears maybe 10% of the time. |
@NotSqrt hmm, strange. Are you using any concurrency libraries, like gevent, greenlets, or eventlets? |
I get this error when running tests with https://github.com/kmmbvnr/django-jenkins, on LiveServerTestCase tests calling selenium, so not directly concurrency libs, but definitely threads and subprocesses. |
OK, I'm not sure how well this will work, but let's try this experiment. In one of your tests, (anywhere, just some place that we can get the output, and we know that it's running in the same process as the occasional failures), add this code: "import pprint, sys; pprint.pprint(sys.modules)". If you need to, also add a failure like "1/0" to get the test runner to show you the output. Then we can see what libraries might be involved. |
Here is a list of the libraries extracted from
|
I don't see any smoking guns there. Selenium is notorious for unpredictability, but I don't see how it could produce assertions like that one. |
I tried to inspect the stack when entering the
It is clearly in the LiveServerThread, not the main thread. It is not always the same template that makes it fail. In Do you want me to look in a specific direction ? |
@NotSqrt, I noticed that StringIO shares the same memory between the celery worker processes. It generated some corrupted contents in my project. Would it be the root cause for your case? |
@hz It's hard to tell.. |
Hi,
I am facing a random error in my tests, with django 1.8.12, coverage 4.0.3 and django_coverage_plugin 1.3 (and seemingly only on my CI server using ubuntu precise 32bit, not our developer machines using ubuntu >= 14.04 64bit):
(Side note, as it is an AssertionError exception, the test reports it as a failure, not an error)
It seems to be called from
django/template/engine.py
, line 168 (https://github.com/django/django/blob/1.8.12/django/template/engine.py#L168):This call comes from a fairly standard
return render_to_string(template_name, context.flatten())
in a template tag.I've managed to get a shell at the point of failure, and
frame.f_code.co_name
is indeed'get_template'
.The text was updated successfully, but these errors were encountered: