Bug 273612 - Local Folders: Unknown error. (There is no transaction in progress.)
Summary: Local Folders: Unknown error. (There is no transaction in progress.)
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 1.99.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 273613 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-19 07:43 UTC by onigino
Modified: 2015-09-09 21:24 UTC (History)
7 users (show)

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


Attachments
Various logs and config files (25.55 KB, application/x-gzip)
2011-07-08 14:38 UTC, François Rey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description onigino 2011-05-19 07:43:57 UTC
Version:           1.99.0 (using KDE 4.6.3) 
OS:                Linux

Kmail doesn't crash or anything but reports error on start, and on random interval or during some random transactions (moving mail in folders or sending messages)

Local Folders: Unknown error. (There is no transaction in progress.)

I have 2x google IMAP accounts..


Reproducible: Always

Steps to Reproduce:
open kmail
send+receive messages
send email.



Actual Results:  
Local Folders: Unknown error. (There is no transaction in progress.)
still does what I ask, but just reports this annoying error..

Expected Results:  
no error?

OS: Linux (x86_64) release 2.6.38.6custom
Compiler: gcc
Slackware64

Not sure what else you might need...
Here is console out put from a send+recieve request:

Last driver error: "QMYSQL: Unable to begin transaction"
Last database error: "MySQL server has gone away"

My SQL is up and running (stand alone) and akonditray doesn't report any errors with it, it runs on localhost..
Comment 1 Christophe Marin 2011-05-19 12:07:56 UTC
*** Bug 273613 has been marked as a duplicate of this bug. ***
Comment 2 Christophe Marin 2011-05-19 12:11:13 UTC
> Last database error: "MySQL server has gone away"

if they exist, please paste the content of the following files:

~/.local/share/akonadi/akonadiserver.error.old
~/.local/share/akonadi/akonadi_control.error
~/.local/share/akonadi/db_data/mysql.err
~/.local/share/akonadi/db_data/mysql.err.old
Comment 3 onigino 2011-05-19 13:23:51 UTC
*grey@greyblue:~/.local/share/akonadi$ cat akonadiserver.error.old 
ItemRetrieverException :  Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. 
ItemRetrieverException :  Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. 
ItemRetrieverException :  Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
D-Bus session bus went down - quitting 
*grey@greyblue:~/.local/share/akonadi$ cat akonadiserver.error     
ItemRetrieverException :  Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. ItemRetrieverException :  Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. 

ItemRetrieverException :  Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. 

no mysql.err or mysql.err.old (i use an external mysql instance that runs locally..)

PS: I haven't seen this error since i rebooted w/ 4.6rc1 (i copied from git a few hours ago) doesn't mean it might not come back.. but could be resolved..
Comment 4 onigino 2011-06-02 04:06:51 UTC
same error
Comment 5 François Rey 2011-07-08 14:38:53 UTC
Created attachment 61707 [details]
Various logs and config files

I think I'm having this issue, or at least this bug report is the only thing that comes up when searching google for:
akonadi Database error: DataStore::beginTransaction    Last driver error: "QMYSQL: Unable to begin transaction"    Last database error: "MySQL server has gone away"

The above message is filling up akonadiserver.error.
Of particular interest are the following lines at the end of mysql.err:
110708 12:17:38 [Warning] Aborted connection 39 to db: 'akonadi' user: 'francois' host: '' (Got a packet bigger than 'max_allowed_packet' bytes)
110708 15:55:27 [Warning] Aborted connection 47 to db: 'akonadi' user: 'francois' host: '' (Got an error reading communication packets)

This is happening after I upgraded from kdepim 4.4.11.1 -> 4.6.1 on arch linux 64 bit and kde 4.6.3 -> 4.6.5. The migration for contacts and calendars went fine, however the kmail migration (from maildirs) crashed, so this maybe the first originating cause. Contacts and Calendar resources seems to be duplicated, and mail folders seem to have some unread duplicates. Kmail seems able to retrieve new mail, but I'm unable to access my mail because the preview pane is stuck on retrieving folder. Kmail seems to be churning out lots of things, akonadiserver and akonadi_mixedma use 5Gb of RAM, and sometimes conflict error pop up asking to choose to keep left, right, or both. 
The attached archive contains various log and config files. There's also a couple kcrash files: the first one occured during the migration process last night, the second one happened just recently.
I would appreciate very much any pointers in recovering from this situation.
Thanks
Comment 6 Mark Gannon 2011-09-19 18:35:49 UTC
I'm also experiencing this issue.  I'm running an up to date Gentoo system with KDE 4.7.1.  The problem usually turns up overnight. First thing in the morning when I manually check my mail, I get an KDE error message (which I can't access right now).  When I restart Akonadi using the system tray "Akonadi Tray" to restart the service I'm again able to access email.

After having done the above, the Akonadi Server Report Shows: 

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/markg/.config/akonadi/akonadiserverrc':
[%General]
Driver=QMYSQL

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

[Debug]
Tracer=null

[QMYSQL]
StartServer=false
ServerPath=
Name=akonadi
Host=localhost
User=<correct user name here>
Password=<correct password here> 
Options=

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


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.6.0


Test 7:  SUCCESS
--------

Akonadi control process registered at D-Bus.
Details: The Akonadi control process is registered at D-Bus which typically indicates it is operational.

Test 8:  SUCCESS
--------

Akonadi server process registered at D-Bus.
Details: The Akonadi server process is registered at D-Bus which typically indicates it is operational.

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':
akonotesresource.desktop
birthdaysresource.desktop
calendarsearchagent.desktop
contactsresource.desktop
davgroupwareresource.desktop
icalresource.desktop
imapresource.desktop
invitationsagent.desktop
kabcresource.desktop
kcalresource.desktop
kdeaccountsresource.desktop
knutresource.desktop
kolabproxyresource.desktop
localbookmarksresource.desktop
maildirresource.desktop
maildispatcheragent.desktop
mboxresource.desktop
microblog.desktop
mixedmaildirresource.desktop
mtdummyresource.desktop
nepomukcalendarfeeder.desktop
nepomukcontactfeeder.desktop
nepomukemailfeeder.desktop
nepomuktagresource.desktop
nntpresource.desktop
notesresource.desktop
openxchangeresource.desktop
pop3resource.desktop
vcarddirresource.desktop
vcardresource.desktop

Environment variable XDG_DATA_DIRS is set to '/usr/local/share:/usr/share'

Test 12:  SUCCESS
--------

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

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/markg/.local/share/akonadi/akonadiserver.error.old'>/home/markg/.local/share/akonadi/akonadiserver.error.old</a>.

File content of '/home/markg/.local/share/akonadi/akonadiserver.error.old':
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 
Database error: DataStore::beginTransaction 
  Last driver error: "QMYSQL: Unable to begin transaction" 
  Last database error: "MySQL server has gone away" 


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:  SUCCESS
--------

No previous Akonadi control error log found.
Details: The Akonadi control process did not report any errors during its previous startup.
Comment 7 Mark Gannon 2011-09-26 19:12:06 UTC
This problem (at least in my case) occurs because the connection between the external to Akonadi MYSQL database connection times out do to inactivity. It might also occur if there are network connectivity issues.  The default Mysql timeout period is 8 hours.  Consequently, it might appear to happen over night.  The problem can be ameliorated, but not solved, by increasing the wait_timeout value in the Mysql database config file.

By default the Mysql client library (called by Akonadi through the qt sql library) doesn't attempt to reconnect.  Reconnection is controlled via a database connection initialization setting.  While not set in either the Akonadi or QT SQL code, it can be set via the ~/.config/akonadi/akonadiserverrc file.  Change the Options line to read:
Options="MYSQL_OPT_RECONNECT=1"

Since it is difficult to imagine a scenario where a reconnection would be the desired behaviour, it might be worth considering a change to the MYSQL initialization code.
Comment 8 bosyber 2011-12-13 14:19:58 UTC
I also encountered this problem, with an an external to akonadi mysql (my ubuntu 11.10 had issues with starting the akondi-mysql as admin root, and I have myqsl running anyway).

The workaround Mark Gannon mentions in comment #7 works for me.

I do have a question: why is it, for an external mysql, not a very good final solution? The timeout is there so that connections don't remain spuriously open; in my view, when nothing is using a db-connection/Anakonda, it should just stop and reconnect when activity starts again. Am I misunderstanding something?
Comment 9 Nick Cardullo 2012-03-02 07:42:54 UTC
I just wanted to chime in and say I'm effected by this bug too. I setup akonadi to use the external MySQL server at the same time I setup kontact with all my information. Everything seemed to work fine at first and the error began the next morning. The error went away with a restart of akonadi server and so far Mark Gannon's workaround seems to be working.
Comment 10 Roman Zimmermann 2012-11-14 15:26:56 UTC
*** This bug has been confirmed by popular vote. ***
Comment 11 Martin Steigerwald 2015-09-09 21:24:06 UTC
Thank you GreyBones for your report and all the commenters. It is about a version of KMail which uses Nepomuk and is unmaintained. Thus closing. If you still see this issue with KDEPIM 4.14 + latest Akonadi 1.13 you can get, please open a new bug report. Please note that KDEPIM and Akonadi 15.08 already contains some more performance improvements and KDEPIM and Akonadi 15.12 contains even more massive performance improvements.

Thanks and greetings from KDE Randa Meetings,
Martin