Bug 382782 - Crash on closing Krita (Reproducible in Arch linux and probably system with new packages)
Summary: Crash on closing Krita (Reproducible in Arch linux and probably system with n...
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-27 07:37 UTC by Raghavendra kamath
Modified: 2017-08-08 13:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2017-07-27 07:37:03 UTC
I am have built Krita on arch linux for testing. I am encountering a crash on each exit. This happens with only master branch and not with 3.2 branch. Quiralta was also able to reproduce this problem. This may be due to some newer library in arch linux, but it only happens in master.

I have built krita in opensuse leap 42.2 but it can't be reproduced there.

following is the backtrace from gdb (I don't know how useful it is).

GNU gdb (GDB) 8.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/raghu/kf5/inst/bin/krita...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/raghu/kf5/inst/bin/krita 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe16c8700 (LWP 4335)]
[New Thread 0x7fffd4e04700 (LWP 4336)]
[New Thread 0x7fffc55fd700 (LWP 4338)]
[New Thread 0x7fffc4dfc700 (LWP 4339)]
[New Thread 0x7fffbffff700 (LWP 4340)]
[New Thread 0x7fffbf7fe700 (LWP 4341)]
[New Thread 0x7fffbeffd700 (LWP 4342)]
[New Thread 0x7fffbe7fc700 (LWP 4343)]
[New Thread 0x7fffbdffb700 (LWP 4344)]
[New Thread 0x7fffbd7fa700 (LWP 4345)]
[New Thread 0x7fff9888e700 (LWP 4346)]
[New Thread 0x7fff9808d700 (LWP 4347)]
[Thread 0x7fff9888e700 (LWP 4346) exited]
/home/raghu/kf5/inst/share/krita/pykrita/krita added to PYTHONPATH
[New Thread 0x7fff9888e700 (LWP 4348)]
[New Thread 0x7fff6a653700 (LWP 4349)]
[New Thread 0x7fff69e12700 (LWP 4350)]
[Thread 0x7fff69e12700 (LWP 4350) exited]
[Thread 0x7fff6a653700 (LWP 4349) exited]
[Thread 0x7fffc4dfc700 (LWP 4339) exited]
[Thread 0x7fffc55fd700 (LWP 4338) exited]
[Thread 0x7fffbf7fe700 (LWP 4341) exited]
[Thread 0x7fffbffff700 (LWP 4340) exited]
[Thread 0x7fffbeffd700 (LWP 4342) exited]
[Thread 0x7fffbe7fc700 (LWP 4343) exited]
[Thread 0x7fffbdffb700 (LWP 4344) exited]
[Thread 0x7fffbd7fa700 (LWP 4345) exited]
[Thread 0x7fffe16c8700 (LWP 4335) exited]
GLib (gthread-posix.c): Unexpected error from C library during 'pthread_setspecific': Invalid argument.  Aborting.

Thread 13 "KisTileDataSwap" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff9808d700 (LWP 4347)]
0x00007fffec5d78c0 in raise () from /usr/lib/libc.so.6
(gdb) thread apply all bt full

Thread 14 (Thread 0x7fff9888e700 (LWP 4348)):
#0  0x00007fffeb47e1ad in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fffecf28ccc in __gthread_cond_wait (__mutex=<optimized out>, __cond=<optimized out>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:864
        __e = <optimized out>
#2  0x00007fffecf28ccc in std::condition_variable::wait(std::unique_lock<std::mutex>&) (this=<optimized out>, __lock=...) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/condition_variable.cc:53
        __e = <optimized out>
#3  0x00007fff875113f7 in  () at /usr/lib/libQt5WebKit.so.5
#4  0x00007fff87511539 in  () at /usr/lib/libQt5WebKit.so.5
#5  0x00007fffecf2f00f in std::execute_native_thread_routine(void*) (__p=0x5555679c32d0) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:83
        __t = std::unique_ptr<std::thread::_State> containing 0x5555679c32d0
#6  0x00007fffeb478049 in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007fffec691f0f in clone () at /usr/lib/libc.so.6

Thread 13 (Thread 0x7fff9808d700 (LWP 4347)):
#0  0x00007fffec5d78c0 in raise () at /usr/lib/libc.so.6
#1  0x00007fffec5d8f72 in abort () at /usr/lib/libc.so.6
#2  0x00007fffe8403131 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007fffe84036ba in g_private_set () at /usr/lib/libglib-2.0.so.0
#4  0x00007fffe83dc62d in g_slice_free_chain_with_offset () at /usr/lib/libglib-2.0.so.0
#5  0x00007fffe83bb910 in  () at /usr/lib/libglib-2.0.so.0
#6  0x00007fffed4e558b in QEventDispatcherGlib::~QEventDispatcherGlib() () at /usr/lib/libQt5Core.so.5
#7  0x00007fffed4e57aa in QEventDispatcherGlib::~QEventDispatcherGlib() () at /usr/lib/libQt5Core.so.5
#8  0x00007fffed2a62c7 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007fffed2a7163 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007fffeb478049 in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007fffec691f0f in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7fffd4e04700 (LWP 4336)):
#0  0x00007fffec687e9d in poll () at /usr/lib/libc.so.6
#1  0x00007fffe83bec09 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fffe83bed1c in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007fffed4e5061 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007fffed488ffb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007fffed2a240e in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007ffff0c7e396 in  () at /usr/lib/libQt5DBus.so.5
#7  0x00007fffed2a715b in  () at /usr/lib/libQt5Core.so.5
#8  0x00007fffeb478049 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007fffec691f0f in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff7f07cc0 (LWP 4331)):
#0  0x00007fffeb47e4ed in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fffed2a84a1 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007fffed2a6d27 in QThread::wait(unsigned long) () at /usr/lib/libQt5Core.so.5
#3  0x00007ffff63472f8 in KisTileDataSwapper::terminateSwapper() () at /home/raghu/kf5/inst/lib64/libkritaimage.so.16
#4  0x00007ffff6328679 in KisTileDataStore::~KisTileDataStore() () at /home/raghu/kf5/inst/lib64/libkritaimage.so.16
#5  0x00007ffff6328a79 in (anonymous namespace)::Q_QGS_s_instance::innerFunction()::Holder::~Holder() () at /home/raghu/kf5/inst/lib64/libkritaimage.so.16
#6  0x00007fffec5da538 in __run_exit_handlers () at /usr/lib/libc.so.6
#7  0x00007fffec5da58a in  () at /usr/lib/libc.so.6
#8  0x00007fffec5c44d1 in __libc_start_main () at /usr/lib/libc.so.6
#9  0x000055555566b0aa in _start ()
(gdb)
Comment 1 Halla Rempt 2017-07-27 08:34:16 UTC
Weirdly enough there's mention of QtWebkit in the stacktraces, which should be impossible. But that's not the thread that crashes, that's an assert in glibc:

GLib (gthread-posix.c): Unexpected error from C library during 'pthread_setspecific': Invalid argument.  Aborting.

In thread 13:

Thread 13 (Thread 0x7fff9808d700 (LWP 4347)):
#0  0x00007fffec5d78c0 in raise () at /usr/lib/libc.so.6
#1  0x00007fffec5d8f72 in abort () at /usr/lib/libc.so.6
#2  0x00007fffe8403131 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007fffe84036ba in g_private_set () at /usr/lib/libglib-2.0.so.0
#4  0x00007fffe83dc62d in g_slice_free_chain_with_offset () at /usr/lib/libglib-2.0.so.0
#5  0x00007fffe83bb910 in  () at /usr/lib/libglib-2.0.so.0
#6  0x00007fffed4e558b in QEventDispatcherGlib::~QEventDispatcherGlib() () at /usr/lib/libQt5Core.so.5
#7  0x00007fffed4e57aa in QEventDispatcherGlib::~QEventDispatcherGlib() () at /usr/lib/libQt5Core.so.5
#8  0x00007fffed2a62c7 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007fffed2a7163 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007fffeb478049 in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007fffec691f0f in clone () at /usr/lib/libc.so.6

It's going to be really hard to figure out what is causing this, because it's at the intersection of glibc and Qt, and not something inside Krita...
Comment 2 Raghavendra kamath 2017-08-08 13:09:17 UTC
This got solved automatically in the arch linux update, and cannot be reproduced anymore for both quiralta and me, so i am closing this report.