Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 824286 - media-gfx/krita-4.4.8-r1 Stack Smashing
Summary: media-gfx/krita-4.4.8-r1 Stack Smashing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL: https://bugreports.qt.io/browse/QTBUG...
Whiteboard: fixed in dev-qt/qtcore-5.15.2-r12
Keywords: UPSTREAM
Depends on: 829923
Blocks:
  Show dependency tree
 
Reported: 2021-11-17 22:32 UTC by thezombiehunter
Modified: 2022-01-19 09:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Terminal Output (krita.txt,1.30 KB, text/plain)
2021-11-17 22:32 UTC, thezombiehunter
Details
Emerge info (emerge.txt,5.58 KB, text/plain)
2021-11-17 22:54 UTC, thezombiehunter
Details
GDB Stacktrace (gdb.txt,13.92 KB, text/plain)
2021-11-18 01:30 UTC, thezombiehunter
Details
Emerge krita info (krita.txt,6.58 KB, text/plain)
2021-11-18 01:37 UTC, thezombiehunter
Details
GDB #2 (krita2.txt,313 bytes, text/plain)
2021-11-18 03:10 UTC, thezombiehunter
Details
bt (bt.txt,4.01 KB, text/plain)
2021-11-18 03:19 UTC, thezombiehunter
Details
bt-full (bt-full.txt,2.74 KB, text/plain)
2021-11-18 03:19 UTC, thezombiehunter
Details
0001-Avoid-mixing-atomic-futex-changes-and-QAtomic.patch (0001-Avoid-mixing-atomic-futex-changes-and-QAtomic.patch,4.36 KB, patch)
2021-11-19 15:33 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description thezombiehunter 2021-11-17 22:32:50 UTC
Created attachment 752074 [details]
Terminal Output

Krita will crash at random times (can be within seconds of launching to 10+ minutes) with stack smashing detected.

This does not happen with the flatpack version.

Not sure what's causing the problem. I tried using krita a few months back and had the same issue.

Hardware:
3900x
128GB RAM

Using march=native.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-17 22:39:07 UTC
emerge --info please and try get a stack trace? https://wiki.gentoo.org/wiki/Debugging
Comment 2 thezombiehunter 2021-11-17 22:54:31 UTC
Created attachment 752078 [details]
Emerge info
Comment 3 thezombiehunter 2021-11-17 22:54:59 UTC
I'll try getting a stack trace for you.
Comment 4 thezombiehunter 2021-11-18 01:30:15 UTC
Created attachment 752110 [details]
GDB Stacktrace

Here you go!
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-18 01:33:03 UTC
(In reply to thezombiehunter from comment #4)
> Created attachment 752110 [details]
> GDB Stacktrace
> 
> Here you go!

Thanks!

Can you build glibc with debugging symbols too (and see if 'bt' and maybe even 'bt full' gives more information once that's done)?

Are you doing anything particular when it crashes?

Could you also share emerge --info krita so I can see which USE flags to try with?
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-18 01:36:39 UTC
(just a warning, depending on how this goes, we might have to send it upstream)
Comment 7 thezombiehunter 2021-11-18 01:37:19 UTC
Created attachment 752114 [details]
Emerge krita info

So the crashes are random but quite a few have been from opening the color wheel / brush selector (the circle thing with like 10 brushes on all sides) and pressing one of the two colors on the top left.
Comment 8 thezombiehunter 2021-11-18 03:10:54 UTC
Created attachment 752118 [details]
GDB #2

Yeah, I can force it to crash by using that wheel.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-18 03:13:53 UTC
(In reply to thezombiehunter from comment #8)
> Created attachment 752118 [details]
> GDB #2
> 
> Yeah, I can force it to crash by using that wheel.

You can't get a full backtrace by typing 'bt' or 'bt full' (ideally give both) once you're at that prompt?
Comment 10 thezombiehunter 2021-11-18 03:19:14 UTC
Created attachment 752122 [details]
bt
Comment 11 thezombiehunter 2021-11-18 03:19:30 UTC
Created attachment 752126 [details]
bt-full
Comment 12 thezombiehunter 2021-11-19 14:21:07 UTC
It looks like this was fixed upstream according to kritas support team.

https://bugreports.qt.io/browse/QTBUG-92188

Can we get these patches included with qt5 on Gentoo?
Comment 13 Andreas Sturmlechner gentoo-dev 2021-11-19 15:07:45 UTC
krita's support team might as well submit that patch as MR to KDE's own Qt5PatchCollection, which has not yet happened. We can then package it as a new snapshot.
Comment 14 Andreas Sturmlechner gentoo-dev 2021-11-19 15:33:22 UTC
Created attachment 752942 [details, diff]
0001-Avoid-mixing-atomic-futex-changes-and-QAtomic.patch

Please test the backported fix.
Comment 15 thezombiehunter 2021-11-19 15:51:37 UTC
With the patch the crashing no longer occurs on the color wheel/pallet. I need to test it more to be sure, but seems to fix it.
Comment 16 Russell Dwiggins 2021-11-19 16:44:58 UTC
Just for anyone following, the patch is applied to dev-qt/qtcore
Comment 17 thezombiehunter 2021-11-20 16:58:25 UTC
Yes, that patch fixes the crashing.
Comment 18 Larry the Git Cow gentoo-dev 2021-12-16 13:37:28 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11cc810ba55dfd4db304cc59cefa8b53365337f2

commit 11cc810ba55dfd4db304cc59cefa8b53365337f2
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-12-16 13:32:37 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-12-16 13:33:26 +0000

    dev-qt/qtcore: Fix stack smashing crash
    
    Test it in ~arch while upstream are making up their minds.
    
    See also: https://invent.kde.org/qt/qt/qtbase/-/merge_requests/81
    KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445719
    Bug: https://bugs.gentoo.org/824286
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../files/qtcore-5.15.2-fix-stack-smashing.patch   | 105 ++++++++++++++++++++
 dev-qt/qtcore/qtcore-5.15.2-r12.ebuild             | 106 +++++++++++++++++++++
 2 files changed, 211 insertions(+)
Comment 19 Andreas Sturmlechner gentoo-dev 2022-01-19 09:54:38 UTC
dev-qt/qtcore-5.15.2-r14 was stabilised on amd64.