database disk image is malformed

Richard L. Hamilton rlhamil at smart.net
Fri Mar 27 23:47:03 UTC 2020


Why can't there be at least a way to back up the database, and perhaps maintain a log of changes made since the last update, so that the database could be restored and brought up to date?

So if for example one does port echo outdated | wc -l and the result is at least some size, one might choose  to back up, do the updates, and back up again; but if it's less, one might not bother.

Worst case then would be reinstalling what was in the log (if there was some question of corruption other than just the database), rather than everything.

I don't know how one backs up SQLite databases (other than copying the underlying file when it's inacttve and healthy), and I don't much know tcl. But it doesn't seem that it should be  all that difficult.  What am I missing?

> On Mar 27, 2020, at 18:30, Ryan Schmidt <ryandesign at macports.org> wrote:
> 
> 
> 
> On Mar 27, 2020, at 17:07, Gael Arnaud wrote:
> 
>> Am facing an error with the following message each time I try to install a new port 
>> 
>> Error: rev-upgrade failed: sqlite error: database disk image is malformed (11) while executing query: SELECT id, path FROM registry.files WHERE active = '1' AND binary IS NULL
>> Error: Follow https://guide.macports.org/#project.tickets to report a bug.
>> 
>> I Guess, I need to uninstall and reinstall macport, but before doing such a drastic step, I wanted to be sure there were no other ways to avoid this long and fastidious process.. 
> 
> There have been a few previous reports of this, and yes, in those cases, uninstalling and reinstalling was necessary, since there isn't a known way to uncorrupt a corrupted database. You could wait and see if somebody else has a better suggestion but I'm not sure there is one.
> 
> https://trac.macports.org/ticket/55942
> 
> SQLite is very old and well-tested software. On good hardware it should not corrupt databases, so the corruption could indicate a hardware problem, such as with your disk or memory. Or, if you are running in a virtual machine and the VM crashed or was turned off unexpectedly, it could indicate that the VM does not properly guarantee that writes to the virtual disk are propagated to the physical disk immediately.
> 
> http://sqlite.1065341.n5.nabble.com/Corrupted-database-On-tree-page-76852-cell-303-Rowid-18741471-out-of-order-td104891.html
> 
> 



More information about the macports-users mailing list