Bug 955381 - yast2 software management segfaults when started on secondary monitor
Summary: yast2 software management segfaults when started on secondary monitor
Status: RESOLVED FIXED
: 844043 938958 949908 954458 956118 957042 959711 960588 961273 962164 964283 992975 1016392 1024299 1036897 (view as bug list)
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Leap 42.1
Hardware: x86-64 openSUSE 42.1
: P5 - None : Major with 16 votes (vote)
Target Milestone: Leap 42.2 Milestone0
Assignee: E-Mail List
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 964283
  Show dependency treegraph
 
Reported: 2015-11-17 10:25 UTC by Forgotten User fbKqKvv6Lf
Modified: 2017-05-03 15:40 UTC (History)
30 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
y2signal.log from yast2 sw_single (8.98 KB, text/x-log)
2016-01-04 11:03 UTC, Vadim Krevs
Details
Yast + yast sw_single on dual-screen (tw+qt56) (2.31 MB, image/png)
2016-05-29 19:55 UTC, Bruno Friedmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User fbKqKvv6Lf 2015-11-17 10:25:39 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
Build Identifier: 

Using openSUSE Leap 42.1 with Plasma 5 fully updated using official repo. 

I have 2 screens. When I start yast2 (as root) and then start Software Managment, and I move the Software Management window to my secondary monitor it segfaults with this message:
Run command: /sbin/yast2 sw_single &
YaST got signal 11 at file /usr/share/YaST2/modules/PackagesUI.rb:312
  sender PID: 504
/sbin/yast2: line 440: 19682 Segmentation fault      $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS

If the windows happens to start on my primary monitor, or I move it there before it is fully loaded it is fine and doesn't crash.

Reproducible: Always

Steps to Reproduce:
1. Start yast2 (via CLI or GUI)
2. Start Software Management
3. Move starting window to secondary monitor
4. /sbin/yast2: line 440: 15222 Segmentation fault      $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS

OR 
1. /sbin/yast2 sw_single &
(see steps 3 + 4)



Actual Results:  
The software management window disappears without error message (unless you look at the CLI it was started from). When started from the UI no warning or error message is shown.

Expected Results:  
I expect the software management window to stay open, also on my secondary monitor.

stack traces of strace /sbin/yast2 sw_single for both cases (primary monitor, no crash) and (secondary monitor, crash) are identical.
Comment 1 Josef Reidinger 2015-11-18 12:06:45 UTC
added to our team issues queue for fix planning.
Comment 2 Josef Reidinger 2015-11-23 09:35:42 UTC
important info from dup: looks like qt bug https://bugreports.qt.io/browse/QTBUG-42985
Comment 3 Josef Reidinger 2015-11-23 09:36:36 UTC
*** Bug 954458 has been marked as a duplicate of this bug. ***
Comment 4 Josef Reidinger 2015-11-25 09:17:50 UTC
*** Bug 956118 has been marked as a duplicate of this bug. ***
Comment 5 Martin Vidner 2015-11-26 14:28:58 UTC
*** Bug 949908 has been marked as a duplicate of this bug. ***
Comment 6 Martin Vidner 2015-11-26 14:38:26 UTC
*** Bug 938958 has been marked as a duplicate of this bug. ***
Comment 7 Ladislav Slezák 2015-11-30 08:26:37 UTC
*** Bug 957042 has been marked as a duplicate of this bug. ***
Comment 8 Ancor Gonzalez Sosa 2015-12-18 14:32:00 UTC
*** Bug 959711 has been marked as a duplicate of this bug. ***
Comment 9 Max Lin 2015-12-22 11:07:24 UTC
I did some debugging for this bug, let me give a summary, well, I can reproduce this issue on KDE only, however the backtrace looks very *normal*, I had debugging coredump, but I can't see questionable point would causes this issue so far, will continue with it.

The point is, it's two issues here. Actually this report mixed up *multiscreen* issue and *dialog crashed* issue. The multiscreen issue[1] is about the window on 2nd or any others than primary one, and the window will just disappear after the screen disconnected/connected. Yes, I can reproduce it(simply using xrandr). I've 2 home project[2][3] on OBS with patches against[1] and I've confirmed the issue was fixed.

About sw_single crashes issue, see my experiment below, they are using same step, open yast2 control center on primary screen, moved to 2nd screen, executing yast2 software management,

* GNOME - sw_single worked, no crash.
* icewm - sw_single worked, no crash.
* KDE
** sw_single crashed on 2nd screen: executed yast2 control center from krunner or menu, and move the window to 2nd screen, then click software management, crashed when dialog need to redraw/update!
** sw_single did not crashed on 2nd screen: being root and executed yast2 on terminal, move the yast2 control center window to 2nd screen, click sofware management, worked and no crash.

So I am suspect it's more likely a KDE/Kwin or session issue...

Not yet found the root cause but clarified the bug and update the information.


[1] https://bugreports.qt.io/browse/QTBUG-42985
[2] https://build.opensuse.org/package/show/home:mlin7442:boo955381/libqt5-qtbase - based on 5.5, not in upstream 5.5 branch yet
[3] https://build.opensuse.org/package/show/home:mlin7442:branches:KDE:Qt5/libqt5-qtbase - huge patchset, upstreamed patches, cherry-picked from 5.6
Comment 10 Ladislav Slezák 2015-12-22 15:26:49 UTC
Max, thanks a lot for help with this issue!

Could you reassign the bug to someone else than the YaST team?
It's clearly not an YaST issue...
Comment 11 Vadim Krevs 2016-01-04 11:03:11 UTC
Created attachment 660722 [details]
y2signal.log from yast2 sw_single
Comment 12 Vadim Krevs 2016-01-04 11:08:32 UTC
Same here on openSUSE 42.1 + Plasma 5,5,2 from OBS. 

yast2 sw_single crashes, y2signal.log attached, core file is here:
https://drive.google.com/file/d/0B9obXDcgwWMHdGlMRjVBM2dWUTg/view?usp=sharing
Comment 13 Josef Reidinger 2016-01-04 16:19:25 UTC
*** Bug 960588 has been marked as a duplicate of this bug. ***
Comment 14 Forgotten User rqaFdHERe7 2016-01-11 00:52:57 UTC
when will this bug be fixed?
Comment 15 Fabian Vogt 2016-01-11 08:55:32 UTC
*** Bug 961273 has been marked as a duplicate of this bug. ***
Comment 16 Fabian Vogt 2016-01-12 16:03:54 UTC
It seems to be caused by /usr/lib64/qt5/plugins/platformthemes/KDEPlatformTheme.so as doing
"unset KDE_FULL_SESSION; unset XDG_CURRENT_DESKTOP" to avoid detecting KDE makes it work reliably.
That does not mean that the bug is in that file itself, though, it might only be triggered by it.

@YaST-Maintainers:
As a workaround, unset those two variables in the yast2 script?
Function set_qt_env in /usr/lib/YaST2/bin/yast2-funcs seems to be the perfect place, just after the other workaround...
Comment 17 Josef Reidinger 2016-01-12 16:10:34 UTC
(In reply to Fabian Vogt from comment #16)
> It seems to be caused by
> /usr/lib64/qt5/plugins/platformthemes/KDEPlatformTheme.so as doing
> "unset KDE_FULL_SESSION; unset XDG_CURRENT_DESKTOP" to avoid detecting KDE
> makes it work reliably.
> That does not mean that the bug is in that file itself, though, it might
> only be triggered by it.
> 
> @YaST-Maintainers:
> As a workaround, unset those two variables in the yast2 script?
> Function set_qt_env in /usr/lib/YaST2/bin/yast2-funcs seems to be the
> perfect place, just after the other workaround...

YaST is already full of workarounds and it slap us into face often as if we do it, then in future we forgot to remove it and then due to workaround only YaST does not work correctly. So I propose to fix real bug instead of installing another workaround in non related project.
Comment 18 Fabian Vogt 2016-01-13 15:26:21 UTC
After some hours of debugging, it seems to be related to either stylesheets or the KDE breeze theme.
As the use of stylesheets (libyui-qt7 uses them for most, but not all widgets) enforces the Qt windows style, but the default style is set to breeze, some widgets are rendered using Breeze, others using Windows. Somehow only this combination causes a crash:
/usr/lib/YaST2/bin/y2base sw_single qt -style breeze -stylesheet /usr/share/YaST2/theme/current/wizard/style.qss

Using -style fusion or doing export Y2STYLE="asdf" before (or even zypper rm yast2-qt-branding-openSUSE) makes the bug disappear.
I tried to dig deeper with GDB, but the bug does not occur when singlestepping or watchpoints are active :-/
Comment 19 Gabriele Mohr 2016-01-20 13:53:26 UTC
*** Bug 962164 has been marked as a duplicate of this bug. ***
Comment 20 Forgotten User DV81ZEWZkN 2016-01-20 16:51:52 UTC
Please don't adjust priorities. That is assignees.
Comment 21 Forgotten User DV81ZEWZkN 2016-01-20 16:53:58 UTC
(In reply to Hrvoje Senjan from comment #20)
> Please don't adjust priorities. That is assignees.

*for assignees.
Comment 22 Forgotten User fbKqKvv6Lf 2016-01-30 10:48:45 UTC
For me the workaround as mentioned in comment #18
zypper rm yast2-qt-branding-openSUSE
has resolved the issue. Other than some problems with the icon symbols under Package in the menu I also like the "new" (native Qt) style.
Thanks Fabian.
Comment 23 Wolfgang Bauer 2016-01-30 15:20:42 UTC
Has anybody tried with Plasma 5.5.4 yet?

At least the latest comments sound like it could be related to this Konsole problem:
https://bugs.kde.org/show_bug.cgi?id=356343

That's actually caused by the breeze style and should be fixed in 5.5.4.

There might be more than one problem mixed in this bug report though...
Comment 24 Wolfgang Bauer 2016-01-30 15:29:42 UTC
(In reply to Wolfgang Bauer from comment #23)
> At least the latest comments sound like it could be related to this Konsole
> problem:
> https://bugs.kde.org/show_bug.cgi?id=356343

Sorry, I actually meant this one, which has been marked as duplicate of the above mentioned one but is explicitly about running on the 2nd monitor:
https://bugs.kde.org/show_bug.cgi?id=357388
Comment 25 Stefan Hundhammer 2016-02-11 10:27:47 UTC
*** Bug 964283 has been marked as a duplicate of this bug. ***
Comment 26 Swamp Workflow Management 2016-03-04 18:03:39 UTC
SUSE-RU-2016:0652-1: An update that has two recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 955381,964864
CVE References: 
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP1 (src):    libinput-1.1.1-2.1, libqt5-qt3d-5.5.1-2.1, libqt5-qtbase-5.5.1-3.1, libqt5-qtconnectivity-5.5.1-2.1, libqt5-qtct-0.20-2.1, libqt5-qtdeclarative-5.5.1-3.3, libqt5-qtquick1-5.5.1-3.4, libqt5-qtscript-5.5.1-3.3, libqt5-qttools-5.5.1-3.4, libqt5-qtwebchannel-5.5.1-2.1, libqt5-qtwebengine-5.5.1-2.8, libqt5-qtxmlpatterns-5.5.1-3.1, libsrtp-1.5.2-2.1, protobuf-2.6.1-6.1
SUSE Linux Enterprise Server 12-SP1 (src):    libinput-1.1.1-2.1, libqt5-qtbase-5.5.1-3.1, libqt5-qtx11extras-5.5.1-3.2
SUSE Linux Enterprise Desktop 12-SP1 (src):    libinput-1.1.1-2.1, libqt5-qtbase-5.5.1-3.1, libqt5-qtx11extras-5.5.1-3.2
Comment 27 Forgotten User fcU7IqMOC7 2016-03-29 23:58:41 UTC
seeing the same thing on latest tumbleweed snapshot
Comment 28 Fabian Vogt 2016-05-03 10:33:45 UTC
As comment #22 points out, removal of yast2-qt-branding-openSUSE solves the issue and the result looks much better too!
YaST uses Qt style sheets in the branding package, which unfortunately require a fallback ("windows") theme, so it doesn't integrate well into the DE.

What about removal of the yast2-qt-branding-openSUSE package altogether?
Is there anything important provided by the branding?
Comment 29 Forgotten User 97x9v9Rtge 2016-05-03 10:59:48 UTC
I may kindly ask if you would consider to at least remove it from (recommends?), if you do not want to drop it fully. Im not sure if this is the case but it gets reinstalled, even after removal. Just in the way that theres a solid option to not having it installed automatically it without having to use switches, when running dup. For Tumbleweed upgrades this would be very comfortable then. No need to pin, etc. And you would have option to keep it.

Many thanks,

Greetings,

Matthias (revealed).
Comment 30 Ladislav Slezák 2016-05-10 14:21:23 UTC
The package is basically maintained outside the YaST team, as mentioned in comment #28 it contains the Qt stylesheet and some icons.

I still consider it a Qt bug if it fails with our stylesheet, there is no binary plugin or something advanced, it's just plain CSS files + PNG icons.


I'm not sure if dropping the package is desired, it depends on the openSUSE maintainers...

I do not know who is responsible for this, but "osc bugowner yast2-qt-branding-openSUSE" says Richard and Bruno - setting the needinfo to them.

Moreover https://github.com/openSUSE/branding/blob/leap-42.1/README also mentions Coolo and Vincent.
Comment 31 Richard Brown 2016-05-29 12:51:01 UTC
(In reply to Ladislav Slezák from comment #30)
> The package is basically maintained outside the YaST team, as mentioned in
> comment #28 it contains the Qt stylesheet and some icons.
> 
> I still consider it a Qt bug if it fails with our stylesheet, there is no
> binary plugin or something advanced, it's just plain CSS files + PNG icons.
> 
> 
> I'm not sure if dropping the package is desired, it depends on the openSUSE
> maintainers...
> 
> I do not know who is responsible for this, but "osc bugowner
> yast2-qt-branding-openSUSE" says Richard and Bruno - setting the needinfo to
> them.
> 
> Moreover https://github.com/openSUSE/branding/blob/leap-42.1/README also
> mentions Coolo and Vincent.

My understanding from the discussions I had with Kenneth circa SLE 12 GA is that yast2-qt-branding was made obsolete by the work that he and the YaST team did as part of that rethemeing.

I am still awaiting a SR/delete request once that's complete. 

I see no problem dropping yast2-qt-branding-openSUSE, it's only part of the branding-openSUSE package because someone else put it there.

I certainly do not feel this is my bug to fix, given I am neither a YaST maintainer nor a QT guy, and some old stylesheet shouldn't be a cause for some segfaults :)
Comment 32 Bruno Friedmann 2016-05-29 19:55:41 UTC
Created attachment 678744 [details]
Yast + yast sw_single on dual-screen (tw+qt56)

I'm attaching a screen shots made on dual screen (one being hidpi).
Running perfectly on Tumbleweed + additionnal repositories :
Qt56 
KDE:/Unstable/Frameworks
KDE:/Unstable/Applications
KDE:/Unstable/Extra
+ locally build nvidia 367.18 drivers 

There's some hope with Qt56(2,3,4,x) that things will start to be more stable with multiple screen setup.

So If someone want to send an sr#delete against I will not deny it.

The fact that Leap is locked to qt55 will still create annoying bugs.
Comment 33 Fabian Vogt 2016-05-30 07:37:23 UTC
> I'm attaching a screen shots made on dual screen (one being hidpi).
Running perfectly on Tumbleweed + additionnal repositories :

Did you move the yast window to the side after it started? It only crashes if it starts on a non-primary monitor.
Anyway, that screenshot still shows how the appearance really doesn't fit the rest of the desktop, so I'd make a delete request.

Is the yast/ subdirectory of the openSUSE/branding GH repo needed for something else (installer, maybe)? If not, I'd make a PR to remove that first.
Comment 34 Bruno Friedmann 2016-05-30 08:14:01 UTC
Fabian I've tried both start yast on primary or secondary and it have not crashed.

For the theme, I'm using breeze as default for plasma5 so seems normal it doesn't match the openSUSE one.
Comment 35 Fabian Vogt 2016-05-30 08:18:54 UTC
(In reply to Bruno Friedmann from comment #34)
> Fabian I've tried both start yast on primary or secondary and it have not
> crashed.

Maybe the bug is actually fixed in Qt 5.6 now, who knows.

> For the theme, I'm using breeze as default for plasma5 so seems normal it
> doesn't match the openSUSE one.

breeze IS the default. Due to yast2-qt-branding-openSUSE, yast always uses its custom theme.
Comment 36 Bernhard Wiedemann 2016-06-14 22:00:45 UTC
This is an autogenerated message for OBS integration:
This bug (955381) was mentioned in
https://build.opensuse.org/request/show/401893 42.2 / branding-openSUSE
Comment 37 Fabian Vogt 2016-06-15 09:10:48 UTC
yast2-qt-branding-openSUSE no longer supplements YaST on TW and soon 42.2.
This means it's not part of any default installation (and thus not even on the DVDs).
The package still exists as some parts of it are used by the installer:
https://github.com/yast/skelcd-control-openSUSE/pull/47#issuecomment-223946215

Although this isn't really the proper fix for the original bug in Qt,
it's close enough for RESOLVED FIXED.
Comment 38 Stefan Hundhammer 2016-08-16 08:57:19 UTC
*** Bug 992975 has been marked as a duplicate of this bug. ***
Comment 39 Josef Reidinger 2016-10-13 13:31:20 UTC
*** Bug 844043 has been marked as a duplicate of this bug. ***
Comment 40 Stefan Hundhammer 2016-12-20 16:13:26 UTC
*** Bug 1016392 has been marked as a duplicate of this bug. ***
Comment 41 Josef Reidinger 2017-02-09 12:48:46 UTC
*** Bug 1024299 has been marked as a duplicate of this bug. ***
Comment 42 Stefan Hundhammer 2017-05-03 15:40:08 UTC
*** Bug 1036897 has been marked as a duplicate of this bug. ***