Activity log for bug #812176

Date Who What changed Old value New value Message
2011-07-18 08:42:43 William Grant bug added bug
2011-07-18 08:42:43 William Grant attachment added appserver log from such an exception https://bugs.launchpad.net/bugs/812176/+attachment/2214535/+files/afterCall-explosion
2011-07-18 08:43:51 David Planella bug added subscriber David Planella
2011-09-01 21:57:06 Francis J. Lacoste tags oops critical-analysis oops
2011-09-15 21:20:20 Francis J. Lacoste summary Exceptions in LaunchpadBrowserPublication.afterCall's commit are not handled Exceptions during commits are not handled by the publisher.
2011-09-15 21:20:24 Francis J. Lacoste summary Exceptions during commits are not handled by the publisher. Exceptions during commits are not handled by the publisher
2011-09-15 21:20:52 Francis J. Lacoste tags critical-analysis oops critical-analysis oops regression
2011-09-15 21:33:06 Francis J. Lacoste description The txn.commit() in LaunchpadBrowserPublication.afterCall can sometimes fail with an IntegrityError, and this isn't handled well by the publisher. The request is apparently aborted uncleanly, and the user is presented with a "Please try again" page. The commit is preceded by this comment: # Abort the transaction on a read-only request. # NOTHING AFTER THIS SHOULD CAUSE A RETRY. It's not clear whether that includes the commit or not. I've only ever seen this on one view: POTemplate:+admin. A UNIQUE-violating update is apparently only flushed in the final post-view commit. An appserver log from one case of this is attached. 18:18:55 < dpm> so here are the steps to reproduce it for me 18:19:05 < dpm> 1. Go to https://translations.launchpad.net/ubuntu/oneiric/+source/gnome-panel/+pots/gnome-panel-3.0/+admin 18:20:01 < dpm> 2. Change 'Series (Optional)' to 'old-lp-translations/deleted-templates' 18:20:13 < dpm> 3. Change 'Series' to (no value) 18:20:30 < dpm> 4. Press the 'Change' button 18:20:49 < dpm> Then I get the "Sorry, there was a problem connecting to the Launchpad server. ", "Please try again" page Any exceptions raised during the commit() made in afterCall() is badly handled. It seems that the Zope transaction module wants you to abort the transaction after a failed commit(), or at least call begin() again. ZopePublication.handleException() (which we override without delegating to the base class) does transaction.abort() as the first thing. The failure is raised when the DB policy is removed from the store - which attempts a write to the session, which tries to register the session store with the transaction, which reports that the current transaction is failed. The end result is that request fails uncleanly, and the user is presented with a "Please try again" page. There is also probably a bug in the POTemplate:+admin page. As usually IntegrityError that can never succeed are a problem with the view. The publication mechanism can deal with IntegrityError that are caused by concurrent edit, but not with ones that happens because of lack of defensive programming. A UNIQUE-violating update is apparently only flushed at the end of the request when committing. An appserver log from one case of this is attached. 18:18:55 < dpm> so here are the steps to reproduce it for me 18:19:05 < dpm> 1. Go to https://translations.launchpad.net/ubuntu/oneiric/+source/gnome-panel/+pots/gnome-panel-3.0/+admin 18:20:01 < dpm> 2. Change 'Series (Optional)' to 'old-lp-translations/deleted-templates' 18:20:13 < dpm> 3. Change 'Series' to (no value) 18:20:30 < dpm> 4. Press the 'Change' button 18:20:49 < dpm> Then I get the "Sorry, there was a problem connecting to the Launchpad server. ", "Please try again" page That's a regression as we were able previously to deal with errors happening during commit. (At least, I know for a fact that IntegrityError like that one would be attempted thrice - since IntegrityError are retried - before failing with a standard OOPS page.)
2012-10-22 00:34:29 William Grant tags critical-analysis oops regression critical-analysis oops regression webapp-infrastructure