Giter Site home page Giter Site logo

Comments (6)

az0 avatar az0 commented on September 23, 2024
  1. Which version of Firefox? I do not see "database disk image is malformed" with Firefox 120.0 on Ubuntu 22.04.
  2. Is Firefox completely closed when this happens? One way to check is ps -ef |grep firefox

from bleachbit.

pitsi avatar pitsi commented on September 23, 2024
  1. 120.0.1, from the package of the unstable branch. It happens since at least 119.0.1.
  2. Yes. Here is the requested ps output after a fresh boot (5-10 minutes of uptime) where ff did not run at all. Also notice that it can word with the other database files with no issues.
$ ps -ef | grep firefox
user         2379    2374  0 18:11 pts/2    00:00:00 grep --color=auto firefox

Tbh, I would delete the file and call it a day, but I do not want to lose my history or bookmarks or the config settings from ff.

from bleachbit.

az0 avatar az0 commented on September 23, 2024

storage.sqlite is not a primary database, and besides vacuuming, BleachBit 4.4.2 does not do anything to it. When cleaning history and bookmarks, other files are cleaned instead, so as a test, try this:

  1. Close Firefox
  2. Create a good backup of the whole ~/.mozilla directory
  3. Delete or rename the storage.sqlite file
  4. Open Firefox to recreate the file and check what has changed (e.g., bookmarks, history)
  5. Close Firefox
  6. Run BleachBit again. Does the error happen again?

If you lose something important, restore the backup.

from bleachbit.

pitsi avatar pitsi commented on September 23, 2024

About that... and why I want to avoid it.
I once copied my entire profile folder, ~/.mozilla/firefox/whatever.default/, to another location to back it up and when I moved it back in place, ff started with everything at default values, as if the profile folder was not there. Recovering my favorites and history from that backed up folder and importing it to the new profile was a huge amount of work I do not plan on repeating, ever (because my bookmarks count in tens of thousands now).

As for the file itself, I copied it to my home and ran the following which is supposed to fix it

$ sqlite3 storage.sqlite "PRAGMA integrity_check;"
*** in database main ***
Tree 5 page 357: btreeInitPage() returns error code 11
Tree 5 page 350: btreeInitPage() returns error code 11
Tree 5 page 346: btreeInitPage() returns error code 11
Tree 5 page 354: btreeInitPage() returns error code 11
Tree 5 page 356: btreeInitPage() returns error code 11
Tree 5 page 347: btreeInitPage() returns error code 11
Tree 5 page 349: btreeInitPage() returns error code 11
Tree 5 page 355: btreeInitPage() returns error code 11
Tree 5 page 352: btreeInitPage() returns error code 11
Tree 5 page 345: btreeInitPage() returns error code 11
Tree 5 page 358: btreeInitPage() returns error code 11
Tree 5 page 348: btreeInitPage() returns error code 11
Tree 5 page 351: btreeInitPage() returns error code 11
Tree 5 page 359: btreeInitPage() returns error code 11
Tree 5 page 360: btreeInitPage() returns error code 11
Tree 5 page 353: btreeInitPage() returns error code 11
Tree 5 page 68: btreeInitPage() returns error code 11
Tree 5 page 67: btreeInitPage() returns error code 11
Tree 5 page 72: btreeInitPage() returns error code 11
Tree 5 page 65: btreeInitPage() returns error code 11
Tree 5 page 70: btreeInitPage() returns error code 11
Tree 6 page 66: btreeInitPage() returns error code 11
Tree 6 page 71: btreeInitPage() returns error code 11
Tree 6 page 69: btreeInitPage() returns error code 11
Error: stepping, database disk image is malformed (11)

but vaccuming it still fails

$ sqlite3 storage.sqlite "VACUUM;"
Error: stepping, database disk image is malformed (11)

I have no idea how sqlite3 works, the above is just commands I found online and I think I executed them correctly.
If there is no way of recovering it, I can close this and give up. I have a lot more than a problematic database to think these days :(

from bleachbit.

pitsi avatar pitsi commented on September 23, 2024

I had a... moment of bravery earlier and deleted storage.sqlite (after backing it up that is). I ran firefox and it simply recreated the file, so bleachbit's function works properly now.

$ bleachbit -c firefox.vacuum
Vacuum 12.3kB /home/user/.mozilla/firefox/bcqy1g9e.default/storage.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/cookies.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/protections.sqlite
Vacuum 98.3kB /home/user/.mozilla/firefox/bcqy1g9e.default/favicons.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/content-prefs.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/formhistory.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/permissions.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/storage-sync.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/credentialstate.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/webappsstore.sqlite
Vacuum 0B /home/user/.mozilla/firefox/bcqy1g9e.default/storage-sync-v2.sqlite
Vacuum 5.3MB /home/user/.mozilla/firefox/bcqy1g9e.default/places.sqlite
Disk space recovered: 5.5MB
Files deleted: 0
Special operations: 12

from bleachbit.

az0 avatar az0 commented on September 23, 2024

Thanks for the follow up

from bleachbit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.