Bug 364341

Summary: KWin crashed after switching from another virtual console
Product: [Plasma] kwin Reporter: Roman Rybako <devel>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: minor Keywords: drkonqi
Priority: NOR Flags: thomas.luebking: NVIDIA+
Version: 5.5.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=344326
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Roman Rybako 2016-06-15 11:51:30 UTC
Application: kwin_x11 (5.5.5)

Qt Version: 5.5.1
Operating System: Linux 4.4.0-22-generic x86_64
Distribution: Ubuntu 16.04 LTS

-- Information about the crash:
- What I was doing when the application crashed:
Switch to a text console: Alt-F2
Switch to the X console: Alt-F7
Crash & relaunch.

- Custom settings of the application:
Kernel Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-22-generic.efi.signed root=UUID=xxx ro nomodeset
Using nvidia-current 304.131-0ubuntu3 video driver.
UEFI boot.
Using efifb framebuffer.
When I used nouveau/nouveaufb there wasn't such issue.

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f35e520d940 (LWP 4880))]

Thread 4 (Thread 0x7f35c3fff700 (LWP 4886)):
#0  0x00007f35e4cfbd13 in select () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f35e350010f in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f35e3501c0e in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f35e350213e in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f35e34abdea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f35e32c88a4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f35dddde3c5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007f35e32cd84e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f35db7a6754 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#9  0x00007f35dec816fa in start_thread (arg=0x7f35c3fff700) at pthread_create.c:333
#10 0x00007f35e4d05b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f35c1c77700 (LWP 4888)):
#0  0x00007f35e4cfbd13 in select () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f35e350010f in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f35e3501c0e in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f35e350213e in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f35e34abdea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f35e32c88a4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f35dddde3c5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007f35e32cd84e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f35db7a6754 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#9  0x00007f35dec816fa in start_thread (arg=0x7f35c1c77700) at pthread_create.c:333
#10 0x00007f35e4d05b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f359ffff700 (LWP 4890)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f35e2455bd4 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#2  0x00007f35e2455c19 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#3  0x00007f35db7a6754 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#4  0x00007f35dec816fa in start_thread (arg=0x7f359ffff700) at pthread_create.c:333
#5  0x00007f35e4d05b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f35e520d940 (LWP 4880)):
[KCrash Handler]
#6  0x00007f35d4d223a3 in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#7  0x00007f35d4cacc99 in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#8  0x00007f35d4ee564f in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#9  0x00007f35d4ee599b in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#10 0x00007f35d4e8cce9 in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#11 0x00007f35d4e70a98 in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#12 0x00007f35db776a50 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#13 0x00007f35db77eb7a in ?? () from /usr/lib/nvidia-304/libGL.so.1
#14 0x00007f35d4c6cd45 in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#15 0x00007f35d4c6cf3d in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#16 0x00007f35d4c6d020 in ?? () from /usr/lib/nvidia-304/libnvidia-glcore.so.304.131
#17 0x00007f35de82afa7 in KWin::GLRenderTarget::enable() () from /usr/lib/x86_64-linux-gnu/libkwinglutils.so.7
#18 0x00007f35de82dbae in KWin::GLRenderTarget::pushRenderTarget(KWin::GLRenderTarget*) () from /usr/lib/x86_64-linux-gnu/libkwinglutils.so.7
#19 0x00007f35de82dfd7 in KWin::GLRenderTarget::attachTexture(KWin::GLTexture const&) () from /usr/lib/x86_64-linux-gnu/libkwinglutils.so.7
#20 0x00007f35e25893f2 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin4_effect_builtins.so.1
#21 0x00007f35e258a58c in ?? () from /usr/lib/x86_64-linux-gnu/libkwin4_effect_builtins.so.1
#22 0x00007f35e48c852e in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#23 0x00007f35e489b491 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#24 0x00007f35e48c83da in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#25 0x00007f35e2a63b21 in KWin::Effect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwineffects.so.7
#26 0x00007f35e48c837e in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#27 0x00007f35e2a63b21 in KWin::Effect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwineffects.so.7
#28 0x00007f35e48c837e in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#29 0x00007f35e48a0828 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#30 0x00007f35e489fef3 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#31 0x00007f35e48b1993 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#32 0x00007f35e489ae64 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#33 0x00007f35e48c815f in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#34 0x00007f35e2a63a6f in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwineffects.so.7
#35 0x00007f35e48c810a in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#36 0x00007f35e2a63a6f in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwineffects.so.7
#37 0x00007f35e48c810a in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#38 0x00007f35e489aada in ?? () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#39 0x00007f35e48b73c0 in ?? () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#40 0x00007f35e48927f9 in KWin::Compositor::performCompositing() () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#41 0x00007f35e34dde53 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007f35e3da105c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#43 0x00007f35e3da6516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007f35e34ae62b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#45 0x00007f35e350389d in QTimerInfoList::activateTimers() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#46 0x00007f35e35020b6 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#47 0x00007f35cc1434ed in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#48 0x00007f35e34abdea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#49 0x00007f35e34b3e8c in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007f35e4fcd504 in kdemain () from /usr/lib/x86_64-linux-gnu/libkdeinit5_kwin_x11.so
#51 0x00007f35e4c1f830 in __libc_start_main (main=0x400780 <main>, argc=3, argv=0x7ffe662d4da8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe662d4d98) at ../csu/libc-start.c:291
#52 0x00000000004007b9 in _start ()

Reported using DrKonqi
Comment 1 Roman Rybako 2016-06-15 11:56:03 UTC
Seems this is not a KDE-related issue.
Comment 2 Thomas Lübking 2016-06-15 12:27:47 UTC
deeeeeeeeeeeeep in nvidia, *might* be bug #344326 (probably is, but no guarantee for the lack of debug symbols in the nvidia blob)

nb: nvidia doesn't support framebuffer consoles, check "dmesg | grep -i nvrm" and if it complains about fb consoles being used, see https://wiki.archlinux.org/index.php/GRUB/Tips_and_tricks#Disable_framebuffer (works on ubuntu as well)
Comment 3 Roman Rybako 2016-06-27 09:07:47 UTC
Workaround: fixed by switching Compositor to XRender backend (System Settings -> Display & Monitor -> Compositor -> Rendering backend)