Bug 337040 - setting lower_case_table_names=1 in /etc/my.cnf prevents akonadi server from starting
Summary: setting lower_case_table_names=1 in /etc/my.cnf prevents akonadi server from ...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: 1.12.1
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-04 12:28 UTC by Liviu Vasut
Modified: 2017-01-07 21:59 UTC (History)
0 users

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 Liviu Vasut 2014-07-04 12:28:57 UTC
akonadi won't start when lower_case_table_names is set to 1 in /etc/my.cnf, using mysql as database storage driver (see below akonadi self test report and my.cnf content)

Reproducible: Always

Steps to Reproduce:
1. make sure lower_case_table_names is set to 0 in /etc/my.cnf (or missing)
2. set database driver as mysql in Akonadi Configuration
3. do not check "use internal mysql server"
4. configure connection settings
5. start akonadi => akonadi is started OK
6. stop akonadi
7. set lower_case_table_names to 1 in /etc/my.cnf
8. restart mysqld
9. start akonadi => akonadi won't start
Actual Results:  
akonadi does not start

Expected Results:  
akonadi should start normaly

Content of akonadi self test:

Akonadi Server Self-Test Report
===============================

Test 1:  SUCCESS
--------

Database driver found.
Details: The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration and was found on your system.

File content of '/home/li/.config/akonadi/akonadiserverrc':
[%General]
Driver=QMYSQL

[QSQLITE3]
Name=/home/li/.local/share/akonadi/akonadi.db

[Debug]
Tracer=null

[QMYSQL]
StartServer=false
ServerPath=/usr/libexec/mysqld
Name=akonadi
Host=localhost
User=myuser
Password=mypass
Options=

[QPSQL]
StartServer=true
Name=akonadi
Host=
User=
Password=
Port=5432

[SQLITE]
Name=akonadi


Test 2:  SUCCESS
--------

Akonadi is not running as root
Details: Akonadi is not running as a root/administrator user, which is the recommended setup for a secure system.

Test 3:  SKIP
--------

MySQL server executable not tested.
Details: The current configuration does not require an internal MySQL server.

Test 4:  SKIP
--------

MySQL server error log not tested.
Details: The current configuration does not require an internal MySQL server.

Test 5:  SKIP
--------

MySQL server configuration not tested.
Details: The current configuration does not require an internal MySQL server.

Test 6:  SUCCESS
--------

akonadictl found and usable
Details: The program '/usr/bin/akonadictl' to control the Akonadi server was found and could be executed successfully.
Result:
Akonadi 1.12.1


Test 7:  ERROR
--------

Akonadi control process not registered at D-Bus.
Details: The Akonadi control process is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.

Test 8:  ERROR
--------

Akonadi server process not registered at D-Bus.
Details: The Akonadi server process is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.

Test 9:  ERROR
--------

Nepomuk search service not registered at D-Bus.
Details: The Nepomuk search service is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.

Test 10:  SKIP
--------

Protocol version check not possible.
Details: Without a connection to the server it is not possible to check if the protocol version meets the requirements.

Test 11:  SUCCESS
--------

Resource agents found.
Details: At least one resource agent has been found.

Directory listing of '/usr/share/akonadi/agents':
akonadinepomukfeederagent.desktop
akonotesresource.desktop
archivemailagent.desktop
birthdaysresource.desktop
contactsresource.desktop
davgroupwareresource.desktop
facebookresource.desktop
folderarchiveagent.desktop
googlecalendarresource.desktop
googlecontactsresource.desktop
icaldirresource.desktop
icalresource.desktop
imapresource.desktop
invitationsagent.desktop
kabcresource.desktop
kalarmdirresource.desktop
kalarmresource.desktop
kcalresource.desktop
kdeaccountsresource.desktop
kolabproxyresource.desktop
localbookmarksresource.desktop
maildirresource.desktop
maildispatcheragent.desktop
mailfilteragent.desktop
mboxresource.desktop
microblog.desktop
migrationagent.desktop
mixedmaildirresource.desktop
mtdummyresource.desktop
nepomuktagresource.desktop
newmailnotifieragent.desktop
nntpresource.desktop
notesresource.desktop
openxchangeresource.desktop
pop3resource.desktop
sendlateragent.desktop
vcarddirresource.desktop
vcardresource.desktop

Environment variable XDG_DATA_DIRS is set to '/usr/share/kde-settings/kde-profile/default/share:/usr/local/share:/usr/share'

Test 12:  ERROR
--------

Current Akonadi server error log found.
Details: The Akonadi server reported errors during its current startup. The log can be found in <a href='/home/li/.local/share/akonadi/akonadiserver.error'>/home/li/.local/share/akonadi/akonadiserver.error</a>.

File content of '/home/li/.local/share/akonadi/akonadiserver.error':
"
Sql error: Can't write; duplicate key in table 'collectiontable' QMYSQL: Unable to execute query
Query: CREATE TABLE CollectionTable (id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, remoteId VARBINARY(255), remoteRevision VARBINARY(255), name VARBINARY(255) NOT NULL, parentId BIGINT, resourceId BIGINT NOT NULL, subscribed BOOL NOT NULL DEFAULT true, cachePolicyInherit BOOL NOT NULL DEFAULT true, cachePolicyCheckInterval INTEGER NOT NULL DEFAULT -1, cachePolicyCacheTimeout INTEGER NOT NULL DEFAULT -1, cachePolicySyncOnDemand BOOL NOT NULL DEFAULT false, cachePolicyLocalParts VARBINARY(255), queryString VARBINARY(32768), queryAttributes VARBINARY(255), queryCollections VARBINARY(255), isVirtual BOOL DEFAULT false, FOREIGN KEY (parentId) REFERENCES CollectionTable(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (resourceId) REFERENCES ResourceTable(id) ON UPDATE CASCADE ON DELETE CASCADE)  COLLATE=utf8_general_ci DEFAULT CHARSET=utf8" 
Unable to initialize database. 
"[
0: akonadiserver(_Z11akBacktracev+0x4a) [0x465bea]
1: akonadiserver() [0x465e62]
2: /lib64/libc.so.6() [0x320c835cb0]
3: /lib64/libc.so.6(gsignal+0x39) [0x320c835c39]
4: /lib64/libc.so.6(abort+0x148) [0x320c837348]
5: /lib64/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x84) [0x3636c71d04]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xad) [0x467cad]
7: /lib64/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0xb0) [0x3636d10fb0]
8: /lib64/libQtCore.so.4() [0x3636d20c85]
9: /lib64/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x31) [0x3636d29e51]
10: akonadiserver(_ZN7Akonadi6Server13AkonadiServer4initEv+0x5fb) [0x46b66b]
11: /lib64/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x26e) [0x3636d9febe]
12: /lib64/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8d) [0x3636d86ebd]
13: /lib64/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x205) [0x3636d8a0d5]
14: /lib64/libQtCore.so.4() [0x3636db62de]
15: /lib64/libglib-2.0.so.0(g_main_context_dispatch+0x166) [0x320e4492a6]
16: /lib64/libglib-2.0.so.0() [0x320e449628]
17: /lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x320e4496dc]
18: /lib64/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x7e) [0x3636db5a5e]
19: /lib64/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x3f) [0x3636d8595f]
20: /lib64/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x19d) [0x3636d85cad]
21: /lib64/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x99) [0x3636d8b399]
22: akonadiserver(main+0x263) [0x460063]
23: /lib64/libc.so.6(__libc_start_main+0xf5) [0x320c821d65]
24: akonadiserver() [0x4609d9]
]
" 


Test 13:  ERROR
--------

Previous Akonadi server error log found.
Details: The Akonadi server reported errors during its previous startup. The log can be found in <a href='/home/li/.local/share/akonadi/akonadiserver.error.old'>/home/li/.local/share/akonadi/akonadiserver.error.old</a>.

File content of '/home/li/.local/share/akonadi/akonadiserver.error.old':
"
Sql error: Can't write; duplicate key in table 'collectiontable' QMYSQL: Unable to execute query
Query: CREATE TABLE CollectionTable (id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, remoteId VARBINARY(255), remoteRevision VARBINARY(255), name VARBINARY(255) NOT NULL, parentId BIGINT, resourceId BIGINT NOT NULL, subscribed BOOL NOT NULL DEFAULT true, cachePolicyInherit BOOL NOT NULL DEFAULT true, cachePolicyCheckInterval INTEGER NOT NULL DEFAULT -1, cachePolicyCacheTimeout INTEGER NOT NULL DEFAULT -1, cachePolicySyncOnDemand BOOL NOT NULL DEFAULT false, cachePolicyLocalParts VARBINARY(255), queryString VARBINARY(32768), queryAttributes VARBINARY(255), queryCollections VARBINARY(255), isVirtual BOOL DEFAULT false, FOREIGN KEY (parentId) REFERENCES CollectionTable(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (resourceId) REFERENCES ResourceTable(id) ON UPDATE CASCADE ON DELETE CASCADE)  COLLATE=utf8_general_ci DEFAULT CHARSET=utf8" 
Unable to initialize database. 
"[
0: akonadiserver(_Z11akBacktracev+0x4a) [0x465bea]
1: akonadiserver() [0x465e62]
2: /lib64/libc.so.6() [0x320c835cb0]
3: /lib64/libc.so.6(gsignal+0x39) [0x320c835c39]
4: /lib64/libc.so.6(abort+0x148) [0x320c837348]
5: /lib64/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x84) [0x3636c71d04]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xad) [0x467cad]
7: /lib64/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0xb0) [0x3636d10fb0]
8: /lib64/libQtCore.so.4() [0x3636d20c85]
9: /lib64/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x31) [0x3636d29e51]
10: akonadiserver(_ZN7Akonadi6Server13AkonadiServer4initEv+0x5fb) [0x46b66b]
11: /lib64/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x26e) [0x3636d9febe]
12: /lib64/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8d) [0x3636d86ebd]
13: /lib64/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x205) [0x3636d8a0d5]
14: /lib64/libQtCore.so.4() [0x3636db62de]
15: /lib64/libglib-2.0.so.0(g_main_context_dispatch+0x166) [0x320e4492a6]
16: /lib64/libglib-2.0.so.0() [0x320e449628]
17: /lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x320e4496dc]
18: /lib64/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x7e) [0x3636db5a5e]
19: /lib64/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x3f) [0x3636d8595f]
20: /lib64/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x19d) [0x3636d85cad]
21: /lib64/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x99) [0x3636d8b399]
22: akonadiserver(main+0x263) [0x460063]
23: /lib64/libc.so.6(__libc_start_main+0xf5) [0x320c821d65]
24: akonadiserver() [0x4609d9]
]
" 


Test 14:  SUCCESS
--------

No current Akonadi control error log found.
Details: The Akonadi control process did not report any errors during its current startup.

Test 15:  ERROR
--------

Previous Akonadi control error log found.
Details: The Akonadi control process reported errors during its previous startup. The log can be found in <a href='/home/li/.local/share/akonadi/akonadi_control.error.old'>/home/li/.local/share/akonadi/akonadi_control.error.old</a>.

File content of '/home/li/.local/share/akonadi/akonadi_control.error.old':
ProcessControl: Application /usr/bin/akonadi_imap_resource stopped unexpectedly ( "Process crashed" ) 

===================
content of /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max_allowed_packet=16M
lower_case_table_names=1
symbolic-links=0

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
max_allowed_packet=16M
Comment 1 Denis Kurz 2016-09-24 20:44:23 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 2 Denis Kurz 2017-01-07 21:59:38 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.