[Akonadi] [Bug 371570] Duplicate entry in CollectionTable when creating database in a new installation

2016-10-24 Thread Antonio Larrosa via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=371570

--- Comment #1 from Antonio Larrosa  ---
Created attachment 101739
  --> https://bugs.kde.org/attachment.cgi?id=101739=edit
Logs from akonadi/kmail, showing the problem

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Akonadi] [Bug 371570] New: Duplicate entry in CollectionTable when creating database in a new installation

2016-10-24 Thread Antonio Larrosa via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=371570

Bug ID: 371570
   Summary: Duplicate entry in CollectionTable when creating
database in a new installation
   Product: Akonadi
   Version: 5.3.0
  Platform: Other
OS: Linux
Status: UNCONFIRMED
  Severity: crash
  Priority: NOR
 Component: server
  Assignee: kdepim-bugs@kde.org
  Reporter: larr...@kde.org

On a clean openSUSE Leap 42.2 RC1 system (with kmail 5.3.0 and akonadi-server
16.08.2), I run kmail for the first time. It shows a "Starting Akonadi server"
message for some seconds, then a dialog appears to "Provide personal data"
(full name, email and password), and practically at the same time I get an
error box from kmail that says:
"The Email program encountered a fatal error and will terminate now.
The error was:
Could not create collection inbox, resourceId: 3"

I ran kmail with full logs as dvratil suggested and got the attached output.
That gave lots of information, and the directed to the real problem:

log_akonadiserver: DATABASE ERROR:
log_akonadiserver:   Error code: 1062
log_akonadiserver:   DB error:  "Duplicate entry '4-inbox' for key
'CollectionTable_parentAndNameIndex'"
log_akonadiserver:   Error text: "Duplicate entry '4-inbox' for key
'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute statement"
log_akonadiserver:   Query: "INSERT INTO CollectionTable (remoteId,
remoteRevision, name, parentId, resourceId, enabled, syncPref, displayPref,
indexPref, cachePolicyInherit, cachePolicyCheckInterval,
cachePolicyCacheTimeout, cachePolicySyncOnDemand, cachePolicyLocalParts,
isVirtual) VALUES (:0, :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13,
:14)"
log_akonadiserver: Error during insertion into table "CollectionTable"
"Duplicate entry '4-inbox' for key 'CollectionTable_parentAndNameIndex'
QMYSQL3: Unable to execute statement"
log_akonadicore: Failed SpecialCollectionsRequestJob::slotResult "Could not
create collection inbox, resourceId: 3"
log_mailcommon: "The Email program encountered a fatal error and will terminate
now.\nThe error was:\nCould not create collection inbox, resourceId: 3"


I can reproduce the problem every time, by removing the config files for the
user and starting kmail again. Btw, note that if instead of starting kmail, I
run akonadictl start and then kmail once akonadi is started, then there's no
problem.

Reproducible: Always

-- 
You are receiving this mail because:
You are the assignee for the bug.