Bug 256409

Summary: databases/mysql57-server: upgrade to 5.7.34 leads to akonadi crash
Product: Ports & Packages Reporter: Martin Birgmeier <d8zNeCFG>
Component: Individual Port(s)Assignee: Jochen Neumeister <joneum>
Status: Closed FIXED    
Severity: Affects Only Me CC: a.hasumoto, drakcap, elwood, grahamperrin, jmc-freebsd2, n.diablo.n.f
Priority: --- Flags: bugzilla: maintainer-feedback? (joneum)
Version: Latest   
Hardware: Any   
OS: Any   

Description Martin Birgmeier 2021-06-04 09:16:53 UTC
Scenario:
- FreeBSD 12.2 p7
- Latest ports, KDE installed
- Updating ports using portmaster
- Updating mysql57-server from 5.7.33 to 5.7.34

Result:
- akonadi does not start anymore
- Log output when trying to start manually:

[0]% akonadictl start
org.kde.pim.akonadictl: Starting Akonadi Server...
org.kde.pim.akonadictl:    done.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
akonadi.collectionattributetable                   OK
akonadi.collectionmimetyperelation                 OK
akonadi.collectionpimitemrelation                  OK
akonadi.collectiontable                            OK
akonadi.flagtable                                  OK
akonadi.mimetypetable                              OK
akonadi.parttable                                  OK
akonadi.parttypetable                              OK
akonadi.pimitemflagrelation                        OK
akonadi.pimitemtable                               OK
akonadi.pimitemtagrelation                         OK
akonadi.relationtable                              OK
akonadi.relationtypetable                          OK
akonadi.resourcetable                              OK
akonadi.schemaversiontable                         OK
akonadi.tagattributetable                          OK
akonadi.tagremoteidresourcerelationtable           OK
akonadi.tagtable                                   OK
akonadi.tagtypetable                               OK
org.kde.pim.akonadiserver: Running DB initializer
org.kde.pim.akonadiserver: DB initializer done
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Assertion failed: (param->buffer_length != 0), function setup_one_fetch_function, file /usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/databases/mysql57-client/work/mysql-5.7.34/libmysql/libmysql.c, line 4112.
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = akonadiserver path = /usr/local/bin pid = 78672
KCrash: Arguments: /usr/local/bin/akonadiserver 
KCrash: Attempting to start /usr/local/lib/libexec/drkonqi
[0]% 

-- Martin
Comment 1 Atsushi Hasumoto 2021-06-04 16:26:46 UTC
Same Problem!?

- I use FreeBSD 13.0 RELEASE -p1
- Latest ports , KDE installed
- Updating pkg install.
- Updating mysql57-server from 5.7.33 to 5.7.34

Result:
- akonadi does not start anymore

*** akonadi (sqlite3 option select) from ports install.
    this problem fix.
    ofcourse, akonadiconsole can start.

--- Atsushi Hasumoto
Comment 2 Robert 2021-06-07 04:49:35 UTC
I have experienced this also; 
system: FreeBSD 12.2 patch 8 amd64
using KDE plasma version 5.21.5, QT version 5.15.2

after upgrading mysql-server to 5.7.34 from 5.7.33, akonadi no longer runs, so applications like Kmail cannot display properly.

contents of "akonadi.error" file:

2021-06-05T13:23:29 [INFO ] org.kde.pim.akonadiserver: Starting up the Akonadi Server...
2021-06-05T13:24:37 [CRITICAL] org.kde.pim.akonadis2021-06-05T13:24:43 [INFO ] org.kde.pim.akonadicontrol: Application '/usr/local/bin/akonadiserver' exited normally...
 connect to local MySQL server through socket '/tmp/runtime-foo/akonadi/mysql.socket' (2) QMYSQL: Unable to connect"
2021-06-05T13:24:43 [CRITICAL] org.kde.pim.akonadiserver: Failed to remove runtime connection config file
2021-06-05T13:24:43 [INFO ] org.kde.pim.akonadiserver: Shutting down AkonadiServer...

recompiled various programs including akonadi, mysql-server and -client, no change.

steps yet to try:
* make a new user, see if akonadi runs in that profile
* downgrade mysql-server & -client to 5.7.33
Comment 3 Robert 2021-06-07 18:09:57 UTC
(In reply to Robert from comment #2)

An addendum to my own post:
thanks to Florian Walpen's comment for related bug report 255748, I added the following lines to the Makefile for mysql57-client version 5.7.34:

CFLAGS+=       -DNDEBUG
CXXFLAGS+=     -DNDEBUG

and, as a precaution, made sure both of these lines were also in the Makefile for mysql57-server version 5.7.34. Akonadi in KDE now works the same as it did before when version 5.7.33 was in place.

It's a workaround, granted, but it does the job for now.
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2021-08-20 00:01:28 UTC
Please, is this still an issue? 

FYI: 

Repairing Akonadi on FreeBSD | [bobulate]
<https://euroquis.nl/kde/2021/07/12/akonadi.html>

– there's more, but I don't have links handy.
Comment 5 Martin Birgmeier 2021-08-20 11:13:39 UTC
The issue does not occur anymore.

Thank you.

Best regards, Martin