Database size mismatch error

Posted by: tonyc

Database size mismatch error - 02/01/2002 16:52

I happily started up my car today and unhappily noticed my Empeg was stopping during the player init. The messages were flashing by but it got stuck at "Building music databases". It was stuck there for a minute or two so I pulled the Empeg out and tried to start it up again, same thing.

So I came home and looked at the serial output and saw this:



mount: /drive1 not mounted already, or bad option
mount: you must specify the filesystem type
Using non-standard cache size 108 (adjustment 32)
player.cpp : 550:empeg-car 2.00-beta7 (internal) 2001/12/22.
! tunedb_disk.cpp :1224:Database size mismatch error.



There were then several minutes of disk activity followed by the player app restarting and everything looking fine. But when I reboot, it AGAIN comes up with "Building music databases" and the same error on the debug output. This is not convenient!

So what's happening here? First off, what would have corrupted my database? Second, is the player actually mounting /drive0 and re-writing the database file? That sounds pretty shady because I was in the car at the time and I pulled the plug while this was happening... I'd like to know how to handle this when it happens again, but even more, I'd like to know what the heck could have corrupted my database when it's supposedly READ ONLY and I hadn't mounted writeable in a week or two.

So maybe re-synching will fix my database, but if that's the case, what is the player doing for two or three minutes while all that disk activity is happening?

Thanks.
Posted by: Roger

Re: Database size mismatch error - 02/01/2002 18:56

In the directory /empeg/var/ on the empeg, delete 'database' and 'playlists' and 'tags'. Then when you reboot the player, it'll rebuild the database. You'll need to run a sync with emplode to stop it having to do this at every reboot.
Posted by: tonyc

Re: Database size mismatch error - 02/01/2002 19:44

Out of curiosity, what was it doing in the minute or two while the front panel said "Building music databases" if it wasn't, well, building the music databases? Is it mounting the drive RW?
Posted by: hybrid8

Re: Database size mismatch error - 02/01/2002 23:38

I had a similar problem after a failed sync a while back. Every time I'd boot the player it would rebuild the database. It was taking over a minute I believe. A proper sync and rebuild with emplode fixed it.

Bruno
Posted by: Roger

Re: Database size mismatch error - 03/01/2002 02:58

Out of curiosity, what was it doing in the minute or two while the front panel said "Building music databases" if it wasn't, well, building the music databases?

Good question. I obviously didn't read the original message properly. No, it's not mounting the drives read-write. The only time that the player mounts the drives read-write is when emplode/emptool tells it to. This is why you have to do a full sync in order to make it save the rebuilt databases.

Hmmm...
Posted by: altman

Re: Database size mismatch error - 03/01/2002 04:53

You *can* actually get it to rebuild and save to disk; you need to:

rwm
rm /drive0/var/database
rm /drive0/var/playlists
rm /drive0/var/tags
exit

...the player then starts up with the music partition read-write, rebuilds the database, saves it, and then remounts read-only.

Hugo
Posted by: Roger

Re: Database size mismatch error - 03/01/2002 04:57

Yeah, yeah, I know, but that's more complicated. If the database is rebuilt correctly, emplode is also better at consistency-checking it.


Posted by: Roger

Re: Database size mismatch error - 03/01/2002 04:59

Right, assuming that this is still happening, I'd like you to send me:

1. The number of the highest *1 file from /drive0/fids and from /drive1/fids. Alternatively, just do an "ls -l " in both places, and send me the output.

2. The files that Hugo mentions from /empeg/var.

"Database size mismatch" seems to be caused by a discrepency between the playlists file and the database file. Obviously, one or other is being rebuilt incorrectly.

If it's gone away because of the rebuild, let us know...
Posted by: tonyc

Re: Database size mismatch error - 03/01/2002 08:24

Well I actually removed and re-synched before I got a chance to get that information for you. I guess we'll have to wait until it happens to someone else and get that information from them...

But here's the million dollar question... Short of a bad disk or a stray magnetic field, what could possibly be corrupting the database? It was very odd because it was working fine inside my office, and when I went outside and put it in my car, the database was corrupt. So some time during the day, without syncing or mounting the drives RW, the database changed somehow. I'm very confused.