This project is archived and is in readonly mode.
SQLite3::CorruptException: database disk image is malformed
Reported by Sam Ruby | December 7th, 2010 @ 08:25 PM | in 3.1
I have a highly repeatable scenario which produces the exception mentioned above.
It happens on 3.1 master, but not on 3-0-stable. It happens on some of my machines, but not all of them. It happens when I try it "manually" by visiting the application using a browser. Changing the scenario slightly changes the frequency of the problem -- simply adding a call to "rake test" or removing pagination or even mail can make the problem occur less frequently.
I've posted the scenario and a snapshot of the application just before the failure online: http://intertwingly.net/stories/2010/12/07/
To reproduce:
- download and unpack either the zip or tgz file
- edit Gemfile, and modify the paths
- bundle install
- rake db:migrate db:seed
- rails server
- visit the root page (localhost:3000)
- click on the first Add to Cart button, then Checkout; then Place Order
Comments and changes to this ticket
-
Sam Ruby December 7th, 2010 @ 08:46 PM
My status:
Fails on Ubuntu 10.04.1, SQLite3 version 3.6.22, AMD Athlon(tm) 64 Processor 3800+ (desktop)
Fails on Ubuntu 10.04.1, SQLite3 version 3.6.22, AMD Athlon(tm) Processor LE-1640 (desktop)
Passes on Ubuntu 10.04.1, SQLite3 version 3.6.22, AMD Athlon(tm) II X2 240 Processor (desktop)
Passes on RHEL 6,SQLite3 version 3.6.20, Intel Core 2 Duo (IBM Thinkpad)
Passes on Mac OSX 10.5.8, SQLite3 version 3.6.23.1, Intel Core 2 Duo (mac mini)
Failures cross Ruby versions (i.e., I see the same result with 1.8.7, 1.8.8, 1.9.2, and 1.9.3). If I find other environmental differences, I will report them back here.
-
Sam Ruby December 8th, 2010 @ 08:28 PM
- Assigned user set to José Valim
- Importance changed from Medium to High
ae44bf7c7ebb39d9a12d5253016f92617bee79c7 is the first bad commit commit ae44bf7c7ebb39d9a12d5253016f92617bee79c7 Author: Josh Kalderimis <josh.kalderimis@gmail.com> Date: Thu Nov 18 00:32:43 2010 +0100 bye bye extlib_inheritable_*, AS callbacks now using class_attribute Signed-off-by: José Valim <jose.valim@gmail.com>
Reproduction instructions here: http://intertwingly.net/blog/2010/12/07/SQLite3-CorruptException-da...
-
Sam Ruby December 8th, 2010 @ 08:58 PM
- State changed from incomplete to open
- Tag set to corrupt sqlite3
-
Aaron Patterson December 21st, 2010 @ 05:19 PM
Hey Sam,
I was able to reproduce (yay). I haven't found a solution yet though.
I found that the database corruption would only happen if postfix was running. You can have postfix installed, but if you stop the process, the db corruption won't happen.
-
Sam Ruby December 23rd, 2010 @ 10:33 PM
- State changed from open to resolved
- Assigned user changed from José Valim to Aaron Patterson
-
Aaron Patterson December 23rd, 2010 @ 10:38 PM
Fuck ya!
Here are appropriate commits to Ruby and the mail gem that fix this problem.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>