Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 11-09-2014, 05:21 PM   #346
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,535
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I've taken a look, and the problem is that the content table has some corruption. A count of the rows in it shows 15117, however I'm only able to retrieve 4,757 rows from it so attempts to build a new database from a dump of the old one fail.

An integrity check shows
Code:
*** in database main ***
Page 17620: btreeInitPage() returns error code 11
On tree page 16705 cell 80: Child page depth differs
On tree page 16705 cell 81: Child page depth differs
Page 17650: btreeInitPage() returns error code 11
On tree page 16705 cell 92: Child page depth differs
On tree page 16705 cell 93: Child page depth differs
On tree page 6819 cell 20: 2nd reference to page 7209
On tree page 6819 cell 20: Child page depth differs
On tree page 20 cell 1: Child page depth differs
Page 17619 is never used
Page 17621 is never used
Page 17648 is never used
Page 17649 is never used
rowid 19971 missing from index analytics_events_timestamp
rowid 19971 missing from index sqlite_autoindex_AnalyticsEvents_1
wrong # of entries in index analytics_events_timestamp
wrong # of entries in index sqlite_autoindex_AnalyticsEvents_1
If davidfor sees this, any thoughts?

I know you don't want to reset the database but you probably will have to sooner or later.
PeterT is offline   Reply With Quote
Old 11-09-2014, 06:50 PM   #347
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by PeterT View Post
I've taken a look, and the problem is that the content table has some corruption. A count of the rows in it shows 15117, however I'm only able to retrieve 4,757 rows from it so attempts to build a new database from a dump of the old one fail.

An integrity check shows
Code:
*** in database main ***
Page 17620: btreeInitPage() returns error code 11
On tree page 16705 cell 80: Child page depth differs
On tree page 16705 cell 81: Child page depth differs
Page 17650: btreeInitPage() returns error code 11
On tree page 16705 cell 92: Child page depth differs
On tree page 16705 cell 93: Child page depth differs
On tree page 6819 cell 20: 2nd reference to page 7209
On tree page 6819 cell 20: Child page depth differs
On tree page 20 cell 1: Child page depth differs
Page 17619 is never used
Page 17621 is never used
Page 17648 is never used
Page 17649 is never used
rowid 19971 missing from index analytics_events_timestamp
rowid 19971 missing from index sqlite_autoindex_AnalyticsEvents_1
wrong # of entries in index analytics_events_timestamp
wrong # of entries in index sqlite_autoindex_AnalyticsEvents_1
If davidfor sees this, any thoughts?

I know you don't want to reset the database but you probably will have to sooner or later.
I don't think it can be recovered. From what I have seen, the following errors can be fixed:
- "Page x is never used" - Fixed by compressing the database. In SQLite, this is the VACUUM command.
- "rowid x missing from index y" - Fixed by rebuilding the index or a compressing the database
- "wrong # of entries in index" - Should be fixed by rebuilding the index or a compressing the database.

I am pretty sure there is no way to recover from the tree errors. That means an internal data structure has been broken and no longer points to valid data. It could be restricted to one table or it could be all the tables. A compress might fix the error but it will almost definitely mean data loss. From where the error is, the "content" table is corrupt. I don't think a recovery of that will leave the database in a consistent state. And I'm pretty sure that if Paola powers off and on, some books are going to be lost or at least the status will be. And it wouldn't surprise me if the device decided the database was to bad and created a new one and prompted for login.

At this point, the best thing would be to dump the Bookmark table, or at least the rows for the sideloaded books (VolumeID LIKE 'file://mnt%' should get them), do the signout and in and then reload the Bookmark rows. I would do this sooner rather than later.
davidfor is offline   Reply With Quote
Old 11-10-2014, 12:35 AM   #348
hleo12
Guru
hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.hleo12 ought to be getting tired of karma fortunes by now.
 
hleo12's Avatar
 
Posts: 655
Karma: 5078890
Join Date: Feb 2014
Device: Kobo Glo (deceased), Kindle 4th, Kindle Basic 10th Generation
Quote:
Originally Posted by PeterT View Post
Unfortunately that is showing it that some errors exist in the database on the Kobo. The standard approach to fixing that is to logout on the Kobo and then redo the setup. Some day it would be great if we had a tool that would recover as much data as possible from a corrupted database and even build a new one.
I also sometimes get those types of error. But I read something somewhere on this forums about a solution.

I copy the device database on my PC then open it with SQLite Expert and choose Reindex All Tables under Database. Then I save it and transfer it to my Kobo. It works all of the times that I've encountered that problem.
hleo12 is offline   Reply With Quote
Old 11-10-2014, 07:57 AM   #349
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,535
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
That can work with some errors; unfortunately in Paola's case this would not have helped.
PeterT is offline   Reply With Quote
Old 11-10-2014, 11:00 AM   #350
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Peter, David, thank you so much - yes, the behaviour david described (powering off, offer to login) did indeed happen, and I "cheated" by replacing with the last functioning database.

The annotations are what I care about, so I'll try the dump option.

Again, thanks a million! I'll let you know how I get on as soon as I have a chance to try.
paola is offline   Reply With Quote
Old 11-10-2014, 01:41 PM   #351
Ebri
Groupie
Ebri began at the beginning.
 
Posts: 150
Karma: 48
Join Date: Apr 2014
Device: Kindle Paperwhite 2, Kobo Aura HD
PeterT: Thank you, I will check them.

Yesterday I also had to use a backup of my database to recover (removing the corrupt parts had some vital side-effects), and I did only highlighting on EPUBs, but if highlighting didn't happen while I have read all the page, I made the device (Aura HD) sleep and wake, which made it responsive again, but I am unsure whether it also killed the database. Do you have such experience? Especially does anyone have a cure, that would make highlighting faster? (I read quickly, but reading a page takes some time still.)
Ebri is offline   Reply With Quote
Old 11-10-2014, 02:47 PM   #352
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,535
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Corruption of the database is unfortunately a totally random event; no rhyme or reason as to why or when they happen.

About the best thing you can do is to ensure you have backup(s). I have calibre and the Kobo Utilities configured to take a backup upon connection; unfortunately it only takes one backup a day.
PeterT is offline   Reply With Quote
Old 11-10-2014, 02:55 PM   #353
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I even take backups through wifi (telnet), to avoid the chance of the USB connection, mounting, etc. causing the corruption.
Jellby is online now   Reply With Quote
Old 11-10-2014, 04:22 PM   #354
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Jellby View Post
I even take backups through wifi (telnet), to avoid the chance of the USB connection, mounting, etc. causing the corruption.
How do you take backup over WiFi (Telnet)?
JSWolf is offline   Reply With Quote
Old 11-10-2014, 08:11 PM   #355
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by PeterT View Post
Corruption of the database is unfortunately a totally random event; no rhyme or reason as to why or when they happen.
Yes, other then a disconnect from the PC without ejecting, I've never been able to find a pattern either.
Quote:
About the best thing you can do is to ensure you have backup(s). I have calibre and the Kobo Utilities configured to take a backup upon connection; unfortunately it only takes one backup a day.
So you want an "on every connect" option? I've been think about it, so I'll add it when I get a chance.
davidfor is offline   Reply With Quote
Old 11-10-2014, 08:50 PM   #356
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Ebri View Post
PeterT: Thank you, I will check them.

Yesterday I also had to use a backup of my database to recover (removing the corrupt parts had some vital side-effects), and I did only highlighting on EPUBs, but if highlighting didn't happen while I have read all the page, I made the device (Aura HD) sleep and wake, which made it responsive again, but I am unsure whether it also killed the database. Do you have such experience? Especially does anyone have a cure, that would make highlighting faster? (I read quickly, but reading a page takes some time still.)
I haven't noticed it much recently, but I was having a problem like this. Occasionally when I tried to highlight something, the device would hang. But, putting it to sleep and waking it would get it going. And highlighting would work. I never worked out pattern, but I felt like it was more likely to happen if I started from the right edge and swiped left. Of course, when I deliberately did this, it always worked.

But, I would have said this went away with 3.11.0. I put some of the blame on something in the database. When certain things are done, an entry is added or updated in the Events table. For highlighting, eventid 9 is used to count them. Up to 3.11.0, this was done incorrectly and a row could be added to the database for each highlight and the count updated on all of them. After a while, there could be a lot of rows. I found about 3000 one time I looked. Deleting these sped up the highlighting and dictionary lookup a lot.

As of 3.11.0, the count has been changed to a per book count. But, it's possible the old rows are still there. That would have a performance hit due to the size of the table.
davidfor is offline   Reply With Quote
Old 11-10-2014, 08:55 PM   #357
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,535
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Ah; so David, the two of us should be safe from the multiple rows in Events!
PeterT is offline   Reply With Quote
Old 11-10-2014, 08:58 PM   #358
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
What is the best way to compress an SQL database?
JSWolf is offline   Reply With Quote
Old 11-10-2014, 09:11 PM   #359
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by JSWolf View Post
What is the best way to compress an SQL database?
That really depends on the "SQL database". You should use the tools supplied as part of the RDBMS. They all have them. Or a third party tool that does it.

And yes, that is me being a smart-arse (but it is a completely accurate answer). "SQL database" has almost no meaning in a question like that because there are a lot of different SQL databases. DB2, MySQL, Progresss, Oracle, SQL Server could all be called SQL databases.

Of course, the context does tell me that you are probably talking about the SQLite database that the Kobo devices use. In that case, the simplest way to compress it is using my Kobo Utilities plugin in calibre. Other than that, any SQLite database tool will have an option to do it or allow you to run VACUUM.
davidfor is offline   Reply With Quote
Old 11-10-2014, 09:22 PM   #360
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by PeterT View Post
Ah; so David, the two of us should be safe from the multiple rows in Events!
I have no idea what you mean But, maybe you're right. Maybe the change wasn't in 3.11.0. I can't remember when I noticed the change. There were two or three other events that had a similar problem. They seem to have been fixed as well.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Firmware 3.5.0 murg Kobo Reader 424 08-30-2014 12:57 AM
Kobo Firmware 2.6.1 MDK Kobo Reader 515 10-22-2013 06:40 PM
Kobo Firmware 2.4.0 kaikara Kobo Reader 253 04-15-2013 10:55 AM
Glo Kobo Firmware 2.3.1 danskmacabre Kobo Reader 304 02-07-2013 01:52 AM
kobo firmware The Terminator Kobo Reader 1 12-13-2010 06:26 PM


All times are GMT -4. The time now is 02:40 AM.


MobileRead.com is a privately owned, operated and funded community.