Issue 14041: bsddb DB_RUNRECOVERY crash on write access (original) (raw)

Issue14041

Created on 2012-02-17 15:31 by totycro, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
data.db totycro,2012-02-17 15:31 db file required to reproduce the crash
Messages (2)
msg153551 - (view) Author: totycro (totycro) Date: 2012-02-17 15:31
The attached file data.db should be a valid bsddb file, still i get this crash on write: File "/usr/lib64/python2.7/bsddb/__init__.py", line 280, in wrapF self.db[key] = value DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC: Invalid argument') Full traceback: http://pastebin.com/A1VSPV9Q I can reproduce the crash with python 2.7.2 with just these lines (it doesn't crash on empty db files): import shelve a = shelve.open("data.db") b="crashin.."*20000 a['content/scenarios/tutorial_da.yaml'] = b a['content/scenarios/tutorial_cs.yaml'] = b
msg153559 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2012-02-17 16:09
The file is corrupted: """ jcea@ubuntu:/tmp/z$ /usr/local/BerkeleyDB.5.3/bin/db_verify data.db db_verify: BDB0551 Page 0: nonsensical free list pgno 55 db_verify: BDB1107 Page 2: offpage item 19 has bad pgno 70 db_verify: BDB1107 Page 20: offpage item 5 has bad pgno 59 db_verify: BDB1107 Page 36: offpage item 9 has bad pgno 94 db_verify: BDB1107 Page 37: offpage item 9 has bad pgno 57 db_verify: data.db: BDB0090 DB_VERIFY_BAD: Database verification failed BDB5105 Verification of data.db failed. """ For "real world" usage, you must use Berkeley DB transactional storage mode. If you use a concurrent datastore or anything like that (anything more "simple" that the transactional mode), you can corrupt your database if the application or the computer crash in a bad moment. Or if you try to backup the database while writes are in progress, for instance. Briefly: use the transactional mode and read the Oracle documentation carefully!. Closing the report as invalid, since the database is actually corrupt.
History
Date User Action Args
2022-04-11 14:57:26 admin set github: 58249
2012-02-17 16:09:44 jcea set status: open -> closednosy: + jceamessages: + resolution: not a bug
2012-02-17 15:31:23 totycro create