2720: ERROR (EXTERNAL IP): Internal Server Error: /dashboard/

thom.******@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 4, 2014
What version are you running?
Relavant versions from$ pip freeze
Django==1.3.2
Djblets==0.6.22
ReviewBoard==1.6.11
Python 2.6.6

Running via WSGI in Apache 2.2.16 on debian.

What's the URL of the page containing the problem?

/dashboard/


What steps will reproduce the problem?

It just happens intermittently for users that have the dashboard open, about once a day out of approximately 3000 GET requests.

Exception output: 
Traceback (most recent call last):

 File "/usr/local/pythonenv/reviewboard/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/usr/local/pythonenv/reviewboard/lib/python2.6/site-packages/djblets/auth/util.py", line 46, in _checklogin
   return view_func(request, *args, **kwargs)

 File "/usr/local/pythonenv/reviewboard/lib/python2.6/site-packages/reviewboard/accounts/decorators.py", line 52, in _check_valid_prefs
   return view_func(request, *args, **kwargs)

 File "/usr/local/pythonenv/reviewboard/lib/python2.6/site-packages/reviewboard/reviews/views.py", line 807, in dashboard
   return grid.render_to_response(template_name)

 File "/usr/local/pythonenv/reviewboard/lib/python2.6/site-packages/djblets/datagrid/grids.py", line 746, in render_to_response
   self.load_state()

 File "/usr/local/pythonenv/reviewboard/lib/python2.6/site-packages/djblets/datagrid/grids.py", line 578, in load_state
   self.precompute_objects()

 File "/usr/local/pythonenv/reviewboard/lib/python2.6/site-packages/djblets/datagrid/grids.py", line 683, in precompute_objects
   for obj in object_list if obj is not None

 File "/usr/local/pythonenv/reviewboard/lib/python2.6/site-packages/djblets/datagrid/grids.py", line 284, in render_cell
   mark_safe(self.datagrid.cell_template_obj.render(ctx))

AttributeError: 'NoneType' object has no attribute 'render'
#1 Chris******@actia***** (Google Code) (Is this you? Claim this profile.)
I'm seeing this with the same RB version, a few times a week. Appears to be the same as issue 2223.
#2 boot2*****@gmai***** (Google Code) (Is this you? Claim this profile.)
It exists in 1.6.13
#3 ex***@dps-on******* (Google Code) (Is this you? Claim this profile.)
I've also been watching this for a while. It already occurred long before 1.6.13.
david
#4 david
  • +Component-Dashboard
#5 thom.******@gmai***** (Google Code) (Is this you? Claim this profile.)
Still in reviewboard == 1.7.6, djblets == 0.7.11.

More details:  This looks like a thread safety issue.

When constructing a new instance of DataGrid(), the column attributes aren't new Coulmn() instances.

https://github.com/djblets/djblets/blob/release-0.7.11/djblets/datagrid/grids.py#L442

Is going to break any other instances of the DataGrid. Because they all share the same Column instances.

>>> from StringIO import StringIO
>>> from django.core.handlers.wsgi import WSGIRequest
>>> from django.contrib.auth.models import *
>>> from django.contrib.auth.models import User
>>> from reviewboard.reviews.datagrids import DashboardDataGrid
>>> def fake_get(path='/', user=None):
...     req = WSGIRequest({
...             'REQUEST_METHOD': 'GET',
...             'PATH_INFO': path,
...             'wsgi.input': StringIO()})
...     from django.contrib.auth.models import AnonymousUser
...     req.user = AnonymousUser() if user is None else user
...     return req
...
>>> ddg1 = DashboardDataGrid(fake_get(user=User.objects.get(username=username)))
>>> ddg1.load_state()
>>> ddg1.columns[0].datagrid == ddg1
True
>>> ddg2 = DashboardDataGrid(fake_get(user=User.objects.get(username=username)))
>>> ddg2.load_state()
>>> ddg2.columns[0].datagrid == ddg2
True
>>> ddg1.columns[0].datagrid == ddg1
False
#6 thom.******@gmai***** (Google Code) (Is this you? Claim this profile.)
This is probably related to the apache deployment being MPM Worker instead of MPM Prefork.

See https://groups.google.com/forum/#!topic/reviewboard/kS23n4m5aNw for details on similar strangeness that occurs with extensions; I believe it to be a similar problem.
david
#7 david
I think you're right. I'll add some text to the docs about which MPM to use.
david
#8 david
Updated the docs in master (b1784f2). Thanks!
  • +Fixed
#9 dange.s*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Hi ,

we are using review board 1.7.6.

recently we are facing internal server error 500.
below is the snapshot of the error log.

Internal Server Error: /dashboard/

result = block.nodelist.render(context)
  File "/usr/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/template/base.py", line 837, in render_node
    return node.render(context)
  File "/usr/lib/python2.6/site-packages/Djblets-0.7.11-py2.6.egg/djblets/util/decorators.py", line 186, in render
    return self.tag_func(context, self.nodelist, *args)
  File "/usr/lib/python2.6/site-packages/Djblets-0.7.11-py2.6.egg/djblets/util/templatetags/djblets_deco.py", line 44, in box
    'content': nodelist.render(context)
  File "/usr/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/template/base.py", line 837, in render_node
    return node.render(context)
  File "/usr/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/template/base.py", line 1178, in render
    _dict = func(*resolved_args, **resolved_kwargs)
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.6-py2.6.egg/reviewboard/reviews/templatetags/reviewtags.py/usr/lib/python2.6/site-packages/ReviewBoard-1.7.6-py2.6.egg/reviewboard/reviews/templatetags/reviewtags.py", line 365, in dashboard_entry
    "Invalid view type '%s' passed to 'dashboard_entry' tag." % view
TemplateSyntaxError: Invalid view type 'starred' passed to 'dashboard_entry' tag

can you please help me here to fix this issue?

Thanks.
chipx86
#10 chipx86
Can you file a new issue for this? It's a separate problem than the ones previously reported.