Merge lp:~mvo/software-center/robustness-lp1054070 into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 3202
Proposed branch: lp:~mvo/software-center/robustness-lp1054070
Merge into: lp:software-center
Diff against target: 15 lines (+2/-1)
1 file modified
softwarecenter/backend/reviews/__init__.py (+2/-1)
To merge this branch: bzr merge lp:~mvo/software-center/robustness-lp1054070
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+126207@code.launchpad.net

Description of the change

This is a tiny branch that extends the recovery mechanism for corrupted
berkeley DB files to MemoryErrors as well to catch #1054070.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

After some back/forth with seb128 who can reproduce it and setting env.set_lp_max_{locks,lockers,objects} and also env.mutex_set_max() I think re-creating is ok(ish) for now as its cached data anyway only.

Revision history for this message
Gary Lasker (gary-lasker) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/backend/reviews/__init__.py'
2--- softwarecenter/backend/reviews/__init__.py 2012-08-28 11:46:23 +0000
3+++ softwarecenter/backend/reviews/__init__.py 2012-09-25 09:52:43 +0000
4@@ -348,9 +348,10 @@
5 outfile = self.REVIEW_STATS_BSDDB_FILE
6 outdir = self.REVIEW_STATS_BSDDB_FILE + ".dbenv/"
7 self._dump_bsddbm_for_unity(outfile, outdir)
8- except bdb.DBError as e:
9+ except (bdb.DBError, MemoryError) as e:
10 # see bug #858437, db corruption seems to be rather common
11 # on ecryptfs
12+ # see also bug #1054070 for the MemoryError
13 LOG.warn("error creating bsddb: '%s' (corrupted?)" % e)
14 try:
15 shutil.rmtree(outdir)

Subscribers

People subscribed via source and target branches