bug listings timing out

Bug #511546 reported by Sense Egbert Hofstede
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Committed
Undecided
Graham Binns

Bug Description

Whenever I try to visit my bugs overview page -- https://bugs.edge.launchpad.net/~qense -- it times out. I cannot view the page.
I'm running edge, version Launchpad 3.1.12 (r10224).

An OOPS-ID of the error: OOPS-1484EA243.

Tags: lp-bugs

Related branches

Curtis Hovey (sinzui)
summary: - Person bug overview pages keeps timing out
+ bug listins timing out
summary: - bug listins timing out
+ bug listings timing out
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

I can confirm the generalisation of the name change. Other bug listings indeed time out as well, including <https://bugs.launchpad.net/ubuntu/+source/nautilus/+bugs>, to which I am subscribed.

Revision history for this message
Curtis Hovey (sinzui) wrote :

I think something landed recently that is killing bug search and pages.

Changed in malone:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Michael Bienia (geser) wrote :

https://bugs.edge.launchpad.net/ubuntu/+source/vim is affected too (OOPS-1484ED491).

Deryck Hodge (deryck)
Changed in malone:
milestone: none → 10.01
Revision history for this message
Graham Binns (gmb) wrote :

My first guess, looking at this, is that it's caused by the code that checks to see whether a bug has a patch and then creates the appropriate badge for it if it does.

I'll try to come up with something more specific - and maybe a fix, too.

Revision history for this message
Graham Binns (gmb) wrote :

So, the specific problem is in Bug.has_patches (lp.bugs.models.bug:447), which loops over all a bug's attachments in python to determine whether any of them are patches or not.

The short-term fix for this is to remove the call to has_patches from BugTaskImageDisplayAPI.badges() (in canonical.launchpad.webapp.tales) so that this loop is never called. In order to be able to re-enable it we should has_patches either:

 a. Use a Storm query to fetch the patches for the bug or
 b. Become a field in the DB updated by a trigger.

Option a seems to me to be the preferable one. I'll try to write something suitable. If I can't, I'll just remove the call from BugTaskImageDisplayAPI.badges() as detailed above.

Revision history for this message
Jonathan Lange (jml) wrote :

You might want to look at the way we generate badges for branches in code.

Revision history for this message
Graham Binns (gmb) wrote :

I've fixed Bug.has_patches to use Storm instead of Python iteration and submitted the branch for review.

Changed in malone:
status: Triaged → In Progress
assignee: nobody → Graham Binns (gmb)
Revision history for this message
Graham Binns (gmb) wrote :

@jml Right. I think that's probably worth a separate bug report, though.

Changed in malone:
importance: Critical → Undecided
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in malone:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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