[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#916364: kdepim-runtime: akonadi_akonotes_resource crashes



Hello Vincas Dargis,
I just wanted to find out where in thread 4 this call to qTerminate
originates, without having deeper knowledge of akonadi ...

Unfortunately it looks like this backtrace just shows where we are in
the exception handler - effectively hiding where the exception really
happened in the first place.

Maybe the best chance would be to inspect the file ~/.xsession-errors,
if there is an obvious akonadi error ...

Kind regards,
Bernhard


(gdb) list qthread_unix.cpp:312,390
312
313     void *QThreadPrivate::start(void *arg)
314     {
...
320     #ifndef QT_NO_EXCEPTIONS
321         try
322     #endif
323         {
...
368         }
369     #ifndef QT_NO_EXCEPTIONS
370     #ifdef __GLIBCXX__
371         // POSIX thread cancellation under glibc is implemented by throwing an exception
372         // of this type. Do what libstdc++ is doing and handle it specially in order not to
373         // abort the application if user's code calls a cancellation function.
374         catch (const abi::__forced_unwind &) {
375             throw;
376         }
377     #endif // __GLIBCXX__
378         catch (...) {
379             qTerminate();
380         }

Thread 4 (Thread 0x7f663cfa6700 (LWP 3085)):
[KCrash Handler]
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#7  0x00007f664adb5535 in __GI_abort () at abort.c:79
#8  0x00007f664affa943 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007f664b000896 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007f664b0008d1 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#11 0x00007f664b173db3 in qTerminate() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007f664b176176 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f6649b03fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#14 0x00007f664ae8c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95


###############


# buster amd64 qemu VM



apt update
apt dist-upgrade


apt install dpkg-dev devscripts systemd-coredump xserver-xorg sddm dbus-x11 kde-plasma-desktop kdepim-runtime kalarm kdepim-runtime-dbgsym libqt5core5a-dbgsym pslist





mkdir libqt5core5a/orig -p
cd    libqt5core5a/orig
apt source libqt5core5a
cd ../..





systemctl start sddm

# login

# start kalarm




mkdir /home/benutzer/.local/share/akonadi/db_data/

#Otherwise:
#    org.kde.pim.akonadiserver: database server stopped unexpectedly
#    org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
#    org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
#    org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/benutzer/.local/share/akonadi/mysql.conf", "--datadir=/home/benutzer/.local/share/akonadi/db_data/", "--socket=/tmp/akonadi-benutzer.Tdwoum/mysql.socket", "--pid-file=/tmp/akonadi-benutzer.Tdwoum/mysql.pid")
#    org.kde.pim.akonadiserver: stdout: ""
#    org.kde.pim.akonadiserver: stderr: "2018-12-17 17:50:05 140020311248192 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-3) starting as process 4023 ...\n2018-12-17 17:50:05 140020311248192 [Warning] Can't create test file /home/benutzer/.local/share/akonadi/db_data/debian.lower-test\n\x07/usr/sbin/mysqld: Can't change dir to '/home/benutzer/.local/share/akonadi/db_data/' (Errcode: 2 \"No such file or directory\")\n2018-12-17 17:50:05 140020311248192 [ERROR] Aborting\n\n"
#    org.kde.pim.akonadiserver: exit code: 1
#    org.kde.pim.akonadiserver: process error: "Unknown error"
#    org.kde.pim.akonadiserver: Failed to remove runtime connection config file
#    org.kde.pim.akonadicontrol: Application 'akonadiserver' exited normally...




root@debian:~# gdb -q --pid $(pidof akonadi_akonotes_resource)
Attaching to process 4177
[New LWP 4178]
[New LWP 4179]
[New LWP 4180]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fab578afbd9 in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) generate-core-file 
warning: target file /proc/4177/cmdline contained unexpected null characters
Saved corefile core.4177
(gdb) detach
Detaching from program: /usr/bin/akonadi_akonotes_resource, process 4177
[Inferior 1 (process 4177) detached]
(gdb) q




root@debian:~# gdb -q /usr/bin/akonadi_akonotes_resource --core core.4177 -ex "set pagination off" -ex "info share" -ex quit | grep /lib/x86_64-linux-gnu/libQt5Core.so.5

warning: core file may not match specified executable file.
0x00007fab57ba1290  0x00007fab57e42252  Yes (*)     /usr/lib/x86_64-linux-gnu/libQt5Core.so.5





root@debian:~# gdb -q /usr/bin/akonadi_akonotes_resource --core core.4177 -ex "set pagination off" -ex "disassemble 0x00007fab57ba1290,0x00007fab57e42252" -ex quit | grep 0x.............176 -B1

warning: core file may not match specified executable file.
...
   0x00007fab57ba4171 <QThreadPrivate::start(void*)+-260575>:   callq  0x7fab57ba1dad <qTerminate()>
   0x00007fab57ba4176 <QThreadPrivate::start(void*)+-260570>:   mov    %rax,%rbp
...






root@debian:~# gdb -q /usr/bin/akonadi_akonotes_resource --core core.4177 -ex "set pagination off" -ex "directory /home/benutzer/libqt5core5a/orig/qtbase-opensource-src-5.11.2+dfsg/src/corelib"
Reading symbols from /usr/bin/akonadi_akonotes_resource...Reading symbols from /usr/lib/debug/.build-id/9c/4b65630d5b606ed26b60812065a33162e31006.debug...done.
done.

warning: core file may not match specified executable file.
[New LWP 4177]
[New LWP 4178]
[New LWP 4179]
[New LWP 4180]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/akonadi_akonotes_resource'.
#0  0x00007fab578afbd9 in poll () from /lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7fab52ab4800 (LWP 4177))]
Source directories searched: /home/benutzer/libqt5core5a/orig/qtbase-opensource-src-5.11.2+dfsg/src/corelib:$cdir:$cwd
(gdb) list qthread_unix.cpp:312,390
312
313     void *QThreadPrivate::start(void *arg)
314     {
315     #if !defined(Q_OS_ANDROID)
316         pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
317     #endif
318         pthread_cleanup_push(QThreadPrivate::finish, arg);
319
320     #ifndef QT_NO_EXCEPTIONS
321         try
322     #endif
323         {
324             QThread *thr = reinterpret_cast<QThread *>(arg);
325             QThreadData *data = QThreadData::get2(thr);
326
327             {
328                 QMutexLocker locker(&thr->d_func()->mutex);
329
330                 // do we need to reset the thread priority?
331                 if (int(thr->d_func()->priority) & ThreadPriorityResetFlag) {
332                     thr->d_func()->setPriority(QThread::Priority(thr->d_func()->priority & ~ThreadPriorityResetFlag));
333                 }
334
335                 data->threadId.store(to_HANDLE(pthread_self()));
336                 set_thread_data(data);
337
338                 data->ref();
339                 data->quitNow = thr->d_func()->exited;
340             }
341
342             QAbstractEventDispatcher *eventDispatcher = data->eventDispatcher.load();
343             if (!eventDispatcher) {
344                 eventDispatcher = createEventDispatcher(data);
345                 data->eventDispatcher.storeRelease(eventDispatcher);
346             }
347
348             eventDispatcher->startingUp();
349
350     #if (defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_QNX))
351             {
352                 // Sets the name of the current thread. We can only do this
353                 // when the thread is starting, as we don't have a cross
354                 // platform way of setting the name of an arbitrary thread.
355                 if (Q_LIKELY(thr->objectName().isEmpty()))
356                     setCurrentThreadName(thr->metaObject()->className());
357                 else
358                     setCurrentThreadName(thr->objectName().toLocal8Bit());
359             }
360     #endif
361
362             emit thr->started(QThread::QPrivateSignal());
363     #if !defined(Q_OS_ANDROID)
364             pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
365             pthread_testcancel();
366     #endif
367             thr->run();
368         }
369     #ifndef QT_NO_EXCEPTIONS
370     #ifdef __GLIBCXX__
371         // POSIX thread cancellation under glibc is implemented by throwing an exception
372         // of this type. Do what libstdc++ is doing and handle it specially in order not to
373         // abort the application if user's code calls a cancellation function.
374         catch (const abi::__forced_unwind &) {
375             throw;
376         }
377     #endif // __GLIBCXX__
378         catch (...) {
379             qTerminate();
380         }
381     #endif // QT_NO_EXCEPTIONS
382
383         // This pop runs finish() below. It's outside the try/catch (and has its
384         // own try/catch) to prevent finish() to be run in case an exception is
385         // thrown.
386         pthread_cleanup_pop(1);
387
388         return 0;
389     }
390

Reply to: