Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704392 - dev-qt/qt*-5.13.2 causes applications segfault (error 14) after update
Summary: dev-qt/qt*-5.13.2 causes applications segfault (error 14) after update
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
: 718764 (view as bug list)
Depends on:
Reported: 2019-12-31 17:17 UTC by Matthew Turnbull
Modified: 2020-10-27 09:19 UTC (History)
3 users (show)

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

Debug information (gdb backtraces, emerge --info, package information) (qt_debug.txt,18.17 KB, text/plain)
2019-12-31 17:18 UTC, Matthew Turnbull

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Turnbull 2019-12-31 17:17:09 UTC
After updating to qt 5.13.2, all of my qt based applications are now segfaulting immediately after launch. Downgrading back to qt 5.12.5 fixes the problem.

[33728.522284] kdiff3[1575]: segfault at 0 ip 0000000000000000 sp 00007ffd5899e1e8 error 14 in kdiff3[561d78d5e000+30000]
[33728.522288] Code: Bad RIP value.
[33867.037107] wireshark[1940]: segfault at 0 ip 0000000000000000 sp 00007ffc93b3bd38 error 14 in wireshark[561b0f621000+a5000]
[33867.037112] Code: Bad RIP value.
[33930.700740] kdiff3[2239]: segfault at 0 ip 0000000000000000 sp 00007ffc1bf57de8 error 14 in kdiff3[558b10a23000+30000]
[33930.700745] Code: Bad RIP value.
[33934.307967] qdirstat[2247]: segfault at 0 ip 0000000000000000 sp 00007fff59358278 error 14 in qdirstat[56249dee3000+2b000]
[33934.307972] Code: Bad RIP value.

Because this cropped up after a 17.1 profile migration, I did an "emerge -e @world" out of an abundance of caution, but that didn't help.

This is only happening on one of my two Gentoo installs.
* My installation running natively on hardware (Thinkpad p50) is fine.
* The affected install is running virtualized in virtualBox 6.0.14 on Windows 10.

Reproducible: Always
Comment 1 Matthew Turnbull 2019-12-31 17:18:43 UTC
Created attachment 602096 [details]
Debug information (gdb backtraces, emerge --info, package information)
Comment 2 Xavier 2020-01-15 12:37:51 UTC
Not sure how could I help, but I am having the same issue. 
I am on a different (source-based) distribution, though, which may suggest an upstream bug.
Comment 3 Chiitoo gentoo-dev 2020-01-15 20:17:36 UTC
There have indeed been some reports with issues like this when using VirtualBox, though the version numbers don't quite match...

See for example:
Comment 4 Cyb3r-Assassin 2020-05-01 02:11:30 UTC
QT based applications experienced the same failures after updating inside a virtual container (VirtualBox). A symptom was Plasma experienced a black screen with a cursor after launched from SDDM login or called directly from inside a startx environment, QT applications failed inside other DE's such as MATE.

The fix was GCC flag adjustment to Portage in make.conf and rebuilding all of the QT and KDE/Plasma packages. Removing the -MARCH="NATIVE" flag in make.conf solved this issue, it would seem CPU features are being compiled in which aren't supported.

This was tested on an i7 6700HQ
Comment 5 Matthew Turnbull 2020-05-02 04:39:17 UTC
Good catch. I can confirm that removing "-march=native" fixes Qt applications for me.

I took it a step further and found that qtgui is actually the only package with this problem. All other dev-qt/*, kde-frameworks/*, and kde-plasma/* packages work perfectly fine with "-march=native" - at least for what I have installed for kdiff3/keepassxc/qdirstat/wireshark.

And even a step further, qtgui also appears to work with "-march=native -mno-avx2". I noticed qtgui has a patch for "-march=native" and AVX2 in Bug 672946, so this might be rearing its head again in a different way.

Verified on i7-6820HQ, which does have AVX2 support. So I suppose that means there's a few options:

* GCC is doing something wrong - but I have everything in world built with "-march=native" so that's unlikely.

* VirtualBox has been broken all along, but Qt 5.13 introduced new AVX2 code triggering this bug.

* Qt has a bug in its AVX2 code, or is incorrectly handling CPU feature detection.
Comment 6 Andreas Sturmlechner gentoo-dev 2020-09-06 18:08:29 UTC
*** Bug 718764 has been marked as a duplicate of this bug. ***
Comment 7 Leonid Kopylov 2020-10-27 09:19:13 UTC
I can confirm, that i have exactly the same issue with dev-qt/qtgui-5.15.1-r1.
The whole system installed with -match=native, and re-installing qtgui with "-march=native -mno-avx2" - makes KDE to work again!