Summary: | Crash on sleep | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Aleix Pol <aleixpol> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alois1, nate, ongun.kanat |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/commit/b3ddb11b7cf8f9a817142903fa356bf764691cf7 | Version Fixed In: | 5.22 |
Sentry Crash Report: |
Description
Aleix Pol
2021-04-19 22:29:08 UTC
Seems related to the crash I got today after enabling a monitor. I'm using openSUSE Tumbleweed with Plasma 5.21.4 and Wayland. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 #1 0x00007f119c2d3914 in __GI_abort () at abort.c:100 #2 0x00007f119c2d3749 in __assert_fail_base (fmt=0x7f1195ac6554 "%s%s%s:%u: %s%sZusicherung »%s« nicht erfüllt.\n%n", assertion=0x7f119c835750 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=0x7f119c835829 "../src/dispatch_common.c", line=858, function=<optimized out>) at assert.c:92 #3 0x00007f119c2e29b6 in __GI___assert_fail (assertion=assertion@entry=0x7f119c835750 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=file@entry=0x7f119c835829 "../src/dispatch_common.c", line=line@entry=858, function=function@entry=0x7f119c835c80 <__PRETTY_FUNCTION__.0.lto_priv.0> "epoxy_get_proc_address") at assert.c:101 #4 0x00007f119c811df7 in epoxy_get_proc_address (name=0x7f119c81c139 <entrypoint_strings.lto_priv+9849> "glDeleteProgram") at ../src/dispatch_common.c:858 #5 0x00007f119c7c105a in epoxy_glDeleteProgram_resolver () at src/gl_generated_dispatch.c:81668 #6 epoxy_glDeleteProgram_global_rewrite_ptr (program=31) at src/gl_generated_dispatch.c:49458 #7 0x00007f11947aca30 in QScopedPointerDeleter<KWin::GLShader>::cleanup(KWin::GLShader*) (pointer=0x5601a20850d0) at /usr/include/qt5/QtCore/qscopedpointer.h:52 #8 QScopedPointerDeleter<KWin::GLShader>::cleanup(KWin::GLShader*) (pointer=0x5601a20850d0) at /usr/include/qt5/QtCore/qscopedpointer.h:52 #9 QScopedPointer<KWin::GLShader, QScopedPointerDeleter<KWin::GLShader> >::~QScopedPointer() (this=0x5601a2182fe8, this=<optimized out>) at /usr/include/qt5/QtCore/qscopedpointer.h:107 #10 KWin::LanczosFilter::~LanczosFilter() (this=0x5601a2182fc0, this=<optimized out>) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/scenes/opengl/lanczosfilter.cpp:47 #11 0x00007f11947b7cc0 in KWin::LanczosFilter::~LanczosFilter() (this=0x5601a2182fc0, this=<optimized out>) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/scenes/opengl/lanczosfilter.cpp:47 #12 operator() (__closure=0x5601a1ccd220) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/scenes/opengl/scene_opengl.cpp:1042 #13 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, const QRegion&, KWin::WindowPaintData&)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:146 #14 QtPrivate::Functor<KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, const QRegion&, KWin::WindowPaintData&)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:256 #15 QtPrivate::QFunctorSlotObject<KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, const QRegion&, KWin::WindowPaintData&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x5601a1ccd210, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:443 #16 0x00007f119ddb2c17 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffbe025f00, r=0x5601a0e7c770, this=0x5601a1ccd210) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #17 doActivate<false>(QObject*, int, void**) (sender=0x5601a0b99820, signal_index=4, argv=0x7fffbe025f00) at kernel/qobject.cpp:3886 #18 0x00007f119ddb2c17 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffbe025fe0, r=0x5601a0b99820, this=0x5601a0baaff0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #19 doActivate<false>(QObject*, int, void**) (sender=0x5601a0a55f60, signal_index=3, argv=0x7fffbe025fe0, argv@entry=0x0) at kernel/qobject.cpp:3886 #20 0x00007f119ddabf60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x5601a0a55f60, m=m@entry=0x7f119da8e100, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946 #21 0x00007f119d838a30 in KWin::Platform::screensQueried() (this=this@entry=0x5601a0a55f60) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/build/kwin_autogen/EWIEGA46WW/moc_platform.cpp:359 #22 0x00007f1196333232 in KWin::DrmBackend::enableOutput(KWin::DrmOutput*, bool) (this=0x5601a0a55f60, output=<optimized out>, enable=<optimized out>) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/platforms/drm/drm_backend.cpp:521 #23 0x00007f119634275c in KWin::DrmOutput::atomicEnable() (this=<optimized out>) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/platforms/drm/drm_output.cpp:488 #24 0x00007f119d8f39f0 in KWin::Platform::requestOutputsChange(KWaylandServer::OutputConfigurationInterface*) (this=0x5601a0a55f60, config=0x5601a2c5f060) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/platform.cpp:135 #25 0x00007f119ddb2c17 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffbe026240, r=0x5601a0a3b7e0, this=0x5601a0a6e3b0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #26 doActivate<false>(QObject*, int, void**) (sender=0x5601a0a6e2c0, signal_index=4, argv=argv@entry=0x7fffbe026240) at kernel/qobject.cpp:3886 #27 0x00007f119ddabf60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=<optimized out>, m=m@entry=0x7f119ca213c0 <KWaylandServer::OutputManagementInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffbe026240) at kernel/qobject.cpp:3946 #28 0x00007f119c933e6f in KWaylandServer::OutputManagementInterface::configurationChangeRequested(KWaylandServer::OutputConfigurationInterface*) (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kwayland-server-5.21.4-1.1.x86_64/build/src/server/KWaylandServer_autogen/EWIEGA46WW/moc_outputmanagement_interface.cpp:136 #29 0x00007f11994be42d in ffi_call_unix64 () at ../src/x86/unix64.S:106 #30 0x00007f11994ba4f9 in ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:669 #31 0x00007f1199fad005 in wl_closure_invoke (closure=closure@entry=0x5601a2b12240, target=<optimized out>, target@entry=0x5601a23238e0, opcode=opcode@entry=5, data=<optimized out>, data@entry=0x5601a2c623f0, flags=<optimized out>) at src/connection.c:1018 #32 0x00007f1199fb0edc in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at src/wayland-server.c:432 #33 0x00007f1199fafad2 in wl_event_loop_dispatch (loop=0x5601a0a5f840, timeout=timeout@entry=0) at src/event-loop.c:1027 #34 0x00007f119c9488b6 in KWaylandServer::Display::dispatchEvents() (this=<optimized out>) at /usr/src/debug/kwayland-server-5.21.4-1.1.x86_64/src/server/display.cpp:107 #35 0x00007f119ddb2c17 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffbe026a90, r=0x5601a0a5f440, this=0x5601a13e06c0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #36 doActivate<false>(QObject*, int, void**) (sender=0x5601a0a62b50, signal_index=3, argv=argv@entry=0x7fffbe026a90) at kernel/qobject.cpp:3886 #37 0x00007f119ddabf60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x5601a0a62b50, m=m@entry=0x7f119e061a60, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffbe026a90) at kernel/qobject.cpp:3946 #38 0x00007f119ddb60bf in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=this@entry=0x5601a0a62b50, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178 #39 0x00007f119ddb68bb in QSocketNotifier::event(QEvent*) (this=0x5601a0a62b50, e=0x7fffbe026ba0) at kernel/qsocketnotifier.cpp:302 #40 0x00007f119cd84aff in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5601a0a62b50, e=0x7fffbe026ba0) at kernel/qapplication.cpp:3632 #41 0x00007f119dd7c13a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5601a0a62b50, event=0x7fffbe026ba0) at kernel/qcoreapplication.cpp:1063 #42 0x00007f119ddd109b in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x5601a0a19f00) at kernel/qeventdispatcher_unix.cpp:304 #43 0x00007f119ddd14f3 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:511 #44 0x000056019ffa0dad in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at qunixeventdispatcher.cpp:63 #45 0x00007f119dd7ab7b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffbe026d30, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69 #46 0x00007f119dd82db0 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121 #47 0x00007f119e1dda9c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1867 #48 0x00007f119cd84a75 in QApplication::exec() () at kernel/qapplication.cpp:2824 #49 0x000056019ff4e53c in main(int, char**) (argc=<optimized out>, argv=0x7fffbe026f70) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/main_wayland.cpp:788 I've been testing a bit further with the suggested branch, it didn't really make a difference. I've seen my amdgpu@kernel freak out over it, so it might just be an issue there. [ 208.208074] divide error: 0000 [#1] PREEMPT SMP NOPTI [ 208.208078] CPU: 3 PID: 2137 Comm: kwin_wayland Tainted: G OE 5.11.15-arch1-2 #1 [ 208.208080] Hardware name: ASUS System Product Name/PRIME B550-PLUS, BIOS 1401 12/03/2020 [ 208.208081] RIP: 0010:amdgpu_dm_atomic_check+0x46c/0xcc0 [amdgpu] [ 208.208202] Code: 48 83 7e 10 00 74 5b 69 46 28 e8 03 00 00 44 0f b7 4e 3e 31 d2 41 f7 f1 45 0f b7 48 3e 31 d2 41 89 c3 41 69 40 28 e8 03 00 00 <41> f7 f1 41 39 c3 0f 85 22 08 00 00 69 46 2c e8 03 00 00 0f b7 76 [ 208.208203] RSP: 0018:ffffba5bc19c7be8 EFLAGS: 00010246 [ 208.208205] RAX: 0000000000000000 RBX: ffffba5bc19c7c17 RCX: ffff9ca0ff4a8838 [ 208.208206] RDX: 0000000000000000 RSI: ffff9ca103e27e00 RDI: ffff9ca0ff4a8918 [ 208.208207] RBP: ffff9ca10cc91600 R08: ffff9ca103e269c0 R09: 0000000000000000 [ 208.208208] R10: 0000000000000000 R11: 00000000000003e8 R12: 0000000000000000 [ 208.208208] R13: ffff9ca0ff4aa000 R14: 0000000000000000 R15: 0000000000000000 [ 208.208210] FS: 00007f64b8d188c0(0000) GS:ffff9ca78e8c0000(0000) knlGS:0000000000000000 [ 208.208211] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 208.208212] CR2: 00007f63ea187000 CR3: 00000001101ea000 CR4: 0000000000350ee0 [ 208.208213] Call Trace: [ 208.208217] drm_atomic_check_only+0x5db/0x8d0 [drm] [ 208.208236] drm_mode_atomic_ioctl+0x724/0xaf0 [drm] [ 208.208252] ? drm_atomic_set_property+0xb30/0xb30 [drm] [ 208.208265] drm_ioctl_kernel+0xb2/0x100 [drm] [ 208.208279] drm_ioctl+0x215/0x390 [drm] [ 208.208293] ? drm_atomic_set_property+0xb30/0xb30 [drm] [ 208.208307] amdgpu_drm_ioctl+0x49/0x80 [amdgpu] [ 208.208385] __x64_sys_ioctl+0x83/0xb0 [ 208.208389] do_syscall_64+0x33/0x40 [ 208.208391] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 208.208393] RIP: 0033:0x7f64bca94e6b [ 208.208395] Code: ff ff ff 85 c0 79 8b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 af 0c 00 f7 d8 64 89 01 48 [ 208.208396] RSP: 002b:00007fffeaf02828 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 208.208397] RAX: ffffffffffffffda RBX: 00007fffeaf02870 RCX: 00007f64bca94e6b [ 208.208398] RDX: 00007fffeaf02870 RSI: 00000000c03864bc RDI: 000000000000000f [ 208.208399] RBP: 00000000c03864bc R08: 0000000000000002 R09: 0000000000000002 [ 208.208400] R10: 00007f64bcb60a00 R11: 0000000000000246 R12: 0000558a63ea7200 [ 208.208401] R13: 000000000000000f R14: 0000558a65250c70 R15: 0000558a6482b770 Unlikely that this is an amdgpu problem, I have an Intel GPU. Unfortunately, I don't have a dmesg available since I have turned the machine off by now. I can reproduce the kernel panic ermit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success' [ 135.410806] divide error: 0000 [#1] PREEMPT SMP NOPTI [ 135.410811] CPU: 0 PID: 1110 Comm: kwin_wayland Tainted: G OE 5.11.15-arch1-2 #1 [ 135.410813] Hardware name: Micro-Star International Co., Ltd. MS-7B17/MPG Z390 GAMING EDGE AC (MS-7B17), BIOS A.20 11/13/2018 [ 135.410813] RIP: 0010:amdgpu_dm_atomic_check+0x46c/0xcc0 [amdgpu] [ 135.410956] Code: 48 83 7e 10 00 74 5b 69 46 28 e8 03 00 00 44 0f b7 4e 3e 31 d2 41 f7 f1 45 0f b7 48 3e 31 d2 41 89 c3 41 69 40 28 e8 03 00 00 <41> f7 f1 41 39 c3 0f 85 22 08 00 00 69 46 2c e8 03 00 00 0f b7 76 [ 135.410958] RSP: 0018:ffffb45681e33be8 EFLAGS: 00010206 [ 135.410959] RAX: 0000000000000000 RBX: ffffb45681e33c17 RCX: ffff8fa93f3ba600 [ 135.410961] RDX: 0000000000000000 RSI: ffff8fa93f3ec9c0 RDI: ffff8fa93f3ba750 [ 135.410961] RBP: ffff8fa927b18c80 R08: ffff8fa93f3ec300 R09: 0000000000000000 [ 135.410962] R10: 0000000000000000 R11: 00000000000003e8 R12: 0000000000000000 [ 135.410963] R13: ffff8fa911452600 R14: 0000000000000000 R15: 0000000000000000 [ 135.410964] FS: 00007f1798c8b8c0(0000) GS:ffff8fb82dc00000(0000) knlGS:0000000000000000 [ 135.410966] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 135.410967] CR2: 00007f1754089000 CR3: 000000013124c002 CR4: 00000000003706f0 [ 135.410968] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 135.410969] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 135.410969] Call Trace: [ 135.410973] drm_atomic_check_only+0x5db/0x8d0 [drm] [ 135.410995] drm_mode_atomic_ioctl+0x724/0xaf0 [drm] [ 135.411012] ? drm_atomic_set_property+0xb30/0xb30 [drm] [ 135.411028] drm_ioctl_kernel+0xb2/0x100 [drm] [ 135.411043] drm_ioctl+0x215/0x390 [drm] [ 135.411058] ? drm_atomic_set_property+0xb30/0xb30 [drm] [ 135.411074] amdgpu_drm_ioctl+0x49/0x80 [amdgpu] [ 135.411156] __x64_sys_ioctl+0x83/0xb0 [ 135.411160] do_syscall_64+0x33/0x40 [ 135.411162] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 135.411164] RIP: 0033:0x7f179c6b7e6b [ 135.411166] Code: ff ff ff 85 c0 79 8b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 af 0c 00 f7 d8 64 89 01 48 [ 135.411167] RSP: 002b:00007fff7ddbed08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 135.411168] RAX: ffffffffffffffda RBX: 00007fff7ddbed50 RCX: 00007f179c6b7e6b [ 135.411169] RDX: 00007fff7ddbed50 RSI: 00000000c03864bc RDI: 000000000000000f [ 135.411170] RBP: 00000000c03864bc R08: 0000000000000002 R09: 0000000000000002 [ 135.411171] R10: 00007f179c783a00 R11: 0000000000000246 R12: 000055f02909d990 [ 135.411172] R13: 000000000000000f R14: 000055f02a377060 R15: 000055f02a378aa0 however, I was seeing it even without https://invent.kde.org/plasma/kwin/-/merge_requests/871 Correct, 871 doesn't make a difference for me. (In reply to Aleix Pol from comment #5) > Correct, 871 doesn't make a difference for me. Hmm, I'll recompile my kernel to get a useful kernel coredump. Hopefully, it will shed some light on it... I built a kernel with debug symbols and got a core dump, however the crash utility is completely broken, it either prints that it cannot allocate anymore memory (despite a reasonable amount of free ram on my computer) or it simply crashes. :| (gdb) l *amdgpu_dm_atomic_check+0x46c 0x1b51ec is in amdgpu_dm_atomic_check (drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9099). 9094 cursor_scale_w = new_cursor_state->crtc_w * 1000 / 9095 (new_cursor_state->src_w >> 16); 9096 cursor_scale_h = new_cursor_state->crtc_h * 1000 / 9097 (new_cursor_state->src_h >> 16); 9098 9099 primary_scale_w = new_primary_state->crtc_w * 1000 / 9100 (new_primary_state->src_w >> 16); 9101 primary_scale_h = new_primary_state->crtc_h * 1000 / 9102 (new_primary_state->src_h >> 16); the kernel seems to crash somewhere over here At quick glance, we can work around this crash by un-setting the framebuffer for the cursor plane. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/881 Git commit 0d9185053c0042f05470190ececf8606edb1c55c by Aleix Pol Gonzalez, on behalf of Vlad Zahorodnii. Committed on 21/04/2021 at 23:17. Pushed by vladz into branch 'master'. platforms/drm: Ignore udev events while session is inactive While the session is inactive, the drm master permissions are revoked. Therefore, we cannot perform things such as modesetting, etc. It also makes no sense to create or destroy DrmOutput objects. M +30 -26 src/plugins/platforms/drm/drm_backend.cpp M +1 -0 src/plugins/platforms/drm/drm_backend.h https://invent.kde.org/plasma/kwin/commit/0d9185053c0042f05470190ececf8606edb1c55c Git commit b3ddb11b7cf8f9a817142903fa356bf764691cf7 by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 22/04/2021 at 10:18. Pushed by apol into branch 'master'. drm: hide the cursor as we are setting dpms off It seems to crash amdgpu and it's consistent with how we're cleaning all our planes. M +1 -0 src/plugins/platforms/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/commit/b3ddb11b7cf8f9a817142903fa356bf764691cf7 *** Bug 428706 has been marked as a duplicate of this bug. *** |