[Akonadi] [Bug 337396] New: Caldav (owncloud) hangs on sync caused by db issues

Fabian maystar at web.de
Sat Jul 12 15:33:50 BST 2014


https://bugs.kde.org/show_bug.cgi?id=337396

            Bug ID: 337396
           Summary: Caldav (owncloud) hangs on sync caused by db issues
           Product: Akonadi
           Version: 4.13
          Platform: Kubuntu Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: NOR
         Component: DAV Resource
          Assignee: kdepim-bugs at kde.org
          Reporter: maystar at web.de

Due to a downtime of my owncloud server I recognized the problems described at
bug 335090 with my caldav synchronization. Because I haven't added so much
events locally I just delete the akonadi ressource and added it again. This
solved any problem in the past. But not now. 
In the terminal, which I use for a akonadictl restart, I see this suspicious
messages:

Executing search "searchUpdate-1405123038" 
searchUpdateResultsAvailable 31745 47 results 
Got 47 results, out of which 24 are already in the collection 
DATABASE ERROR:
Error code: 1452
DB error:  "Cannot add or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
Error text: "Cannot add or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
execute statement"
Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id)
VALUES (:0, :1)"
Error during adding a record to table "CollectionPimItemRelation" "Cannot add
or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
execute statement" 
DATABASE ERROR:
Error code: 1452
DB error:  "Cannot add or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
Error text: "Cannot add or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
execute statement"
Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id)
VALUES (:0, :1)"
Error during adding a record to table "CollectionPimItemRelation" "Cannot add
or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
execute statement" 
DATABASE ERROR:
Error code: 1452
DB error:  "Cannot add or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
Error text: "Cannot add or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
execute statement"
Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id)
VALUES (:0, :1)"
Error during adding a record to table "CollectionPimItemRelation" "Cannot add
or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
execute statement" 
DATABASE ERROR:
Error code: 1452
DB error:  "Cannot add or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
Error text: "Cannot add or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
execute statement"
Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id)
VALUES (:0, :1)"
Error during adding a record to table "CollectionPimItemRelation" "Cannot add
or update a child row: a foreign key constraint fails
(`akonadi`.`collectionpimitemrelation`, CONSTRAINT
`collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
`pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
execute statement" 
Added 23 
Search done "searchUpdate-1405123038" (without remote search) 
Search update finished 
All results: 47 
Removed results: 0 
Executing search "searchUpdate-1405123038" 
json_parser - syntax error found,  forcing abort, Line 1 Column 0 
akonadiserver(32447) SearchPlugin::search: invalid query  "select distinct ?r
?reqProp1 where { { ?r
<http://akonadi-project.org/ontologies/aneo#akonadiItemId> ?reqProp1 . ?r
<http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#isRead>
"false"^^<http://www.w3.org/2001/XMLSchema#boolean> . ?r a
<http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email> . } .
FILTER(REGEX(STR(?r), '^nepomuk:/res')) . }" 
searchUpdateResultsAvailable 31744 0 results 
Got 0 results, out of which 0 are already in the collection 
Added 0 
Search done "searchUpdate-1405123038" (without remote search) 
Search update finished 
All results: 0 

In akonadiconsole I see the sync state of one of my calenders is always at
100%, but it never completes. After a while akonadiconsole also hangs, but this
could be a different problem. Doing a akonadictl fsck doesnt solve the problem,
which appears on three different machines (2 Kubuntu, 1 opensuse, all KDE
4.13). 
In korganizer no new events from the server appear and none are uploaded ,
while there is no visible error message. My android devices can sync the
calenders.

Even if there is a invalid entry in my calender it is desirable that the sync
is more robust, so I can delete the entry, or at least give a message to the
UI.

Reproducible: Always

Steps to Reproduce:
Add event to calender in korganizer or in any another device
Actual Results:  
Events are not synchronized with akonadi

Expected Results:  
Synchronized events and/or error message

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



More information about the Kdepim-bugs mailing list