Bug 489643 - On X11 with NVIDIA GPU, Plasma shell crashes in QOpenGLContext::isValid() after unlocking
Summary: On X11 with NVIDIA GPU, Plasma shell crashes in QOpenGLContext::isValid() aft...
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (show other bugs)
Version: 6.1.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL: https://codereview.qt-project.org/c/q...
Keywords: drkonqi
: 489749 492140 496885 497288 498933 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-07-03 00:08 UTC by knoppmyth
Modified: 2025-01-21 20:53 UTC (History)
9 users (show)

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


Attachments
New crash information added by DrKonqi (127.90 KB, text/plain)
2024-07-03 00:08 UTC, knoppmyth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description knoppmyth 2024-07-03 00:08:14 UTC
Application: plasmashell (6.1.1)

Qt Version: 6.7.2
Frameworks Version: 6.3.0
Operating System: Linux 6.9.7-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 6.1.1 [CoredumpBackend]

-- Information about the crash:
System was locked. After unlocking, shell crashed.

The reporter is unsure if this crash is reproducible.

-- Backtrace (Reduced):
#5  QOpenGLContext::isValid (this=0x784600000e30) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:504
#6  QOpenGLContext::doneCurrent (this=0x784600000e30) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:730
#7  0x00007846c00ae072 in QGuiGLThreadContext::~QGuiGLThreadContext (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:35
#8  qThreadStorage_deleteData<QGuiGLThreadContext> (d=0x7846ac01b250) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthreadstorage.h:56
#9  QThreadStorage<QGuiGLThreadContext*>::deleteData (x=0x7846ac01b250) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthreadstorage.h:99


Reported using DrKonqi
Comment 1 knoppmyth 2024-07-03 00:08:16 UTC
Created attachment 171314 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Nate Graham 2024-07-03 17:34:36 UTC
Thread 1 (Thread 0x7845ce8006c0 (LWP 996387)):
[KCrash Handler]
#5  QOpenGLContext::isValid (this=0x784600000e30) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:504
#6  QOpenGLContext::doneCurrent (this=0x784600000e30) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:730
#7  0x00007846c00ae072 in QGuiGLThreadContext::~QGuiGLThreadContext (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:35
#8  qThreadStorage_deleteData<QGuiGLThreadContext> (d=0x7846ac01b250) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthreadstorage.h:56
#9  QThreadStorage<QGuiGLThreadContext*>::deleteData (x=0x7846ac01b250) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthreadstorage.h:99
#10 0x00007846bf8d1a4c in QThreadStorageData::finish (p=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthreadstorage.cpp:164
#11 QThreadStorageData::finish (p=0x595c05826c18) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthreadstorage.cpp:135
#12 0x00007846bfa0b270 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:351
#13 (anonymous namespace)::terminate_on_exception<QThreadPrivate::finish(void*)::{lambda()#1}>(QThreadPrivate::finish(void*)::{lambda()#1}&&) [clone .isra.0] (t=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:262
#14 0x00007846bf8c9754 in QThreadPrivate::finish (arg=0x595c07c58f40) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:339
#15 __pthread_cleanup_class::~__pthread_cleanup_class (this=<optimized out>, this=<optimized out>) at /usr/include/pthread.h:578
#16 QThreadPrivate::start (arg=0x595c07c58f40) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:332
#17 0x00007846bf0a6ded in start_thread (arg=<optimized out>) at pthread_create.c:447
#18 0x00007846bf12a0dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Comment 3 TraceyC 2024-07-11 17:22:10 UTC
*** Bug 489749 has been marked as a duplicate of this bug. ***
Comment 4 TraceyC 2024-07-11 17:22:51 UTC
Confirming since there's another report with a similar backtrace
Comment 5 TraceyC 2024-07-16 13:59:48 UTC
*** Bug 489749 has been marked as a duplicate of this bug. ***
Comment 6 knoppmyth 2024-08-10 02:07:14 UTC
I believe the root cause of this issue relates to power management. If I disable it, I don't have the issue if the system isn't used for a period of time. Of course with power management disabled, I have to manually lock the desktop (Why cannot the desktop lock automatically and independently of power management?).
Comment 7 Nate Graham 2024-08-13 21:50:26 UTC
What kind of GPU does this system have?
Comment 8 knoppmyth 2024-08-13 22:03:22 UTC
Nvidia RTX 2070 super.
Comment 9 Nate Graham 2024-08-14 22:26:55 UTC
Heh, now I don't remember why I wanted to know that! Thanks anyway.

How exactly did you disable power management? By clicking on the switch in the widget, or killing/stopping the Powerdevil service, or something else?
Comment 10 knoppmyth 2024-08-15 01:15:48 UTC
I pressed the middle mouse button on the widget on the panel.
Comment 11 Normie 2024-08-15 10:39:16 UTC
I tried method which was described by knoppmyth@gmail.com and this time my external display showed stated of my desktop but I was unable to interact with it. But keyboard worked and I was able to logout to fix the issue.
I dont know if its relevant but I use optimus-manager to switch between integrated and Nvidia GPU.
Comment 12 Normie 2024-08-20 09:51:43 UTC Comment hidden (spam)
Comment 13 Nate Graham 2024-08-20 22:03:35 UTC Comment hidden (spam)
Comment 14 Normie 2024-08-21 01:30:03 UTC Comment hidden (spam)
Comment 15 Nate Graham 2024-08-21 04:17:20 UTC Comment hidden (spam)
Comment 16 Normie 2024-08-21 04:38:55 UTC Comment hidden (spam)
Comment 17 Nate Graham 2024-08-21 15:08:45 UTC Comment hidden (spam)
Comment 18 knoppmyth 2024-08-22 03:44:30 UTC
Whenever I rebooted, Power Management defaults to being On. How can I set it to be off by default?
Comment 19 Nate Graham 2024-08-22 15:39:13 UTC
`systemctl mask --user plasma-powerdevil.service` ought to do it as a workaround. You'll lose all KDE-provided power management features, though, and this may also intropduce other bugs as it's not a valid and supported configuration. So please tread carefully and don't open new bugzilla tickets for other power-related issues you encounter while in this state.
Comment 20 knoppmyth 2024-08-26 00:55:33 UTC
After a reboot today, I forgot to disable power management. I did note that logging in did seem snappy that it had been in the past when the crash was occurring. I'll keep power management on and continue to monitor.
Comment 21 Nate Graham 2024-08-27 21:03:40 UTC
*** Bug 492140 has been marked as a duplicate of this bug. ***
Comment 22 Luis Felipe Domínguez Vega 2024-08-27 22:25:41 UTC
I'm using nvidia RTX 3060 (Open Source one, not nouveau) Mobile:
license:        Dual MIT/GPL
version:        555.58.02
Only using my external monitor using DisplayPort
Laptop ThinkBook 16p Gen 2
Comment 23 TraceyC 2024-12-09 22:16:30 UTC
*** Bug 496885 has been marked as a duplicate of this bug. ***
Comment 24 TraceyC 2024-12-19 22:19:57 UTC
*** Bug 497288 has been marked as a duplicate of this bug. ***
Comment 25 Nate Graham 2025-01-15 03:45:36 UTC
Is everyone experiencing this using X11, or does anyone see it on Wayland too?
Comment 26 Aaron Bockelie 2025-01-15 13:22:26 UTC
(In reply to Nate Graham from comment #25)
> Is everyone experiencing this using X11, or does anyone see it on Wayland
> too?

I get a variant of this on Wayland, where the shell crashes and recovers. I haven't been able to get a bug report of this behavior because many of my applications do not run correctly on W so I'm mostly using X.
Comment 27 David Redondo 2025-01-15 14:04:00 UTC
I believe it's an upstream issue: https://codereview.qt-project.org/c/qt/qtbase/+/617247
Comment 28 Nate Graham 2025-01-15 18:37:25 UTC
Nice!
Comment 29 knoppmyth 2025-01-16 00:26:43 UTC
(In reply to Nate Graham from comment #25)
> Is everyone experiencing this using X11, or does anyone see it on Wayland
> too?

I've only got it on X11. As Wayland doesn't save sessions, it is a non-starter for me.
Comment 30 Nate Graham 2025-01-21 20:53:44 UTC
*** Bug 498933 has been marked as a duplicate of this bug. ***