Bug 381850

Summary: akonadi, kimap, kmail very broken on FreeBSD
Product: [Frameworks and Libraries] Akonadi Reporter: Tobias C. Berner <tcberner>
Component: libakonadiAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal CC: deadmaxfr, groot, trasz
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: FreeBSD   
Latest Commit: Version Fixed In:

Description Tobias C. Berner 2017-07-01 08:21:40 UTC

Ever since the switch to kf5 based kontact (so since a long long time), the mail part of kontact is rather broken for me (for 99.99% of the time, there are small phases where a mailbox actually works).

I'll list some of the issues:
* kmail fails to load the mails from the backend, and I have an empty message list -- the tooltip properly shows that there are xyz mails.
* kmail fetches a whole inbox, at the end thinks "ooh, something is wrong", refetches all, for ever and ever
* displays everything perfectly, but marking messages as read does nothing

This happens on all my machines, with PGSQL/MYSQL/SQLITE backends, freshly vacuumed, fsckd and rm'd aconadidbs and so on.

In the terminal I see stuff like:

org.kde.pim.akonadicore: Invalid command, the world is going to end!
QIODevice::read (QLocalSocket): device not open
org.kde.pim.akonadicore: Job error:  "Cannot connect to the Akonadi service." for collection: 97


org.kde.pim.imapresource: Detected inconsistency in local cache, we're missing some messages. Server:  12871  Local:  12800
org.kde.pim.imapresource: Refetching complete mailbox.

See also: https://mail.kde.org/pipermail/kde-freebsd/2017-June/026313.html
Comment 1 Alexandre Martins 2018-04-12 11:37:30 UTC
I found the problem on my FreeBSD 11.1 !

It's due to the size of the UNIX socket. On FreeBSD, it's defaulted to 8Kb, but on Linux it is much more large !

On my PC, it just increase the size to 64k and it's working. For that, put the followinf lines into /etc/sysctl.conf file:


I don't known which one make the job ...
Comment 2 groot 2018-04-15 11:21:01 UTC
On my 11.1-amd64 box, it's the two stream settings, net.local.stream.recvspace=65536 and net.local.stream.sendspace=65536 seem to have done the trick. I'll use KMail some more today and see what happens.
Comment 3 Edward Tomasz Napierala 2018-10-17 13:48:10 UTC
Just wondering...  is the workaround still neccessary with 12.0-ALPHA or recent 11-STABLE?  Thanks!
Comment 4 Alexandre Martins 2018-10-17 13:52:00 UTC
(In reply to Edward Tomasz Napierala from comment #3)
> Just wondering...  is the workaround still neccessary with 12.0-ALPHA or
> recent 11-STABLE?  Thanks!

I'm working with the last FreeBSD 11.2, and I still need the workaround.

I don't know for the latest versions, sorry.
Comment 5 Edward Tomasz Napierala 2018-10-17 19:44:02 UTC
FWIW, I'm wondering if it could have been fixed in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181741.
Comment 6 groot 2018-10-18 20:54:35 UTC
I just built 11-STABLE (r 339415) and rebooted, after commenting-out the changes in the sysctls. KMail still seems to work, but the thing was that you wouldn't *necessarily* have KMail fall over on you immediately. So let's call it "probably fixed, sysctls no longer needed" -- but it needs some longer period of trying it out.
Comment 7 groot 2018-10-19 12:50:36 UTC
Left akonadi and kmail running overnight, and now bumped into a case of "world is going to end" again. Stopped akonadi, quit kmail, bumped sysctl and the messages I previously couldn't read, now were ok again.