384.69 Broke KDE Screen Locker, Possibly Other QT Based Software On Linux

https://bugs.kde.org/show_bug.cgi?id=384005

That is the bug report I filled with KDE with some backtraces of the segfault.

can confirm this one on Tumbleweed & 384.69

Same issue. KWIN, and other KDE seems really unstable couople last month where kwin crashes left and right with nvidia gpu. Now the Screen locker again fails with latest drivers.
nvidia-bug-report.log.gz (276 KB)

Hi all,
We are tracing this issue under 1981201 . Can you please run nvidia-bug-report.sh script as root/super/sudo user as soon as issue hit and attach generated nvidia bug report log file. Please provide issue reproduction steps. What user of KDE you are running ? Are the all ditros with KDE affected due to this issue?

Can you please provide a stack trace of the problem within GDB, as well as the output of “info proc mappings”?
Specific instructions to reproduce the problem would also be helpful.

nvidia-bug-report is in my post above from the affected driver.
The repro steps are quite simple at least for me.

1: launch system with latest KDE software (I am using Arch Linux with latest updates w/ KDE).
2: login into system and wait for the lock-screen to effect. (could probably lower the time for it to repro it faster, will try to trigger it manually and see if it needs the timeout or not later today).
3: Moving the mouse, to trigger the lock-screen will show a message to instead use systemctl unlock-sessions.

ahuillet > info proc mappings.
I’m quite blue in this but what do you mean cat /proc/PID/maps ?

sandipt > What user of KDE you are running ? Are the all ditros with KDE affected due to this issue?
I’m using ArchLinux with my default non root user with my system. So far it seems it’s confirmed in Archlinux, openSUSE, and KDE NEON.

Seems related: https://blog.martin-graesslin.com/blog/2017/08/warning-nvidia-driver-384-69-seems-to-be-broken-with-qtquick/

I meant the “info proc mappings” command in GDB, but cat /proc//maps contains similar information.
As you need to produce this along with a backtrace (due to ASLR, the addresses will change across runs), it’s best to do everything in GDB at the same time.
So, please reproduce the problem again, and then in GDB:

  • thread apply bt
  • info proc mappings

Thank you

My bug report on KDE’s bug tracker had some backtraces, but I’ll post them here as well:

here is a raw pastebin since I don’t know how to make attachments: https://pastebin.com/raw/SjzVuDjZ

Thread 5 "QSGRenderThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd4d5a700 (LWP 18198)]
0x00007fffdedffc02 in ?? () from /usr/lib/nvidia-384/libnvidia-glcore.so.384.69
(gdb) thread 5 apply bt 
[Switching to thread 5 (Thread 0x7fffd4d5a700 (LWP 18198))]
#0  0x00007fffdedffc02 in ?? () from /usr/lib/nvidia-384/libnvidia-glcore.so.384.69
(gdb) info proc mappings
process 18192
Mapped address spaces:

          Start Addr           End Addr       Size     Offset objfile
            0x400000           0x41b000    0x1b000        0x0 /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet
            0x61a000           0x61b000     0x1000    0x1a000 /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet
            0x61b000           0x61c000     0x1000    0x1b000 /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet
            0x61c000           0xc04000   0x5e8000        0x0 [heap]
          0x40000000         0x400a1000    0xa1000        0x0 
          0x400a1000         0x400a3000     0x2000        0x0 
      0x7fffcc000000     0x7fffcca39000   0xa39000        0x0 
      0x7fffcca39000     0x7fffd0000000  0x35c7000        0x0 
      0x7fffd0000000     0x7fffd008e000    0x8e000        0x0 
      0x7fffd008e000     0x7fffd4000000  0x3f72000        0x0 
      0x7fffd455a000     0x7fffd455b000     0x1000        0x0 
      0x7fffd455b000     0x7fffd4d5b000   0x800000        0x0 
      0x7fffd4d5b000     0x7fffd4d77000    0x1c000        0x0 /usr/lib/x86_64-linux-gnu/libkworkspace5.so.5.10.5
      0x7fffd4d77000     0x7fffd4f76000   0x1ff000    0x1c000 /usr/lib/x86_64-linux-gnu/libkworkspace5.so.5.10.5
      0x7fffd4f76000     0x7fffd4f77000     0x1000    0x1b000 /usr/lib/x86_64-linux-gnu/libkworkspace5.so.5.10.5
      0x7fffd4f77000     0x7fffd4f78000     0x1000    0x1c000 /usr/lib/x86_64-linux-gnu/libkworkspace5.so.5.10.5
      0x7fffd4f78000     0x7fffd4f86000     0xe000        0x0 /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/private/sessions/libsessionsprivateplugin.so
      0x7fffd4f86000     0x7fffd5186000   0x200000     0xe000 /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/private/sessions/libsessionsprivateplugin.so
      0x7fffd5186000     0x7fffd5187000     0x1000     0xe000 /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/private/sessions/libsessionsprivateplugin.so
      0x7fffd5187000     0x7fffd5188000     0x1000     0xf000 /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/private/sessions/libsessionsprivateplugin.so
      0x7fffd5188000     0x7fffd5241000    0xb9000        0x0 /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
      0x7fffd5241000     0x7fffd5c51000   0xa10000        0x0 
      0x7fffd5c51000     0x7fffd5c6e000    0x1d000        0x0 /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so
      0x7fffd5c6e000     0x7fffd5e6d000   0x1ff000    0x1d000 /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so
      0x7fffd5e6d000     0x7fffd5e6e000     0x1000    0x1c000 /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so
      0x7fffd5e6e000     0x7fffd5e6f000     0x1000    0x1d000 /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so
      0x7fffd5e6f000     0x7fffd5e99000    0x2a000        0x0 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
      0x7fffd5e99000     0x7fffd6099000   0x200000    0x2a000 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
      0x7fffd6099000     0x7fffd609a000     0x1000    0x2a000 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
      0x7fffd609a000     0x7fffd609b000     0x1000    0x2b000 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
      0x7fffd609b000     0x7fffd60a2000     0x7000        0x0 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
      0x7fffd60a2000     0x7fffd62a2000   0x200000     0x7000 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
      0x7fffd62a2000     0x7fffd62a3000     0x1000     0x7000 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
      0x7fffd62a3000     0x7fffd62a4000     0x1000     0x8000 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
      0x7fffd62a4000     0x7fffd62bb000    0x17000        0x0 /lib/x86_64-linux-gnu/libresolv-2.23.so
      0x7fffd62bb000     0x7fffd64bb000   0x200000    0x17000 /lib/x86_64-linux-gnu/libresolv-2.23.so
      0x7fffd64bb000     0x7fffd64bc000     0x1000    0x17000 /lib/x86_64-linux-gnu/libresolv-2.23.so
      0x7fffd64bc000     0x7fffd64bd000     0x1000    0x18000 /lib/x86_64-linux-gnu/libresolv-2.23.so
      0x7fffd64bd000     0x7fffd64bf000     0x2000        0x0 
      0x7fffd64bf000     0x7fffd654c000    0x8d000        0x0 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
      0x7fffd654c000     0x7fffd674b000   0x1ff000    0x8d000 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
      0x7fffd674b000     0x7fffd6767000    0x1c000    0x8c000 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
      0x7fffd6767000     0x7fffd6768000     0x1000    0xa8000 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
      0x7fffd6768000     0x7fffd67db000    0x73000        0x0 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
      0x7fffd67db000     0x7fffd69db000   0x200000    0x73000 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
      0x7fffd69db000     0x7fffd69dc000     0x1000    0x73000 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
      0x7fffd69dc000     0x7fffd69dd000     0x1000    0x74000 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0

Also an easier way to reproduce is to launch kscreen in test mode from the desktop. On ubuntu / debian based systems this would be

/usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet --testing

There is no libnvidia-glcore.so in the list of mappings. Is it truncated? It should not be.
Similarly, your backtrace only has one frame, which is unexpected.

Hi all, What did you see on display when Broke KDE Screen Locker? Can I get photo of display? which process you are hooking gdb to get trace? Can we get back trace?

I cannot reproduce that with qt-5.7.1 / kde-plasma 5.10.5 / kde-frameworks 5.37.0.
Screenlocker starts and stops without issues:

# /usr/lib64/libexec/kscreenlocker_greet --testing
Locked at 1503940080
UdevQt: unable to create udev monitor connection
WARNING: Cannot find style "org.kde.desktop" - fallback: "/usr/lib64/qt5/qml/QtQuick/Controls/Styles/Base"
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
file:///usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/components/VirtualKeyboard.qml:20:1: module "QtQuick.VirtualKeyboard" is not installed
# echo $?
0
# glxinfo | grep -i nvidia
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL core profile version string: 4.5.0 NVIDIA 384.69
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL version string: 4.5.0 NVIDIA 384.69
OpenGL shading language version string: 4.50 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 384.69

This is the first time I’m using GDB, so I’ll just post my process for review

# gdb /usr/lib64/libexec/kscreenlocker_greet
(gdb) r --testing
(gdb) thread 5 apply bt
(gdb) info proc mappings

Ok, Just realize that “enter to continue” is for all of the info.

backtrace: https://pastebin.com/raw/A3wRwkTn
mapping: https://pastebin.com/raw/q1s0i0VB

sorry for messing it up the first time

Thank you. We have a local reproduction of the problem and are investigating.
Previous versions of KDE/Plasma appear not to be affected, it looks like a sandboxing mechanism was integrated in latest Plasma and that interacts with changes in the driver.

I’m affected on Kubuntu 17.04 using KDE Backports

Plasma 5.10.5
Frameworks 5.37.0
Qt 5.7.1

Sadly I seem to be hit by a gdb bug (https://sourceware.org/gdb/wiki/FAQ#GDB_reports_.22Cannot_find_user-level_thread_for_LWP_23957:_generic_error.22.2C_how_do_I_fix_this.3F) and don’t know how to proceed to get a backtrace.

(gdb) set pagination off
(gdb) r --testing
Starting program: /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet --testing
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Cannot find user-level thread for LWP 5491: generic error
(gdb) thread apply all bt

Thread 1 (process 5491):
Selected thread is running.

If you saw my bug report on KDE, you would see that I got the same issue. You have to run gbd as root for some reason (I don’t know if this is correct, but it worked.)

It’s now fixed upstream with an emergency patch kscreenlocker 5.10.5.1.

Hello,
We have same problem.
Here the stack

#0 0x00007f146c4c81f7 in raise () from /lib64/libc.so.6
#1 0x00007f146c4c98e8 in abort () from /lib64/libc.so.6
#2 0x00007f146c507f47 in __libc_message () from /lib64/libc.so.6
#3 0x00007f146c50f619 in _int_free () from /lib64/libc.so.6
#4 0x00007f142a1737b1 in ?? () from /lib64/libGLX_nvidia.so.0
#5 0x00007f14290693c2 in ?? () from /lib64/libnvidia-glcore.so.384.90
#6 0x00007f1429069780 in ?? () from /lib64/libnvidia-glcore.so.384.90
#7 0x00007f14722908bd in QSGBatchRenderer::Renderer::renderMergedBatch(QSGBatchRenderer::Batch const*) () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#8 0x00007f147229202d in QSGBatchRenderer::Renderer::renderBatches() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#9 0x00007f1472297c26 in QSGBatchRenderer::Renderer::render() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#10 0x00007f147228706a in QSGRenderer::renderScene(QSGBindable const&) () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#11 0x00007f14722c7846 in QSGDefaultLayer::grab() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#12 0x00007f14722c7d15 in QSGDefaultLayer::updateTexture() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#13 0x00007f14723fb7e6 in QQuickOpenGLShaderEffectMaterial::updateTextures() const () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#14 0x00007f1472286ca0 in QSGRenderer::preprocess() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#15 0x00007f1472287031 in QSGRenderer::renderScene(QSGBindable const&) () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#16 0x00007f14722c7846 in QSGDefaultLayer::grab() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#17 0x00007f14722c7d15 in QSGDefaultLayer::updateTexture() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#18 0x00007f14722b2e49 in QSGBasicInternalImageNode::preprocess() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#19 0x00007f1472286ca0 in QSGRenderer::preprocess() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#20 0x00007f1472287031 in QSGRenderer::renderScene(QSGBindable const&) () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#21 0x00007f14722874eb in QSGRenderer::renderScene(unsigned int) () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#22 0x00007f14722c0f2e in QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#23 0x00007f1472318c93 in QQuickWindowPrivate::renderSceneGraph(QSize const&) () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#24 0x00007f14722ca908 in QSGRenderThread::syncAndRender() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#25 0x00007f14722cb4dc in QSGRenderThread::run() () from /opt/evs/qt5/lib64/libQt5Quick.so.5
#26 0x00007f146d800d8d in QThreadPrivate::start(void*) () from /opt/evs/qt5/lib64/libQt5Core.so.5
#27 0x00007f147458ce25 in start_thread () from /lib64/libpthread.so.0
#28 0x00007f146c58b34d in clone () from /lib64/libc.so.6
(gdb)