[Django] #29393: Infinite loop in ExceptionReporter.get_traceback_frames

19 views
Skip to first unread message

Django

unread,
May 9, 2018, 6:38:38 AM5/9/18
to django-...@googlegroups.com
#29393: Infinite loop in ExceptionReporter.get_traceback_frames
-------------------------------------------+------------------------
Reporter: James Howe | Owner: (none)
Type: Bug | Status: new
Component: Error reporting | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
The following code generates a cause/context cycle
(`exc_value.__cause__.__context__ is exc_value`):
{{{
except WrapperException as exc:
raise exc.__cause__
}}}

The
[https://github.com/django/django/blob/d79cf1e/django/views/debug.py#L397
while exc_value] loop then never terminates.

--
Ticket URL: <https://code.djangoproject.com/ticket/29393>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 9, 2018, 6:41:19 AM5/9/18
to django-...@googlegroups.com
#29393: Infinite loop in ExceptionReporter.get_traceback_frames
---------------------------------+--------------------------------------

Reporter: James Howe | Owner: (none)
Type: Bug | Status: new
Component: Error reporting | Version: 2.0
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by James Howe):

A possible workaround would be available if PEP 415
(`__suppress_context__`) were respected.

--
Ticket URL: <https://code.djangoproject.com/ticket/29393#comment:1>

Django

unread,
May 9, 2018, 8:12:46 AM5/9/18
to django-...@googlegroups.com
#29393: Infinite loop in ExceptionReporter.get_traceback_frames
---------------------------------+--------------------------------------

Reporter: James Howe | Owner: (none)
Type: Bug | Status: new
Component: Error reporting | Version: 2.0
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by Tim Graham):

Can you please give code to reproduce the issue?

--
Ticket URL: <https://code.djangoproject.com/ticket/29393#comment:2>

Django

unread,
May 9, 2018, 8:31:50 AM5/9/18
to django-...@googlegroups.com
#29393: Infinite loop in ExceptionReporter.get_traceback_frames
---------------------------------+--------------------------------------

Reporter: James Howe | Owner: (none)
Type: Bug | Status: new
Component: Error reporting | Version: 2.0
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by James Howe):

In a view, with `DEBUG = True`.
{{{
try:
raise RuntimeError('outer') from RuntimeError('inner')
except RuntimeError as exc:
raise exc.__cause__
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29393#comment:3>

Django

unread,
May 9, 2018, 9:02:36 AM5/9/18
to django-...@googlegroups.com
#29393: Infinite loop in ExceptionReporter.get_traceback_frames()
---------------------------------+------------------------------------

Reporter: James Howe | Owner: (none)
Type: Bug | Status: new
Component: Error reporting | Version: 2.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/29393#comment:4>

Django

unread,
Jan 30, 2019, 10:35:24 AM1/30/19
to django-...@googlegroups.com
#29393: Infinite loop in ExceptionReporter.get_traceback_frames()
---------------------------------+------------------------------------
Reporter: James Howe | Owner: (none)
Type: Bug | Status: new
Component: Error reporting | Version: 2.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/10730 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/29393#comment:5>

Django

unread,
Feb 2, 2019, 5:29:13 PM2/2/19
to django-...@googlegroups.com
#29393: Infinite loop in ExceptionReporter.get_traceback_frames()
-------------------------------------+-------------------------------------
Reporter: James Howe | Owner: Tim
| Graham <timograham@…>
Type: Bug | Status: closed

Component: Error reporting | Version: 2.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* owner: (none) => Tim Graham <timograham@…>
* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"3634560fa9ddb342c3a823b78cc63e7000ccabd8" 3634560f]:
{{{
#!CommitTicketReference repository=""
revision="3634560fa9ddb342c3a823b78cc63e7000ccabd8"
Fixed #29393 -- Prevented infinite loop in
ExceptionReporter.get_traceback_frames().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29393#comment:6>

Reply all
Reply to author
Forward
0 new messages