Bug 421477 - Segmentation Fault on exit
Summary: Segmentation Fault on exit
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.3.0-beta1
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-13 18:14 UTC by grum999
Modified: 2020-07-01 07:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description grum999 2020-05-13 18:14:25 UTC
SUMMARY

I've built Krita 4.3.0 by myself (git 88342ec)
When I close krita, a segmentation fault occurs




STEPS TO REPRODUCE
1. Launch Krita
2. Exit krita (Menu FILE > QUIT )

OBSERVED RESULT
Error message:

corrupted size vs. prev_size while consolidating

Thread 1 "krita" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
(gdb) thread apply all bt

Thread 12 (Thread 0x7fffc5c31700 (LWP 14304)):
#0  0x00007ffff18a2819 in __GI___poll (fds=0x7fffbc0049b0, nfds=2, timeout=135117) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff06cd136 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff06cd25c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff1f53727 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff1f0115b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff1d50e76 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff1d5aa67 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ffff126efa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007ffff18ad4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fffeb770140 (LWP 14258)):
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff17d6535 in __GI_abort () at abort.c:79
#2  0x00007ffff182d508 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff193828d "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff1833c1a in malloc_printerr (str=str@entry=0x7ffff193a068 "corrupted size vs. prev_size while consolidating") at malloc.c:5341
#4  0x00007ffff1835896 in _int_free (av=0x7ffff196fc40 <main_arena>, p=0x555562c13430, have_lock=<optimized out>) at malloc.c:4324
#5  0x00007ffff17ee2b7 in __cxa_finalize (d=0x7ffff7cc9300) at cxa_finalize.c:83
#6  0x00007ffff6bc65f3 in __do_global_dtors_aux () from /home/grum/Dev/krita_master/install/lib/x86_64-linux-gnu/libkritaui.so.19
#7  0x00007fffffffddf0 in ?? ()
#8  0x00007ffff7fe46f6 in _dl_fini () at dl-fini.c:138
Backtrace stopped: frame did not save the PC



(gdb) n
Single stepping until exit from function _ZN6KCrash19defaultCrashHandlerEi,
which has no line number information.
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = krita path = /home/grum/Dev/krita_master/install/bin pid = 14258
KCrash: Arguments: /home/grum/Dev/krita_master/install/bin/krita 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__2

Thread 1 "krita" received signal SIGSTOP, Stopped (signal).
0x00007ffff187a720 in __GI___nanosleep (requested_time=0x7fffffffc5e0, remaining=0x7fffffffc5e0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
28	../sysdeps/unix/sysv/linux/nanosleep.c: Aucun fichier ou dossier de ce type.
(gdb) thread apply all bt

Thread 12 (Thread 0x7fffc5c31700 (LWP 14304)):
#0  0x00007ffff18a2819 in __GI___poll (fds=0x7fffbc0049b0, nfds=2, timeout=125415) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff06cd136 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff06cd25c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff1f53727 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff1f0115b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff1d50e76 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff1d5aa67 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ffff126efa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007ffff18ad4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fffeb770140 (LWP 14258)):
#0  0x00007ffff187a720 in __GI___nanosleep (requested_time=0x7fffffffc5e0, remaining=0x7fffffffc5e0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x00007ffff187a62a in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#2  0x00007ffff6013eea in ?? () from /usr/lib/x86_64-linux-gnu/libKF5Crash.so.5
#3  0x00007ffff601468e in ?? () from /usr/lib/x86_64-linux-gnu/libKF5Crash.so.5
#4  0x00007ffff6014be7 in KCrash::defaultCrashHandler(int) () from /usr/lib/x86_64-linux-gnu/libKF5Crash.so.5
#5  <signal handler called>
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#7  0x00007ffff17d6535 in __GI_abort () at abort.c:79
#8  0x00007ffff182d508 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff193828d "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#9  0x00007ffff1833c1a in malloc_printerr (str=str@entry=0x7ffff193a068 "corrupted size vs. prev_size while consolidating") at malloc.c:5341
#10 0x00007ffff1835896 in _int_free (av=0x7ffff196fc40 <main_arena>, p=0x555562c13430, have_lock=<optimized out>) at malloc.c:4324
#11 0x00007ffff17ee2b7 in __cxa_finalize (d=0x7ffff7cc9300) at cxa_finalize.c:83
#12 0x00007ffff6bc65f3 in __do_global_dtors_aux () from /home/grum/Dev/krita_master/install/lib/x86_64-linux-gnu/libkritaui.so.19
#13 0x00007fffffffddf0 in ?? ()
#14 0x00007ffff7fe46f6 in _dl_fini () at dl-fini.c:138
Backtrace stopped: frame did not save the PC




EXPECTED RESULT
Krita doesn't crash on exit 


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.14.5
KDE Frameworks Version: 5.54.0

Krita
 Version: 4.3.0-beta1 (git 88342ec)
 Languages: en_GB, en, fr, fr_FR, fr
 Hidpi: true

Qt
  Version (compiled): 5.11.3
  Version (loaded): 5.11.3

OS Information
  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-9-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10
  Desktop: KDE


ADDITIONAL INFORMATION
Seems similar to https://bugs.kde.org/show_bug.cgi?id=392073 

Note that when using Appimage (krita-4.3.0-beta1-5a643ab-x86_64.appimage) the problem doesn't occurs
Comment 1 Halla Rempt 2020-05-14 07:44:01 UTC
Which version of Qt are you building against?
Comment 2 grum999 2020-05-14 17:56:25 UTC
(In reply to Boudewijn Rempt from comment #1)
> Which version of Qt are you building against?

I'm not sure to understand the question...

Qt 5.11.3 is installed on:
- building server
- testing server
(but the crash occurs on both servers)

Same information is retrieved on both machine from:
- Krita menu: "help > show system information for bug report" 
- Command line: "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake --version"
Comment 3 Bug Janitor Service 2020-05-15 04:33:19 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 4 Halla Rempt 2020-05-20 11:36:53 UTC
Sorry, I missed that. Guess I need new glasses... I don't see a crash myself, but I have a different version of Qt and am working on a different distribution. 

I don't see anything in the backtraces that suggests a bug in Krita. Are you using special compiler flags to add ASAN or something like that?

Does a clean build/clean install from the krita/4.3 branch fix the issue for you?
Comment 5 Frans Slothouber 2020-07-01 07:58:24 UTC
I have had the 'corrupted size vs. prev_size' crash too. 

This was solved by completely removing all files from install/,
removing  CMakeCache.txt from build/, and then doing a cmake ...  and make install.
Comment 6 Halla Rempt 2020-07-01 07:59:23 UTC
Ah, then it is a build error.