OOPS reports on retried exceptions should include information about the original query

Bug #31479 reported by Dafydd Harries
20
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

When an OOPS occurs because of a psycopgda Retry exception (e.g. OOPS-45A331), the traceback doesn't include any information about what the query that failed was.

Jamesh suggested in bug 39441:
"To help debug these problems, it would be useful to see the details of the wrapped exception/traceback, and include them in the OOPS report.

This could either be done specific to Retry exceptions, or we could try and detect wrapped exceptions with something like:
  if len(value.args) == 3 and issubclass(value.args[0], Exception) and isinstance(value.args[2], traceback):
      ...

The additional traceback could just be appended after the first traceback in the OOPS report."

SteveA suggested in bug 92185 more information that we should capture in cases like this:

"OOPS reports should take into account whether the request has been retried by showing how many retries occurred, and preferably showing independently the SQL and non-SQL time for each retry. This will allow us to see whether retried requests are using a lot of database resources, particularly with transactions involving writes to the database, it will help us debug cases where state that should be reset on a Retry is not reset, and will give us insight into whether some OOPS reports that have a lot of non-sql time are requests that were retried. That is, if we're resetting the SQL statement log on a Retry, but not resetting the non-sql-time counter."

Dafydd Harries (daf)
Changed in launchpad:
assignee: nobody → stub
status: Unconfirmed → Confirmed
Revision history for this message
Andrew Bennetts (spiv) wrote :

Steve's asked me to work on this.

Changed in launchpad:
assignee: stub → spiv
description: updated
Christian Reis (kiko)
Changed in launchpad:
importance: High → Medium
Changed in launchpad:
assignee: spiv → nobody
description: updated
Changed in launchpad:
importance: Medium → High
Curtis Hovey (sinzui)
tags: added: oops-infrastructure
Revision history for this message
Robert Collins (lifeless) wrote :

Stuart recently landed a change to reference the last oops in the same thread, which should open the way to implementing this reasonably gracefully.

summary: - Retry exceptions should include information about the original query
+ OOPS reports on retried exceptions should include information about the
+ original query
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.