Bug 911304

Summary: XCB: QApplication crashes with no monitor or in multimonitor setups
Product: [openSUSE] openSUSE Distribution Reporter: Forgotten User CkDND5Y5e3 <forgotten_CkDND5Y5e3>
Component: KDE Workspace (Plasma)Assignee: E-Mail List <opensuse-kde-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P3 - Medium CC: denni.granata, forgotten_CkDND5Y5e3, forgotten_MJNMIDMNoY, forgotten_qouZmm_Kx7, mvidner, okurz, opensuse-kde-bugs, richlv, st.vater
Version: Leap 42.1   
Target Milestone: ---   
Hardware: x86-64   
OS: All   
See Also: https://bugreports.qt.io/browse/QTBUG-31354
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 logs and commands executed

Description Forgotten User CkDND5Y5e3 2014-12-27 20:09:31 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build Identifier: 

yast2 segfaults when monitor (lcd tv over hdmi) is switched off, and yast2 is started remotely via teamviewer.
If the monitor is on, yast2 starts up successfully.
(The system is accessed via teamviewer)

dmesg shows:
[ 3971.461373] y2controlcenter[3822]: segfault at 18 ip 00007fe36f5c40fc sp 00007fff39168120 error 4 in libqxcb.so[7fe36f57e000+b0000]


Reproducible: Always

Steps to Reproduce:
1.have an opensuse 13.2 system with teamviewer installed (other remote desktop products not confirmed)
2.switch off monitor
3.log on to the opensuse box via teamviewer, try to start yast2 (control center)
Actual Results:  
segfault:
dmesg shows:
[ 3971.461373] y2controlcenter[3822]: segfault at 18 ip 00007fe36f5c40fc sp 00007fff39168120 error 4 in libqxcb.so[7fe36f57e000+b0000]

Expected Results:  
yast2 starts up successfully

This may be an error in the Qt library, in which case the bug should be handled by the Qt team...

dmesg shows:
[ 3971.461373] y2controlcenter[3822]: segfault at 18 ip 00007fe36f5c40fc sp 00007fff39168120 error 4 in libqxcb.so[7fe36f57e000+b0000]
Comment 1 Lukas Ocilka 2015-01-02 12:44:35 UTC
Please attach all Yast logs: https://en.opensuse.org/openSUSE:Report_a_YaST_bug
Comment 2 Forgotten User CkDND5Y5e3 2015-01-02 15:26:25 UTC
Created attachment 618567 [details]
yast2 logs and commands executed

Commands executed before: (because yast2 seems to be segfaulting before it can log anything, according to file dates)


htpc:/home/balint # dmesg -c
htpc:/home/balint # ls -la /var/log/YaST2/
total 4228
drwx------  2 root root    4096 Jan  2 16:10 .
drwxr-xr-x 12 root root    4096 Jan  2 16:13 ..
-rw-r--r--  1 root root      59 Dec 22 18:16 arch.info
-rw-r--r--  1 root root    1924 Dec 22 18:06 config_diff_2014_12_22.log
-rw-r--r--  1 root root     645 Dec 22 18:16 curl_log
-rw-r--r--  1 root root     512 Dec 22 18:15 _dev_sda
-rw-r--r--  1 root root     512 Dec 22 18:15 _dev_sda4
-rw-r--r--  1 root root    2749 Dec 22 18:16 disk_sda.info
-rw-r--r--  1 root root    1559 Dec 22 18:16 disk_sdb.info
-rw-r--r--  1 root root      30 Dec 22 18:16 free.info
-rw-r--r--  1 root root   47273 Dec 22 18:16 macro_inst_initial.ycp
-rw-r--r--  1 root root   10296 Dec 22 18:15 mkinitrd.log
-rw-r--r--  1 root root    9102 Dec 22 18:16 pbl-instsys.log
-rw-r--r--  1 root root   18331 Dec 22 18:15 perl-BL-standalone-log
-rw-------  1 root root    1800 Jan  2 16:10 signal
-rw-r--r--  1 root root     210 Dec 22 18:16 sntp.log
-rw-r--r--  1 root root    4461 Dec 22 18:16 y2changes
-rw-r--r--  1 root root 2978051 Jan  2 16:10 y2log
-rw-r--r--  1 root root 1180917 Dec 22 18:16 y2log-1.gz
-rw-r--r--  1 root root    1559 Dec 22 18:15 y2logmkinitrd
-rw-r--r--  1 root root    3315 Dec 22 18:16 y2start.log
htpc:/home/balint # date
Fri Jan  2 16:15:27 CET 2015
htpc:/home/balint # Y2DEBUG=1 yast2
/sbin/yast2: line 440:  1531 Segmentation fault      $y2ccbin $Y2UI_ARGS "$@"
htpc:/home/balint # dmesg -c
[  127.390014] y2controlcenter[1531]: segfault at 18 ip 00007f159dc500fc sp 00007fffef9b1250 error 4 in libqxcb.so[7f159dc0a000+b0000]
htpc:/home/balint # date
Fri Jan  2 16:15:57 CET 2015
htpc:/home/balint # ls -la /var/log/YaST2/
total 4228
drwx------  2 root root    4096 Jan  2 16:10 .
drwxr-xr-x 12 root root    4096 Jan  2 16:13 ..
-rw-r--r--  1 root root      59 Dec 22 18:16 arch.info
-rw-r--r--  1 root root    1924 Dec 22 18:06 config_diff_2014_12_22.log
-rw-r--r--  1 root root     645 Dec 22 18:16 curl_log
-rw-r--r--  1 root root     512 Dec 22 18:15 _dev_sda
-rw-r--r--  1 root root     512 Dec 22 18:15 _dev_sda4
-rw-r--r--  1 root root    2749 Dec 22 18:16 disk_sda.info
-rw-r--r--  1 root root    1559 Dec 22 18:16 disk_sdb.info
-rw-r--r--  1 root root      30 Dec 22 18:16 free.info
-rw-r--r--  1 root root   47273 Dec 22 18:16 macro_inst_initial.ycp
-rw-r--r--  1 root root   10296 Dec 22 18:15 mkinitrd.log
-rw-r--r--  1 root root    9102 Dec 22 18:16 pbl-instsys.log
-rw-r--r--  1 root root   18331 Dec 22 18:15 perl-BL-standalone-log
-rw-------  1 root root    1800 Jan  2 16:10 signal
-rw-r--r--  1 root root     210 Dec 22 18:16 sntp.log
-rw-r--r--  1 root root    4461 Dec 22 18:16 y2changes
-rw-r--r--  1 root root 2978051 Jan  2 16:10 y2log
-rw-r--r--  1 root root 1180917 Dec 22 18:16 y2log-1.gz
-rw-r--r--  1 root root    1559 Dec 22 18:15 y2logmkinitrd
-rw-r--r--  1 root root    3315 Dec 22 18:16 y2start.log
htpc:/home/balint # Y2DEBUGALL=1 yast2
/sbin/yast2: line 440:  1567 Segmentation fault      $y2ccbin $Y2UI_ARGS "$@"
htpc:/home/balint # dmesg -c
[  188.266418] y2controlcenter[1567]: segfault at 18 ip 00007fb6cac720fc sp 00007fff55d81bd0 error 4 in libqxcb.so[7fb6cac2c000+b0000]
htpc:/home/balint # ls -la /var/log/YaST2/
total 4228
drwx------  2 root root    4096 Jan  2 16:10 .
drwxr-xr-x 12 root root    4096 Jan  2 16:13 ..
-rw-r--r--  1 root root      59 Dec 22 18:16 arch.info
-rw-r--r--  1 root root    1924 Dec 22 18:06 config_diff_2014_12_22.log
-rw-r--r--  1 root root     645 Dec 22 18:16 curl_log
-rw-r--r--  1 root root     512 Dec 22 18:15 _dev_sda
-rw-r--r--  1 root root     512 Dec 22 18:15 _dev_sda4
-rw-r--r--  1 root root    2749 Dec 22 18:16 disk_sda.info
-rw-r--r--  1 root root    1559 Dec 22 18:16 disk_sdb.info
-rw-r--r--  1 root root      30 Dec 22 18:16 free.info
-rw-r--r--  1 root root   47273 Dec 22 18:16 macro_inst_initial.ycp
-rw-r--r--  1 root root   10296 Dec 22 18:15 mkinitrd.log
-rw-r--r--  1 root root    9102 Dec 22 18:16 pbl-instsys.log
-rw-r--r--  1 root root   18331 Dec 22 18:15 perl-BL-standalone-log
-rw-------  1 root root    1800 Jan  2 16:10 signal
-rw-r--r--  1 root root     210 Dec 22 18:16 sntp.log
-rw-r--r--  1 root root    4461 Dec 22 18:16 y2changes
-rw-r--r--  1 root root 2978051 Jan  2 16:10 y2log
-rw-r--r--  1 root root 1180917 Dec 22 18:16 y2log-1.gz
-rw-r--r--  1 root root    1559 Dec 22 18:15 y2logmkinitrd
-rw-r--r--  1 root root    3315 Dec 22 18:16 y2start.log
htpc:/home/balint # tar -czf logs.tar.gz /var/lo
lock/ log/  
htpc:/home/balint # tar -czf logs.tar.gz /var/lo
lock/ log/  
htpc:/home/balint # tar -czf logs.tar.gz /var/log/YaST2/*
tar: Removing leading `/' from member names
htpc:/home/balint #
Comment 3 Ladislav Slezák 2015-01-05 08:17:11 UTC
It looks like a problem in Qt (segfaults in libqxcb.so), but I'm not an libyui-qt expert, Martin, please check...
Comment 4 Martin Vidner 2015-01-21 15:10:47 UTC
Thanks for the report, Bálint.

We will need a better backtrace:
1. please install 
  libQt5Core5-debuginfo libQt5Gui5-debuginfo libQt5Widgets5-debuginfo
2. enable dumping of core files:
  ulimit -c unlimited
3. run YaST and let it segfault
4. get the backtrace
  gdb /usr/lib/YaST2/bin/y2base core
  (gdb) thread apply all bt

I am reassigning to KDE maintainers as this seems to be a Qt5 bug. Past bugs related to QXCB: bug 883553, bug 890168.
Comment 5 Forgotten User CkDND5Y5e3 2015-01-23 04:04:06 UTC
This seems to be a known issue in Qt5:
http://qt-project.org/forums/viewthread/28101
https://bugreports.qt.io/browse/QTBUG-31354
Comment 6 Tomáš Chvátal 2015-12-07 13:45:38 UTC
*** Bug 917054 has been marked as a duplicate of this bug. ***
Comment 7 Tomáš Chvátal 2015-12-07 14:25:21 UTC
*** Bug 917054 has been marked as a duplicate of this bug. ***
Comment 8 Tomáš Chvátal 2015-12-08 11:56:10 UTC
*** Bug 949978 has been marked as a duplicate of this bug. ***
Comment 9 Tomáš Chvátal 2015-12-08 12:00:26 UTC
*** Bug 954434 has been marked as a duplicate of this bug. ***
Comment 10 Tomáš Chvátal 2015-12-08 12:00:38 UTC
*** Bug 954538 has been marked as a duplicate of this bug. ***
Comment 11 Tomáš Chvátal 2015-12-08 12:02:51 UTC
Lets update this so it is obvious it happens with all qt5 based systems regardless it being leap/tw/13.2.

Also it seems since so many ppl noticed we should probably raise serverity.
Comment 12 Tomáš Chvátal 2015-12-08 21:05:30 UTC
*** Bug 937100 has been marked as a duplicate of this bug. ***
Comment 13 Oliver Kurz 2015-12-15 10:48:16 UTC
It seems this bug has been fixed upstream: https://bugreports.qt.io/browse/QTBUG-42985

So how does a next step look like?

I am clearing needinfo by pbalint@gmail.com as it seems all necessary info is there :-)
Comment 14 Forgotten User CkDND5Y5e3 2015-12-17 13:26:53 UTC
Hi!

So repro steps:
-Install an OpenSUSE box with GUI (tested with KDE)
-Install teamviewer onto machine above(https://www.teamviewer.com/en/download/windows.aspx)
-Make the machine headless (*unplug* all vga/hdmi/dvi/displayport/etc cables)
-On a different machine, also install teamviwer, and log onto the openSUSE box above
-Run Qt5 application, e.g. YaST2 with Qt GUI

Other repro (may/may not repro the issue)
-Do all of the above, but instead of teamviwer, use VNC

Basically, the root of the issue is that Qt5 applications fail to start, when there is no physical display attached *at all*.
(e.g. cable not attached, or attached, but powered off.
Sleep/power saving mode on the display does not count, as it still seems to provide some info to the graphics adapter)
Comment 15 Forgotten User CkDND5Y5e3 2015-12-17 13:29:35 UTC
Direct teamviewer link for linux: http://download.teamviewer.com/download/teamviewer.i686.rpm
Comment 16 Forgotten User CkDND5Y5e3 2015-12-17 13:31:35 UTC
Oh, misread "clearing needinfo" to "clearly needinfo"...
My bad... :-)
Comment 17 Oliver Kurz 2016-07-12 19:51:22 UTC
as per previous comments