We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

Contacts list broken, contactsd CPU load - "Cannot proceed with invalid self contact" [answered]

asked 2014-01-30 11:57:07 +0200

tokaru gravatar image

updated 2014-02-04 14:52:34 +0200

Note: It was not my intention to cross-post, but after posting here I realized that the contactd issue tracker is probably the better place. I'll update either way when there are news about the issue.

I am currently experiencing serious problems with my contact list on Sailfish 1.0.2.5: When I open the Contacts app, it is empty. When I try to select a contact from the Phone app, the screen is suddenly very slow in response to touches and slides and after some time, gives me an empty contact list, too.

Rebooting did not help.

Inspected topright after reboot and noticed that the contactsd process is consequently hitting the CPU, the percentage steadily growing about 1-2% per second. After reaching about 70%, it starts to display as contactsd <defunct>, then disappears from the process table for some time, then starts again with a few percent and rising.

Note: all of this happens without me interacting with the Contacts or Phone apps on the screen.

Following journalctlI can see the same few lines over and over again:

contactsd[4678]: [W] mKCal::SqliteStorage::open:293 - sqlitestorage.cpp: 293 - database "/home/nemo/.local/share/system/privileged/Calendar/mkcal/db" opened
contactsd[4678]: [W] Tp::Debug::invokeDebugCallback:149 - tp-qt 0.9.3 WARN: Introspecting roster failed with "org.freedesktop.Telepathy.Error.NotImplemented": "Roster not supported"
contactsd[4678]: [W] Contactsd::enabledWarning:106 - contactsd 1.1.1 WARN: Unable to save relationship for self contact - error: 4
invoker[4688]: Cannot proceed with invalid self contact!
mapplauncherd[1128]: Boosted process (pid=4678) was terminated due to signal 6
invoker[4688]: error: Can't send signal 6 to application [4678]: No such process
systemd[1061]: contactsd.service: main process exited, code=killed, status=6
systemd[1061]: Unit contactsd.service entered failed state.
systemd[1061]: contactsd.service holdoff time over, scheduling restart.
contactsd[4689]: [W] mKCal::SqliteStorage::open:293 - sqlitestorage.cpp: 293 - database "/home/nemo/.local/share/system/privileged/Calendar/mkcal/db" opened
contactsd[4689]: [W] Tp::Debug::invokeDebugCallback:149 - tp-qt 0.9.3 WARN: Introspecting roster failed with "org.freedesktop.Telepathy.Error.NotImplemented": "Roster not supported"
contactsd[4689]: [W] Contactsd::enabledWarning:106 - contactsd 1.1.1 WARN: Unable to save relationship for self contact - error: 4
invoker[4699]: Cannot proceed with invalid self contact!
mapplauncherd[1128]: Boosted process (pid=4689) was terminated due to signal 6
invoker[4699]: error: Can't send signal 6 to application [4689]: No such process
systemd[1061]: contactsd.service: main process exited, code=killed, status=6
systemd[1061]: Unit contactsd.service entered failed state.
systemd[1061]: contactsd.service holdoff time over, scheduling restart.

Any help with this is appreciated very much, thanks a lot.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by tokaru
close date 2014-03-22 22:58:31.689848

1 Answer

Sort by » oldest newest most voted
3

answered 2014-01-30 12:42:53 +0200

chris.adams gravatar image

Thanks for the report. It seems like the sqlite database on the device has been corrupted somehow.

To try to "salvage" data from the device, you can try (developer mode required, so not recommended unless you know what you're doing / agree to the terms of the developer mode setting):

ssh into your device, then: devel-su -c sqlite3 /home/nemo/.local/share/system/privileged/Contacts/qtcontacts-sqlite/contacts.db "select * from Contacts;" And also from other tables (schema is visible at https://github.com/nemomobile/qtcontacts-sqlite/blob/master/src/engine/contactsdatabase.cpp)

To try to "fix" the situation on your device, you can delete that sqlite database (and the .wal / .shm files associated with it), and then retrigger synchronisation with your various accounts (Google/Facebook in particular) by opening them up in jolla-settings Accounts UI, and Save them via Accept button/swipe - then wait a while.

Of course, deleting those db files requires developer mode too. I should write a recovery tool (or modify the vcard importer tool to have a "clean everything" switch, I guess).

I'm mostly interested in what caused the corruption... fs issue or code issue or...? Did anything strange happen prior to the occurrance of this problem (eg, a reboot or something which might cause a transaction to fail or something strange?)

Cheers, Chris.

ps - Australian TZ so might not be responsive later tonight. Ping chriadam or mvogt on #jollamobile on freenode irc for more immediate response.

edit flag offensive delete publish link more

Comments

Thanks for the quick response... I assume that I have caused the problem myself then, obviously I did something wrong when restoring the database from a backup last week :( Just strange that everything worked fine the last few days. Just saw that Contacts has more than 70K rows by now....

tokaru ( 2014-01-30 13:45:32 +0200 )edit

... two new ones being added every few seconds, called telepathy and aggregate - so there's definitely something weird going on in there. I'll investigate and probably nuke the database and report back... Thanks so far :)

tokaru ( 2014-01-30 13:46:50 +0200 )edit

Okay - deleted the .db / .wal /.shm files, re-imported my contacts from VCF again - everything seems to work fine for now... no more log messages - and the CPU is relaxing now :) Thanks a lot for your quick support. I am not sure what I did wrong to get the database into this state, though.

tokaru ( 2014-01-30 14:04:36 +0200 )edit

... maybe I did not delete the wal/shm files... not sure. BTW: the reason why I fiddled with the DB in the first place was that there was no possibility to clean or multi-delete in the contact list interface. I had a lot of junk in there after trying to import from my SIM (bad idea). Thanks again

tokaru ( 2014-01-30 14:09:24 +0200 )edit

My contacts.db seems to be 66 megabytes long.

I don't like to lose my contacts so I'd like to edit the dump and put it back to the database, how do I put them back from the dump when I've delted all the ghost lines from the dump?

hkultala ( 2014-07-02 18:50:53 +0200 )edit

Question tools

Follow
3 followers

Stats

Asked: 2014-01-30 11:57:07 +0200

Seen: 788 times

Last updated: Jan 31 '14