Email update fails and messageserver5 goes crazy

Tracked by Jolla (In release)

asked 2014-05-08 01:55:36 +0300

luen gravatar image

updated 2014-05-09 02:26:43 +0300

The other day one of my IMAP email accounts stopped updating, and now even if I trig a manual update, it fails (tries for a while and then stops without errors). Meanwhile the system feels sluggish, so I checked with top and found that messageserver5 consumes close to 100 % cpu during the update, and memory (and swap) fills rapidly.

How do I debug what's happening? I found nothing interesting in /var/log nor in /var/systemlog. Where are all logs? There is a chance that everything will be OK if I remove and re-add the email account, but I'm curious, and I suspect that this might be a bug.

Edit 1:

I found that another folder of the same account synced fine.

Output of journalctl -a (filtered by "jolla-email") after failing sync:

May 09 00:43:00 jolla-email[11421]: [D] EmailAgent::executeCurrent:1036 - Executing  "exporting-updates:account-id=4"
May 09 00:43:00 jolla-email[11421]: [W] QMailServiceActionPrivate::newAction:264 - Unable to allocate new action - oustanding: 5
May 09 00:43:00 jolla-email[11421]: [D] EmailAgent::activityChanged:371 - Sync completed.
May 09 00:43:00 jolla-email[11421]: [D] EmailAgent::executeCurrent:1036 - Executing  "retrieve-message-list:account-id=4;folder-id=24"
May 09 00:43:00 jolla-email[11421]: [D] EmailAgent::activityChanged:384 - Activity State Changed: 0
May 09 00:43:00 jolla-email[11421]: [D] EmailAgent::activityChanged:384 - Activity State Changed: 1
May 09 00:44:15 jolla-email[11421]: [D] EmailAgent::activityChanged:321 - Sync completed with Errors!!!.
May 09 00:44:16 jolla-email[11421]: [W] QCopClient::connectToServer:1163 - void QCopClient::connectToServer() QLocalSocket::ConnectionRefusedError "QLocalSocket::connectToServer: Connection refused"
May 09 00:44:16 jolla-email[11421]: [W] QCopClient::connectToServer:1163 - void QCopClient::connectToServer() QLocalSocket::ConnectionRefusedError "QLocalSocket::connectToServer: Connection refused"
May 09 00:44:17 jolla-email[11421]: [W] QCopClient::connectToServer:1163 - void QCopClient::connectToServer() QLocalSocket::ConnectionRefusedError "QLocalSocket::connectToServer: Connection refused"

Output of journalctl -a after successful sync (same account, different folder):

May 09 00:51:22 jolla-email[11421]: [D] EmailAgent::executeCurrent:1036 - Executing  "exporting-updates:account-id=4"
May 09 00:51:22 jolla-email[11421]: [D] EmailAgent::activityChanged:384 - Activity State Changed: 0
May 09 00:51:22 jolla-email[11421]: [D] EmailAgent::activityChanged:371 - Sync completed.
May 09 00:51:22 jolla-email[11421]: [D] EmailAgent::executeCurrent:1036 - Executing  "retrieve-message-list:account-id=4;folder-id=39"
May 09 00:51:22 jolla-email[11421]: [D] EmailAgent::activityChanged:384 - Activity State Changed: 0
May 09 00:51:22 jolla-email[11421]: [D] EmailAgent::activityChanged:384 - Activity State Changed: 1
May 09 00:51:30 jolla-email[11421]: [D] unknown:0 - Messaging :  Custom Field: "qmf-smtp-capabilities-listed" = "true"
May 09 00:51:33 jolla-email[11421]: [D] unknown:0 - Messaging :  Custom Field: "qmf-smtp-capabilities-listed" = "true"
May 09 00:51:33 jolla-email[11421]: [D] EmailAgent::activityChanged:371 - Sync completed.
edit retag flag offensive close delete

Comments

Sailfish is using systemd. You can see the logs with journalctl -a if I'm not mistaken.

Damien Caliste ( 2014-05-09 00:51:31 +0300 )edit

Thanks Damien, I have now added the output of journalctl -a.

luen ( 2014-05-09 02:28:16 +0300 )edit
1

In the first log messageserver is crashing or killing IPC connection to the app. You can get proper logs this way, in:

/home/nemo/.config/QtProject/Messageserver.conf

enable file log and add a path for the log, like for example:

[FileLog]
Enabled=1
Path=/home/nemo/Documents/messageserver.log

Restart messageserver:

systemctl --user stop messageserver5.service
systemctl --user start messageserver5.service

send me the log file to mail-logs at jolla dot com. After that turn file log off again by setting "enabled" to 0.Thanks a lot!

VDVsx ( 2014-05-09 09:36:32 +0300 )edit

Thanks for the reply, Valério! Logging seems to work, and I sent the file to the above address.

luen ( 2014-05-09 10:18:26 +0300 )edit
1

Any updates on this issue?

I am pretty sure there are some memory leaks in messageserver5. Completely reproducible, every 7-8 days of regular usage (wi-fi and mobile data turned on at all times and email syncing every 15 minutes with 8 mailboxes), messageserver5 ends up using about 40% of the memory and getting the whole OS to be sluggish. Each time, a restart brings things back to normal, with only 3% of the memory used by ms5.

In case it matters, I also keep the email app open almost all the time.

Drekkarian ( 2014-10-15 23:12:16 +0300 )edit