Bug 355882 - kwin crashes when changing display settings using xrandr
Summary: kwin crashes when changing display settings using xrandr
Status: RESOLVED DUPLICATE of bug 341497
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.4.95
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-11-25 09:57 UTC by Fabian Köster
Modified: 2015-11-25 15:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Köster 2015-11-25 09:57:59 UTC
Application: kwin_x11 (5.4.95)
 (Compiled from sources)
Qt Version: 5.5.1
Operating System: Linux 4.2.6-gentoo x86_64
Distribution: "NAME=Gentoo"

-- Information about the crash:
- What I was doing when the application crashed:

Because sometimes the automatically selected display configuration is wrong I execute the following script:

xrandr --output DisplayPort-0 --off --output DVI-0 --off
xrandr --output DisplayPort-0 --auto
xrandr --output DVI-0 --auto --left-of DisplayPort-0

This causes kwin to crash.

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f09e6378800 (LWP 2282))]

Thread 5 (Thread 0x7f09c77fe700 (LWP 2319)):
#0  0x00007f09e5e87f83 in select () from /lib64/libc.so.6
#1  0x00007f09e452e961 in qt_safe_select (nfds=12, fdread=fdread@entry=0x7f09b8000a78, fdwrite=fdwrite@entry=0x7f09b8000d08, fdexcept=fdexcept@entry=0x7f09b8000f98, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75
#2  0x00007f09e45300fe in select (timeout=0x0, exceptfds=0x7f09b8000f98, writefds=0x7f09b8000d08, readfds=0x7f09b8000a78, nfds=<optimized out>, this=0x7f09b80008c0) at kernel/qeventdispatcher_unix.cpp:320
#3  QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f09b80008e0, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196
#4  0x00007f09e4530655 in QEventDispatcherUNIX::processEvents (this=0x7f09b80008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x00007f09e44e39aa in QEventLoop::exec (this=this@entry=0x7f09c77fdda0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007f09e4331a24 in QThread::exec (this=this@entry=0x82ac50) at thread/qthread.cpp:503
#7  0x00007f09df08a5f5 in QQmlThreadPrivate::run (this=0x82ac50) at qml/ftw/qqmlthread.cpp:141
#8  0x00007f09e4336492 in QThreadPrivate::start (arg=0x82ac50) at thread/qthread_unix.cpp:331
#9  0x00007f09e54b7334 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f09e5e8f1bd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f09b687e700 (LWP 2325)):
#0  0x00007f09e54bc91f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f09c6220e3b in radeon_winsys_unref (ws=0x7c1c48) at /hdd/tmp/portage/media-libs/mesa-11.0.6/work/mesa-11.0.6/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c:684
#2  0x00007f09c6220d00 in ?? () at /hdd/tmp/portage/media-libs/mesa-11.0.6/work/mesa-11.0.6/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c:516 from /usr/lib64/dri/radeonsi_dri.so
#3  0x00000000007c1900 in ?? ()
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f09b587c700 (LWP 2340)):
#0  0x00007f09e54bc91f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f09e3526924 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f09e3616e40 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f09e3526969 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007f09e54b7334 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f09e5e8f1bd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f09c7fff700 (LWP 7036)):
#0  0x00007f09e5e87f83 in select () from /lib64/libc.so.6
#1  0x00007f09e452e961 in qt_safe_select (nfds=11, fdread=fdread@entry=0x7f09c0000a78, fdwrite=fdwrite@entry=0x7f09c0000d08, fdexcept=fdexcept@entry=0x7f09c0000f98, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75
#2  0x00007f09e45300fe in select (timeout=0x0, exceptfds=0x7f09c0000f98, writefds=0x7f09c0000d08, readfds=0x7f09c0000a78, nfds=<optimized out>, this=0x7f09c00008c0) at kernel/qeventdispatcher_unix.cpp:320
#3  QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f09c00008e0, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196
#4  0x00007f09e4530655 in QEventDispatcherUNIX::processEvents (this=0x7f09c00008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x00007f09e44e39aa in QEventLoop::exec (this=this@entry=0x7f09c7ffeda0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007f09e4331a24 in QThread::exec (this=this@entry=0x102dc70) at thread/qthread.cpp:503
#7  0x00007f09df08a5f5 in QQmlThreadPrivate::run (this=0x102dc70) at qml/ftw/qqmlthread.cpp:141
#8  0x00007f09e4336492 in QThreadPrivate::start (arg=0x102dc70) at thread/qthread_unix.cpp:331
#9  0x00007f09e54b7334 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f09e5e8f1bd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f09e6378800 (LWP 2282)):
[KCrash Handler]
#6  QScreen::handle (this=0x0) at kernel/qscreen.cpp:112
#7  0x00007f09cfc11389 in QXcbIntegration::createPlatformWindow (this=<optimized out>, window=0x1053480) at qxcbintegration.cpp:196
#8  0x00007f09e48191c3 in QWindowPrivate::create (this=0xe14880, recursive=recursive@entry=false) at kernel/qwindow.cpp:392
#9  0x00007f09e48192bb in QWindow::create (this=this@entry=0x1053480) at kernel/qwindow.cpp:548
#10 0x00007f09e48197e8 in QWindow::setVisible (this=0x1053480, visible=<optimized out>) at kernel/qwindow.cpp:477
#11 0x00007f09df700483 in QQuickWindowQmlImpl::qt_metacall (this=0x1053480, _c=QMetaObject::WriteProperty, _id=0, _a=0x7ffcf53f3b90) at .moc/moc_qquickwindowmodule_p.cpp:180
#12 0x00007f09df001b17 in QQmlPropertyPrivate::write (object=object@entry=0x1053480, property=..., value=..., context=context@entry=0x10094e0, flags=...) at qml/qqmlproperty.cpp:1313
#13 0x00007f09df00376b in QQmlPropertyPrivate::writeValueProperty (object=object@entry=0x1053480, core=..., value=..., context=context@entry=0x10094e0, flags=...) at qml/qqmlproperty.cpp:1237
#14 0x00007f09df0043c4 in QQmlPropertyPrivate::writeBinding (object=0x1053480, core=..., context=0x10094e0, expression=expression@entry=0x109c4e0, result=..., isUndefined=isUndefined@entry=false, flags=...) at qml/qqmlproperty.cpp:1597
#15 0x00007f09df074715 in QQmlBinding::update (this=0x109c4c0, flags=...) at qml/qqmlbinding.cpp:199
#16 0x00007f09df074b6e in update (this=<optimized out>) at qml/qqmlbinding_p.h:97
#17 QQmlBinding::expressionChanged (e=<optimized out>) at qml/qqmlbinding.cpp:260
#18 0x00007f09df050494 in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=a@entry=0x0) at qml/qqmlnotifier.cpp:94
#19 0x00007f09deff05bc in QQmlData::signalEmitted (object=0x74f030, index=3, a=0x0) at qml/qqmlengine.cpp:763
#20 0x00007f09e450c851 in QMetaObject::activate (sender=sender@entry=0x74f030, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3599
#21 0x00007f09e450d6c7 in QMetaObject::activate (sender=sender@entry=0x74f030, m=m@entry=0x7f09e5d9dd80 <KWin::Outline::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3578
#22 0x00007f09e5af8a30 in KWin::Outline::activeChanged (this=this@entry=0x74f030) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95_build/moc_outline.cpp:185
#23 0x00007f09e59d550d in KWin::Outline::show (this=0x74f030) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95/outline.cpp:57
#24 0x00007f09e59d5552 in KWin::Outline::show (this=<optimized out>, outlineGeometry=...) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95/outline.cpp:84
#25 0x00007f09e5a178fa in KWin::AbstractClient::setElectricBorderMaximizing (this=this@entry=0x1053890, maximizing=<optimized out>) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95/geometry.cpp:3221
#26 0x00007f09e599492a in KWin::AbstractClient::checkQuickTilingMaximizationZones (this=0x1053890, xroot=<optimized out>, yroot=<optimized out>) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95/abstract_client.cpp:1244
#27 0x00007f09e59d885a in KWin::Client::motionNotifyEvent (this=this@entry=0x1053890, w=38021169, state=256, x=1310, y=0, x_root=1741, y_root=0) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95/events.cpp:1346
#28 0x00007f09e59d9861 in KWin::Client::windowEvent (this=0x1053890, e=e@entry=0x7f09c8004780) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95/events.cpp:711
#29 0x00007f09e59dadfb in KWin::Workspace::workspaceEvent (this=0x715960, e=0x7f09c8004780) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95/events.cpp:369
#30 0x00007f09e44e2b3c in QAbstractEventDispatcher::filterNativeEvent (this=<optimized out>, eventType=..., message=message@entry=0x7f09c8004780, result=result@entry=0x7ffcf53f5c48) at kernel/qabstracteventdispatcher.cpp:460
#31 0x00007f09cfc0d7a5 in QXcbConnection::handleXcbEvent (this=this@entry=0x619a70, event=event@entry=0x7f09c8004780) at qxcbconnection.cpp:1020
#32 0x00007f09cfc0f8cb in QXcbConnection::processXcbEvents (this=0x619a70) at qxcbconnection.cpp:1502
#33 0x00007f09e450e08a in QObject::event (this=0x619a70, e=<optimized out>) at kernel/qobject.cpp:1239
#34 0x00007f09e4d3669c in QApplicationPrivate::notify_helper (this=this@entry=0x6137c0, receiver=receiver@entry=0x619a70, e=e@entry=0x7f09c8004870) at kernel/qapplication.cpp:3716
#35 0x00007f09e4d3bb10 in QApplication::notify (this=0x7ffcf53f6250, receiver=0x619a70, e=0x7f09c8004870) at kernel/qapplication.cpp:3499
#36 0x00007f09e44e4d8d in QCoreApplication::notifyInternal (this=0x7ffcf53f6250, receiver=0x619a70, event=event@entry=0x7f09c8004870) at kernel/qcoreapplication.cpp:965
#37 0x00007f09e44e7b63 in sendEvent (event=0x7f09c8004870, receiver=<optimized out>) at kernel/qcoreapplication.h:224
#38 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x603bf0) at kernel/qcoreapplication.cpp:1593
#39 0x00007f09e45304f2 in QEventDispatcherUNIX::processEvents (this=0x666fa0, flags=flags@entry=...) at kernel/qeventdispatcher_unix.cpp:579
#40 0x00007f09cfc72ded in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:62
#41 0x00007f09e44e39aa in QEventLoop::exec (this=this@entry=0x7ffcf53f6170, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#42 0x00007f09e44ead8c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#43 0x00007f09e480932c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1527
#44 0x00007f09e4d322d5 in QApplication::exec () at kernel/qapplication.cpp:2976
#45 0x00007f09e614756c in kdemain (argc=1, argv=0x7ffcf53f63b8) at /hdd/tmp/portage/kde-plasma/kwin-5.4.95/work/kwin-5.4.95/main_x11.cpp:305
#46 0x00007f09e5dc77b0 in __libc_start_main () from /lib64/libc.so.6
#47 0x0000000000400849 in _start ()

Possible duplicates by query: bug 355118, bug 354387, bug 353122, bug 352712, bug 350800.

Reported using DrKonqi
Comment 1 Thomas Lübking 2015-11-25 10:14:55 UTC

*** This bug has been marked as a duplicate of bug 341497 ***
Comment 2 Martin Flöser 2015-11-25 11:09:08 UTC
> xrandr --output DisplayPort-0 --off --output DVI-0 --off

never ever disable all outputs, it makes Qt go boom. Sorry about that, it's unfortunately nothing we can do about. There is a patch being worked on for Qt 5.6 to make this work again. I do hope it gets integrated.
Comment 3 Fabian Köster 2015-11-25 11:28:48 UTC
(In reply to Martin Gräßlin from comment #2)
> > xrandr --output DisplayPort-0 --off --output DVI-0 --off
> 
> never ever disable all outputs, it makes Qt go boom. Sorry about that, it's
> unfortunately nothing we can do about. There is a patch being worked on for
> Qt 5.6 to make this work again. I do hope it gets integrated.

OK, thanks!
Comment 4 Thomas Lübking 2015-11-25 15:25:28 UTC
This should work as expected:
xrandr --output DisplayPort-0 --auto --output DVI-0 --auto --left-of DisplayPort-0

Please however notice that disabling all screen blows Qt5 *for sure* - there's no guanrantee that random other RandR events do not cause segfaults as well :-(

@Martin, does that mean they finally consider to introduce a dummy screen for 5.6?
Comment 5 Martin Flöser 2015-11-25 15:34:46 UTC
> @Martin, does that mean they finally consider to introduce a dummy screen
> for 5.6?

yes, see https://codereview.qt-project.org/138201