DB Error Message: database disk image is malformed

Setup: Thunderbird 52.4.0 64bit, Lightning 5.4, Provider for Google Calenda=
r 3.3, Debian derivative (Mint 18.3, 64 bit, fully patched)

Symptom: one-way syncronization of Google Calendar events/tasks: events cre=
ated or modified within Lightning get propagated correctly towards Google C=
alendar, events created or modified within Google Calendar (or by other sys=
tems accessing Google Calendar - iPad, Android phone) DO NOT replicate at a=
ll (neither new, nor modified events)

Attempts: forced syncronization, multiple times - consistently hangs around=
 4200 of ~4400 items. Relevant portion of log shows:

[calStorageCalendar] Message: executeItemStatement exception
Connection Ready: true
Last DB Error Number: 11
Last DB Error Message: database disk image is malformed
Database File: /home/user/.thunderbird/iz4mvd4p.default/calendar-data/cache=
..sqlite
Transaction In Progress: true
Last DB Statement: [object StatementJSHelper]
Last Statement param [cal_id]: ab2a6874-6322-4163-8f4c-611fc1cb8dae
Last Statement param [item_id]: 1bosndi4e8ifh0lhlolp3u07fc%40google.com##ab=
2a6874-6322-4163-8f4c-611fc1cb8dae
Last Statement param [value]: "3009503559443000"=1A1bosndi4e8ifh0lhlolp3u07=
fc=1Afalse
Last Statement param [QueryInterface]: function QueryInterface() {
    [native code]
}
Exception: [Exception... "Component returned failure code: 0x8052000b (NS_E=
RROR_FILE_CORRUPTED) [mozIStorageStatement.executeStep]"  nsresult: "0x8052=
000b (NS_ERROR_FILE_CORRUPTED)"  location: "JS frame :: file:///home/user/.=
thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df193=
3103%7D/components/calStorageCalendar.js :: calStorageCalendar.prototype.ex=
ecuteItemStatement :: line 395"  data: no]
1: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-=
762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:2440] calSt=
orageCalendar.prototype.logError
2: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-=
762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:397] calSto=
rageCalendar.prototype.executeItemStatement
3: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-=
762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:2286] calSt=
orageCalendar.prototype.deleteItemById
4: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-=
762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:1975] calSt=
orageCalendar.prototype.flushItem
5: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-=
762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:564] calSto=
rageCalendar.prototype.doModifyItem
6: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-=
762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:477] calSto=
rageCalendar.prototype.modifyItem/offlineJournalFlagListener.onOperationCom=
plete
7: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-=
762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:974] calSto=
rageCalendar.prototype.getItemOfflineFlag
8: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-=
762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:480] calSto=
rageCalendar.prototype.modifyItem
9: [resource://gdata-provider/modules/shim/Calendar.jsm:245] promisifyCalen=
dar/promisifyProxyHandler.promiseOperation
10: [resource://gdata-provider/modules/shim/Calendar.jsm:257] promisifyCale=
ndar/promisifyProxyHandler.get/<
  calStorageCalendar.js:2440:9
[calStorageCalendar] DB error: database disk image is malformed
exc: [Exception... "Component returned failure code: 0x8052000b (NS_ERROR_F=
ILE_CORRUPTED) [mozIStorageStatement.executeStep]"  nsresult: "0x8052000b (=
NS_ERROR_FILE_CORRUPTED)"  location: "JS frame :: file:///home/user/.thunde=
rbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7=
D/components/calStorageCalendar.js :: calStorageCalendar.prototype.executeI=
temStatement :: line 395"  data: no]  calStorageCalendar.js:2322:13
[calStorageCalendar] DB error: not an error
exc: [Exception... "Component returned failure code: 0x8052000b (NS_ERROR_F=
ILE_CORRUPTED) [mozIStorageStatement.executeStep]"  nsresult: "0x8052000b (=
NS_ERROR_FILE_CORRUPTED)"  location: "JS frame :: file:///home/user/.thunde=
rbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7=
D/components/calStorageCalendar.js :: calStorageCalendar.prototype.executeI=
temStatement :: line 395"  data: no]  calStorageCalendar.js:2322:13
NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_=
UNEXPECTED) [mozIStorageConnection.rollbackTransaction]  calStorageCalendar=
..js:2323
[calGoogleCalendar] Error syncing:
2147549183:[Exception... "Component returned failure code: 0x8000ffff (NS_E=
RROR_UNEXPECTED) [mozIStorageConnection.rollbackTransaction]"  nsresult: "0=
x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: file:///home/user/=
..thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df19=
33103%7D/components/calStorageCalendar.js :: calStorageCalendar.prototype.r=
eleaseTransaction :: line 2323"  data: no]  calGoogleCalendar.js:807:17
[calCachedCalendar] replay action failed: null, uri=3Dgoogleapi://user@gmai=
l.com/?calendar=3Duser%40gmail.com, result=3DComponent returned failure cod=
e: 0x8000ffff (NS_ERROR_UNEXPECTED) [mozIStorageConnection.rollbackTransact=
ion], operation=3D[xpconnect wrapped calIOperation]  calCachedCalendar.js:3=
30:29
[calCachedCalendar] replayChangesOn finished.  calCachedCalendar.js:335:25
[calCachedCalendar] sync queue empty.  calCachedCalendar.js:313:13

I understand there's some sort of corruption within cal storage - any remed=
y to this situation is greatly appreciated.

TIA for support
0
granric
10/12/2017 7:57:21 AM
mozilla.support.calendar 2553 articles. 0 followers. Post Follow

3 Replies
44 Views

Similar Articles

[PageSpeed] 3

Hi granric,

you can find the databases in your profile, in the calendar-data
subdirectory. You can safely delete cache.sqlite as it will be
repopuplated from the remote calendars. If that is the corrupted one
then it will already solve your issue.

If you have local calendars, these are saved in local.sqlite. Deleting
this file will also delete your calendars, so probably not the best
option. Maybe there is a way to recover corrupted sqlite file if this is
the culprit.

Philipp

On 10/12/17 9:57 AM, granric@gmail.com wrote:
> Setup: Thunderbird 52.4.0 64bit, Lightning 5.4, Provider for Google Calendar 3.3, Debian derivative (Mint 18.3, 64 bit, fully patched)
> 
> Symptom: one-way syncronization of Google Calendar events/tasks: events created or modified within Lightning get propagated correctly towards Google Calendar, events created or modified within Google Calendar (or by other systems accessing Google Calendar - iPad, Android phone) DO NOT replicate at all (neither new, nor modified events)
> 
> Attempts: forced syncronization, multiple times - consistently hangs around 4200 of ~4400 items. Relevant portion of log shows:
> 
> [calStorageCalendar] Message: executeItemStatement exception
> Connection Ready: true
> Last DB Error Number: 11
> Last DB Error Message: database disk image is malformed
> Database File: /home/user/.thunderbird/iz4mvd4p.default/calendar-data/cache.sqlite
> Transaction In Progress: true
> Last DB Statement: [object StatementJSHelper]
> Last Statement param [cal_id]: ab2a6874-6322-4163-8f4c-611fc1cb8dae
> Last Statement param [item_id]: 1bosndi4e8ifh0lhlolp3u07fc%40google.com##ab2a6874-6322-4163-8f4c-611fc1cb8dae
> Last Statement param [value]: "3009503559443000"1bosndi4e8ifh0lhlolp3u07fcfalse
> Last Statement param [QueryInterface]: function QueryInterface() {
>     [native code]
> }
> Exception: [Exception... "Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [mozIStorageStatement.executeStep]"  nsresult: "0x8052000b (NS_ERROR_FILE_CORRUPTED)"  location: "JS frame :: file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js :: calStorageCalendar.prototype.executeItemStatement :: line 395"  data: no]
> 1: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:2440] calStorageCalendar.prototype.logError
> 2: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:397] calStorageCalendar.prototype.executeItemStatement
> 3: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:2286] calStorageCalendar.prototype.deleteItemById
> 4: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:1975] calStorageCalendar.prototype.flushItem
> 5: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:564] calStorageCalendar.prototype.doModifyItem
> 6: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:477] calStorageCalendar.prototype.modifyItem/offlineJournalFlagListener.onOperationComplete
> 7: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:974] calStorageCalendar.prototype.getItemOfflineFlag
> 8: [file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js:480] calStorageCalendar.prototype.modifyItem
> 9: [resource://gdata-provider/modules/shim/Calendar.jsm:245] promisifyCalendar/promisifyProxyHandler.promiseOperation
> 10: [resource://gdata-provider/modules/shim/Calendar.jsm:257] promisifyCalendar/promisifyProxyHandler.get/<
>   calStorageCalendar.js:2440:9
> [calStorageCalendar] DB error: database disk image is malformed
> exc: [Exception... "Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [mozIStorageStatement.executeStep]"  nsresult: "0x8052000b (NS_ERROR_FILE_CORRUPTED)"  location: "JS frame :: file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js :: calStorageCalendar.prototype.executeItemStatement :: line 395"  data: no]  calStorageCalendar.js:2322:13
> [calStorageCalendar] DB error: not an error
> exc: [Exception... "Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [mozIStorageStatement.executeStep]"  nsresult: "0x8052000b (NS_ERROR_FILE_CORRUPTED)"  location: "JS frame :: file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js :: calStorageCalendar.prototype.executeItemStatement :: line 395"  data: no]  calStorageCalendar.js:2322:13
> NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [mozIStorageConnection.rollbackTransaction]  calStorageCalendar.js:2323
> [calGoogleCalendar] Error syncing:
> 2147549183:[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [mozIStorageConnection.rollbackTransaction]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: file:///home/user/.thunderbird/iz4mvd4p.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js :: calStorageCalendar.prototype.releaseTransaction :: line 2323"  data: no]  calGoogleCalendar.js:807:17
> [calCachedCalendar] replay action failed: null, uri=googleapi://user@gmail.com/?calendar=user%40gmail.com, result=Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [mozIStorageConnection.rollbackTransaction], operation=[xpconnect wrapped calIOperation]  calCachedCalendar.js:330:29
> [calCachedCalendar] replayChangesOn finished.  calCachedCalendar.js:335:25
> [calCachedCalendar] sync queue empty.  calCachedCalendar.js:313:13
> 
> I understand there's some sort of corruption within cal storage - any remedy to this situation is greatly appreciated.
> 
> TIA for support
> 

0
Philipp
10/12/2017 4:48:52 PM
Thanks Philipp,

I've renamed cache.sqlite and started a new sync, which replicated successfully all events from Google Calendar. 

However, as of now, I'm still missing all tasks belonging to the same remote calendar, despite having forced replication on those as well.

My next attempt would be to unsubscribe from that calendar and start anew, unless there's a more clever way.

I'll update this thread with any news
0
granric
10/12/2017 7:13:31 PM
In addition to the above, had to unsubscribe from/resubscribe to Google Calendar/Tasks - then sync worked like a charm!

This solved also the original issue of one-way sync, mentioned in my OP.

Thanks, again.
granric 
0
granric
10/12/2017 8:25:16 PM
Reply: