Bug 381850 - akonadi, kimap, kmail very broken on FreeBSD
Summary: akonadi, kimap, kmail very broken on FreeBSD
Status: CONFIRMED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: libakonadi (show other bugs)
Version: unspecified
Platform: Other FreeBSD
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-01 08:21 UTC by Tobias C. Berner
Modified: 2018-10-19 12:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias C. Berner 2017-07-01 08:21:40 UTC
Hi


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

or

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:

net.local.stream.recvspace=65536
net.local.stream.sendspace=65536
net.local.dgram.recvspace=65536
net.local.dgram.maxdgram=65536
net.local.seqpacket.recvspace=65536
net.local.seqpacket.maxseqpacket=65536

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.