Bug 308801

Summary: Akonadi crashes on startup while synching gcal resources
Product: [Frameworks and Libraries] Akonadi Reporter: Jörn S. <joern-schumacher>
Component: Google ResourceAssignee: Daniel Vrátil <dvratil>
Status: RESOLVED DUPLICATE    
Severity: crash CC: kdepim-bugs
Priority: NOR    
Version: 4.9   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: gdb-session

Description Jörn S. 2012-10-22 10:54:53 UTC
Application: akonadi_googlecalendar_resource (4.9)
KDE Platform Version: 4.9.2
Qt Version: 4.8.2
Operating System: Linux 3.6.2-4.fc17.i686 i686
Distribution: "Fedora release 17 (Beefy Miracle)"

-- Information about the crash:
- What I was doing when the application crashed:

When KDE starts, I get multiple crashes. When I restart akonadi manually via akonadiclt restart, I get 

[...]
terminate called after throwing an instance of 'Akonadi::PayloadException'
  what():  Akonadi::PayloadException: No payload set
KCrash: Application 'akonadi_googlecalendar_resource' crashing...
KCrash: Attempting to start /usr/libexec/kde4/drkonqi from kdeinit
sock_file=/home/joern/.kde/socket-geras/kdeinit4__0
ProcessControl: Application '/usr/bin/akonadi_googlecalendar_resource' returned with exit code 253 (Unknown error)
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Akonadi::PayloadException'
  what():  Akonadi::PayloadException: No payload set
KCrash: Application 'akonadi_googlecalendar_resource' crashing...
KCrash: Attempting to start /usr/libexec/kde4/drkonqi from kdeinit
sock_file=/home/joern/.kde/socket-geras/kdeinit4__0
ProcessControl: Application '/usr/bin/akonadi_googlecalendar_resource' returned with exit code 253 (Unknown error)
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Akonadi::PayloadException'
  what():  Akonadi::PayloadException: No payload set
KCrash: Application 'akonadi_googlecalendar_resource' crashing...
KCrash: Attempting to start /usr/libexec/kde4/drkonqi from kdeinit
sock_file=/home/joern/.kde/socket-geras/kdeinit4__0
ProcessControl: Application '/usr/bin/akonadi_googlecalendar_resource' returned with exit code 253 (Unknown error)
"/usr/bin/akonadi_googlecalendar_resource" crashed too often and will not be restarted! 


- Custom settings of the application:

I had my Google Calendar akonadi resource configured and it worked (no crashes). I installed Zanshin as an alternative ToDo list manager and replaced the default ToDo manager in Kontact. The crashes appear since Zanshin was installed.

The crash can be reproduced every time.

-- Backtrace:
Application: Google Calendars and Tasks (akonadi_googlecalendar_resource), signal: Aborted
Using host libthread_db library "/lib/libthread_db.so.1".
[KCrash Handler]
#7  0xb7723424 in __kernel_vsyscall ()
#8  0x4582a93f in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#9  0x4582c293 in __GI_abort () at abort.c:91
#10 0x45bffa15 in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
#11 0x45bfd604 in __cxxabiv1::__terminate (handler=0x45bff8c0 <__gnu_cxx::__verbose_terminate_handler()>) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:40
#12 0x45bfd640 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:50
#13 0x45bfd946 in __cxxabiv1::__cxa_rethrow () at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:116
#14 0x45625617 in QEventLoop::exec (this=0xbff33148, flags=...) at kernel/qeventloop.cpp:218
#15 0x4562a8cb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#16 0x46e99d35 in QApplication::exec () at kernel/qapplication.cpp:3812
#17 0x493e4c62 in Akonadi::ResourceBase::init (r=0x99b18d8) at /usr/src/debug/kdepimlibs-4.9.2/akonadi/resourcebase.cpp:451
#18 0x0805bd0d in Akonadi::ResourceBase::init<CalendarResource> (argc=argc@entry=3, argv=argv@entry=0xbff332c4) at /usr/include/kde4/akonadi/resourcebase.h:188
#19 0x080528dc in main (argc=3, argv=0xbff332c4) at /usr/src/debug/kdepim-runtime-4.9.2/resources/google/calendar/calendarresource.cpp:659

Possible duplicates by query: bug 308152, bug 307993, bug 306773, bug 306218, bug 305946.

Reported using DrKonqi
Comment 1 Daniel Vrátil 2012-10-22 11:25:53 UTC
Could you please attach gdb to the akonadi_googlecalendar_resource process and try to obtain a backtrace from where the exception has been thrown ("catch throw")? See [0] for more details on how to do this.

I'm aware of the crash (there are more duplicate reports), but I was unable to get the exact location in code from which the exception comes. 

[0]  http://techbase.kde.org/Projects/PIM/Akonadi/Development_Tools#Attaching_gdb_at_startup
Comment 2 Jörn S. 2012-10-22 12:15:50 UTC
Created attachment 74721 [details]
gdb-session
Comment 3 Jörn S. 2012-10-22 12:18:44 UTC
I attached the gdb output to this bugreport. If you have follow-up questions: the session is still open. 

I also noticed this in the akonadi output, can't say if it is related:
Error during executing query "INSERT INTO CollectionTable (remoteId, remoteRevision, name, parentId, resourceId, cachePolicyInherit) VALUES (:0, :1, :2, :3, :4, :5)" :  "Duplicate entry '26-Master Thess' for key 'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute statement"
Comment 4 Daniel Vrátil 2012-10-22 12:41:58 UTC
Thank you very much for the GDB output. Regarding the error - if "Master Thess" is a collection in Google Calendar hen it might be related, otherwise it's related to respective resource to which the collection belongs.
Comment 5 Jörn S. 2012-10-22 12:49:07 UTC
"Master Thesis" (I do not know why it is misspelled in the Akonadi output) is a todo item which I created in the Google Calendar resource with several sub-todo-items. Hope this helps!
Comment 6 Daniel Vrátil 2012-10-22 12:59:19 UTC
The output indicates that the problem is when creating a new collection. Anyway, if you are sure there's no other "Master Thess...." collection, please open a new bug for this issue.

I'll close this bug as a duplicate of the original report of this crash, but rest assured I wouldn't solve it without your backtrace ;)

*** This bug has been marked as a duplicate of bug 305584 ***