Bug 429494 - KWin breaks when running pacman updates that require DKMS post-transaction hooks
Summary: KWin breaks when running pacman updates that require DKMS post-transaction hooks
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.20.3
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2020-11-22 10:41 UTC by David Conner
Modified: 2022-12-03 05:20 UTC (History)
1 user (show)

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 David Conner 2020-11-22 10:41:52 UTC
Application: kwin_x11 (5.20.3)

Qt Version: 5.15.1
Frameworks Version: 5.76.0
Operating System: Linux 5.9.8-zen1-1-zen x86_64
Windowing system: X11
Distribution: Garuda Linux

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

Running `pacman -Syu` from within Garuda Linux. 

When it updates specific packages (that require rebuilding the kernel), KWin *always* crashes, then the windows effects (and shortcuts like Ctrl-F10, etc) are disabled until i re-enable compositing with NVidia. 

I know this is technically not completely within KWin, but if someone could help me understand why this is happening and how to address it, that would be awesome. I've included the output of the `pacman` DKMS modules post-transaction hook below.

- Unusual behavior I noticed:

when trying to move windows, the window manager slowed down, then stalled out completely. 

- Custom settings of the application:

Garuda configures the Linux Zen kernel with specific optimizations. Because of this, a dkms hook needs to run to update the nvidia drivers to be compatible with the Zen kernel. I use the Ctrl-F10, etc windows management shortcut keys all the time. I'm doing some C++ development, so having to reconfig KWin/etc (and the reboot) is a major pain. 



( 8/24) Install DKMS modules
==> dkms install --no-depmod -m broadcom-wl -v 6.30.223.271 -k 5.9.9-zen1-1-zen
==> dkms install --no-depmod -m steamos-xpad -v 20190810 -k 5.9.9-zen1-1-zen
==> dkms install --no-depmod -m nvidia -v 455.45.01 -k 5.9.9-zen1-1-zen
==> dkms install --no-depmod -m hid-xpadneo -v 0.8.r79.gb02f82d -k 5.9.9-zen1-1-zen
==> dkms install --no-depmod -m bcwc-pcie -v r245.82626d4 -k 5.9.9-zen1-1-zen
==> depmod 5.9.9-zen1-1-zen
( 9/24) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-zen.preset: 'default'
  -> -k /boot/vmlinuz-linux-zen -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-zen.img
==> Starting build: 5.9.9-zen1-1-zen
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [plymouth]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-zen.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-zen.preset: 'fallback'
  -> -k /boot/vmlinuz-linux-zen -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-zen-fallback.img -S autodetect
==> Starting build: 5.9.9-zen1-1-zen
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [plymouth]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Aborted

[KCrash Handler]
#4  0x00007f7b646b5615 in raise () at /usr/lib/libc.so.6
#5  0x00007f7b6469e862 in abort () at /usr/lib/libc.so.6
#6  0x00007f7b64ada9ac in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f7b638aea39 in QSGRenderLoop::handleContextCreationFailure(QQuickWindow*) () at /usr/lib/libQt5Quick.so.5
#8  0x00007f7b638affa0 in  () at /usr/lib/libQt5Quick.so.5
#9  0x00007f7b638b179a in  () at /usr/lib/libQt5Quick.so.5
#10 0x00007f7b650e2a15 in QWindow::event(QEvent*) () at /usr/lib/libQt5Gui.so.5
#11 0x00007f7b657c3752 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#12 0x00007f7b64cfdcda in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#13 0x00007f7b650d78a0 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /usr/lib/libQt5Gui.so.5
#14 0x00007f7b650abbac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#15 0x00007f7b5edb5386 in  () at /usr/lib/libQt5XcbQpa.so.5
#16 0x00007f7b64cfc65c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#17 0x00007f7b64d04af4 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#18 0x00005599b04ba412 in  ()
#19 0x00007f7b646a0152 in __libc_start_main () at /usr/lib/libc.so.6
#20 0x00005599b04ba94e in _start ()
[Inferior 1 (process 2417317) detached]

Possible duplicates by query: bug 429383, bug 429344, bug 429217, bug 429104, bug 428954.

Reported using DrKonqi
Comment 1 Nate Graham 2020-11-23 18:17:25 UTC
QSGRenderLoop::handleContextCreationFailure(QQuickWindow*)

Seems like it needs to re-init automatically when the graphics drivers are updated.
Comment 2 phd 2020-12-01 22:49:40 UTC
I'm not sure what makes KWin create another QtQuick GL context, there is
nothing that says this in the backtrack.
All other KDE apps that are already running do not crash even when the driver
becomes unavailable.
And I have never experienced running KWin crash in this situation either.

If we could locate the place where GL context is being created in KWin,
connecting to QQuickWindow::ContextNotAvailable signal should stop KWin from
crashing [1], and maybe let us handle the problem from here (fallback to
software and retry?).
Or we could simply do this fallback check before even allowing QtQuick to
create the new GL context.

[1] https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/scenegraph/qsgrenderloop.cpp?h=5.14.2#n331
Comment 3 Justin Zobel 2022-11-03 01:39:10 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-11-18 05:16:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-12-03 05:20:16 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!