question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sqlite corruption after 3.18.1 update

See original GitHub issue

Issue Summary

I’m seeing ghost update fail trying to bump from 3.17.1 to 3.18.1, something in the migrations seems to munge our sqlite db. The update offers to roll back to 3.17.1 but that doesn’t work, as the db is left in a unusable state.

To Reproduce

cd /var/www/ghost && ghost update

The intial error message after that suggested running journalctl -u ghost_ideas-rejuvenation-com -n 50 (should say to that with sudo?) which returns

Screen Shot 2020-06-03 at 11 05 22 AM

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

Technical details:

  • Ghost Version: 3.17.1
  • Node Version: 12.18.0
  • Browser/OS: Ubuntu 16.04
  • Database: sqlite

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
acburdinecommented, Jun 3, 2020

@tobiasboyd the changes in that commit actually convert relative sqlite paths to be absolute, so you’d essentially be manually applying the changes 😄. If you do that prior to the changes in that commit shipping, then once a new version of the CLI is released it will ignore your absolute sqlite path

1reaction
ErisDScommented, Jun 3, 2020

Sorry, I moved the issue and then got distracted before I finished writing a comment.

This is caused by having a relative path in your config, as Vikas said we’re not quite sure why it broke recently yet. The workaround is to change the path to your sqlite DB to be absolute in your config as seen here: https://forum.ghost.org/t/unable-to-upgrade-ghost-from-v3-16-1-to-v3-18-0/14836/5

I’m gonna close this now as it’s fixed in master by https://github.com/TryGhost/Ghost-CLI/commit/3f07b05a63cbaa94dd02a26b66a83901e0bdab3c, but thanks for the nicely written report 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recent News - SQLite
SQLite version 3.34.1 is a patch releases that fixes a possible use-after-free bug that can be provoked by malicious SQL. Other minor issues...
Read more >
Recent SQLite News - Hwaci
SQLite version 3.18.1 is a bug-fix release against version 3.18.0 that fixes the auto_vacuum corruption bug described in ticket fda22108.
Read more >
chromium / external / github.com / sqlite - Google Git
... constant-refactoring-in-triggers · constraint-error-codes · copy-optimization · coroutine-autoindex · coroutine-refactor · corrupt-schema · cost-est ...
Read more >
Bug #1523291 “Unable to Connect to Database Error with Kobo”
That sort of error usually means the there is a problem with the database on the device. It is corrupted in such a...
Read more >
How to recover a corrupt SQLite3 database? - Stack Overflow
UPDATE: There is now an automatic method that is built into SQLite: .recover. Sometimes, the corruption is only or mostly in indexes, in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found