Bug 359529 - KWin (X11) crashed after login (two monitor configuration)
Summary: KWin (X11) crashed after login (two monitor configuration)
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2016-02-18 11:38 UTC by Lukáš Karas
Modified: 2016-04-02 15:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukáš Karas 2016-02-18 11:38:39 UTC
Application: kwin_x11 (5.5.90)
 (Compiled from sources)
Qt Version: 5.5.1
Operating System: Linux 4.4.1 x86_64
Distribution: Ubuntu Xenial Xerus (development branch)

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

Hi, I just login to KDE session and kwin crashed. I had to switch to terminal, setup DISPLAY variable and start kwin_x11 again.

I compiled kwin from master just before restart, my HEAD is:
f0ec89f38b1dd86d8b79f1057706b222bce80bba

QT version 5.5.1, packages are from Ubuntu Xenial (development)

$ kwin_x11 --version
kwin 5.5.90

$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 3.3
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.1.2
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 11.1.2
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.1.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

$ xrandr 
Screen 0: minimum 8 x 8, current 4160 x 1440, maximum 32767 x 32767
LVDS1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 310mm x 174mm
   1600x900      60.04*+  40.02  
   1440x900      59.89  
   1368x768      60.00  
   1360x768      59.80    59.96  
   1152x864      60.00  
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   800x450       60.00  
   640x480       59.94  
   720x405       60.00  
   640x360       60.00  
DP1 connected primary 2560x1440+1600+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+  29.94  
   1920x1200     59.88  
   1920x1080     60.00    59.94  
   1600x1200     60.00  
   1280x1024     60.02  
   1280x960      60.00  
   1280x720      60.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x480       60.00    59.94  
   640x480       60.00    59.94    59.93  
   720x400       70.08  
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[KCrash Handler]
#6  0x00007f080c6b656d in KWin::XRandRScreens::update<KWin::Xcb::RandR::ScreenResources> (this=0xed9690) at /media/karry/data/src/kwin/screens_xrandr.cpp:76
#7  0x00007f080c6b5016 in KWin::XRandRScreens::init (this=0xed9690) at /media/karry/data/src/kwin/screens_xrandr.cpp:119
#8  0x00007f080c6b385d in KWin::Screens::create (parent=0x7ffeeef525d0) at /media/karry/data/src/kwin/screens.cpp:53
#9  0x00007f080c69fba5 in KWin::Application::createScreens (this=0x7ffeeef525d0) at /media/karry/data/src/kwin/main.cpp:391
#10 0x00007f080c61fff6 in KWin::Workspace::init (this=0xe09c90) at /media/karry/data/src/kwin/workspace.cpp:217
#11 0x00007f080c61fb42 in KWin::Workspace::Workspace (this=0xe09c90, sessionKey=...) at /media/karry/data/src/kwin/workspace.cpp:210
#12 0x00007f080c69fb2b in KWin::Application::createWorkspace (this=0x7ffeeef525d0) at /media/karry/data/src/kwin/main.cpp:374
#13 0x00007f080cf23bc2 in KWin::ApplicationX11::<lambda()>::operator()(void) const (__closure=0x7ffeeef51c20) at /media/karry/data/src/kwin/main_x11.cpp:182
#14 0x00007f080cf24e4e in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWin::ApplicationX11::performStartup()::<lambda()> >::call(KWin::ApplicationX11::<lambda()>, void **) (f=..., arg=0x7ffeeef51d80) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:495
#15 0x00007f080cf24dcf in QtPrivate::Functor<KWin::ApplicationX11::performStartup()::<lambda()>, 0>::call<QtPrivate::List<>, void>(KWin::ApplicationX11::<lambda()> &, void *, void **) (f=..., arg=0x7ffeeef51d80) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:552
#16 0x00007f080cf24d68 in QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0xd70370, r=0xd4d180, a=0x7ffeeef51d80, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:192
#17 0x00007f080b094e0f in QtPrivate::QSlotObjectBase::call (a=0x7ffeeef51d80, r=0xd4d180, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#18 QMetaObject::activate (sender=0xd4d180, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3698
#19 0x00007f080beda267 in KSelectionOwner::claimedOwnership (this=0xd4d180) at /media/karry/data/src/kwindowsystem/myBuild/src/moc_kselectionowner.cpp:150
#20 0x00007f080beb56d6 in KSelectionOwner::Private::claimSucceeded (this=0xd78f80) at /media/karry/data/src/kwindowsystem/src/platforms/xcb/kselectionowner.cpp:206
#21 0x00007f080beb580c in KSelectionOwner::Private::gotTimestamp (this=0xd78f80) at /media/karry/data/src/kwindowsystem/src/platforms/xcb/kselectionowner.cpp:240
#22 0x00007f080beb5e55 in KSelectionOwner::filterEvent (this=0xd4d180, ev_P=0x7f07f0001cd0) at /media/karry/data/src/kwindowsystem/src/platforms/xcb/kselectionowner.cpp:424
#23 0x00007f080beb6837 in KSelectionOwner::Private::nativeEventFilter (this=0xd78f80, eventType=..., message=0x7f07f0001cd0, result=0x7ffeeef51f58) at /media/karry/data/src/kwindowsystem/src/platforms/xcb/kselectionowner.cpp:117
#24 0x00007f080b062f1f in QAbstractEventDispatcher::filterNativeEvent (this=<optimized out>, eventType=..., message=message@entry=0x7f07f0001cd0, result=result@entry=0x7ffeeef51f58) at kernel/qabstracteventdispatcher.cpp:460
#25 0x00007f07f5ae5fb4 in QXcbConnection::handleXcbEvent (this=this@entry=0xceb4f0, event=event@entry=0x7f07f0001cd0) at qxcbconnection.cpp:1021
#26 0x00007f07f5ae6d63 in QXcbConnection::processXcbEvents (this=0xceb4f0) at qxcbconnection.cpp:1509
#27 0x00007f080b095e61 in QObject::event (this=0xceb4f0, e=<optimized out>) at kernel/qobject.cpp:1239
#28 0x00007f080b958ffc in QApplicationPrivate::notify_helper (this=this@entry=0xce41a0, receiver=receiver@entry=0xceb4f0, e=e@entry=0x7f07f00012c0) at kernel/qapplication.cpp:3716
#29 0x00007f080b95e4b6 in QApplication::notify (this=0x7ffeeef525d0, receiver=0xceb4f0, e=0x7f07f00012c0) at kernel/qapplication.cpp:3499
#30 0x00007f080cf23e5b in KWin::ApplicationX11::notify (this=0x7ffeeef525d0, o=0xceb4f0, e=0x7f07f00012c0) at /media/karry/data/src/kwin/main_x11.cpp:199
#31 0x00007f080b0665ab in QCoreApplication::notifyInternal (this=0x7ffeeef525d0, receiver=0xceb4f0, event=event@entry=0x7f07f00012c0) at kernel/qcoreapplication.cpp:965
#32 0x00007f080b0689a6 in QCoreApplication::sendEvent (event=0x7f07f00012c0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#33 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0xcd45f0) at kernel/qcoreapplication.cpp:1593
#34 0x00007f080b0b9fc2 in QEventDispatcherUNIX::processEvents (this=0xd1a1a0, flags=flags@entry=...) at kernel/qeventdispatcher_unix.cpp:579
#35 0x00007f07f5b4995d in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:62
#36 0x00007f080b063d6a in QEventLoop::exec (this=this@entry=0x7ffeeef524c0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#37 0x00007f080b06be0c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#38 0x00007f080cf2490b in kdemain (argc=3, argv=0x7ffeeef52758) at /media/karry/data/src/kwin/main_x11.cpp:324
#39 0x0000000000400888 in main (argc=3, argv=0x7ffeeef52758) at /media/karry/data/src/kwin/myBuild/kwin_x11_dummy.cpp:3

Reported using DrKonqi
Comment 1 Thomas Lübking 2016-02-19 11:38:08 UTC
crashy line seems:
   if (info->mode == modes[j].id) {

so either num_modes is bigger than the xcb_randr_get_screen_resources_modes return array or we're "somehow" loosing the xcb_randr_crtc_t payload (ie. info suddenly starts to dangle, it's used internally before to obtain the outputs)

Can you reproduce this (so we can check the accessed index)?
Comment 2 Lukáš Karas 2016-04-02 14:16:36 UTC
Sorry, it seems that it was random bug. I connect external monitor twice per day and it don't shows up again since then.
Comment 3 Thomas Lübking 2016-04-02 15:18:12 UTC
No problem =)