Edgewall Software
Modify

Opened 16 years ago

Last modified 13 years ago

#7680 new defect

Broken Error Reporting?

Reported by: dave@… Owned by:
Priority: normal Milestone: next-major-releases
Component: rendering Version: 0.11.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The following comes up as the entire literal contents of the page I'm viewing. It seems to me to be broken in several ways:

  1. It's not valid HTML
  2. Trac's nice built-in traceback display is bypassed.
  3. It appears to be generating an error while reporting an error. In this case the original error is lost and the system tells the user almost nothing she needs to know in order to debug the problem.

Is that really the intended behavior?

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/api.py", line 339, in send_error
    'text/html')
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 702, in render_template
    if not req.session or not int(req.session.get('accesskeys', 0)):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/api.py", line 169, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 257, in _get_session
    return Session(self.env, req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/session.py", line 150, in __init__
    self.get_session(req.authname, authenticated=True)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/session.py", line 164, in get_session
    super(Session, self).get_session(sid, authenticated)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/session.py", line 56, in get_session
    (sid, int(authenticated)))
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: current transaction is aborted, commands ignored until end of transaction block

Attachments (0)

Change History (4)

comment:1 by Noah Kantrowitz, 16 years ago

Check the log file for the original error. I would put a decent wager this is coming from a plugin's bad SQL.

comment:2 by dave@…, 16 years ago

Yes of course it is a plugin's bad SQL, and it does show up in the log. I'm not asking for help debugging the thing that caused the error; I'm asking that Trac improve its handling and reporting of such problems.

in reply to:  description comment:3 by Remy Blank, 16 years ago

Milestone: 0.13
Owner: set to Remy Blank

Replying to dave@…:

  1. Trac's nice built-in traceback display is bypassed.

It's not bypassed, the error happens while rendering the nice built-in traceback.

  1. It appears to be generating an error while reporting an error. In this case the original error is lost and the system tells the user almost nothing she needs to know in order to debug the problem.

Correct, this is not very useful.

Is that really the intended behavior?

Obviously not, but it's a catch-22 situation. What we could probably do to reduce the likelihood of this happening is minimize the code path in Request.send_error(). In this particular case, not retrieve data from the session store.

comment:4 by Remy Blank, 13 years ago

Owner: Remy Blank removed

Refocusing.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.