Summary: | Wayland session is coring right after login [amdgpu/DisplayPort] | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Shmerl <shtetldik> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | kde, mustafa1024m, simonandric5, subdiff |
Priority: | NOR | ||
Version: | 5.13.1 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Shmerl
2018-07-01 21:24:10 UTC
Please try to get a backtrace from KWin. (In reply to Martin Flöser from comment #1) > Please try to get a backtrace from KWin. What is a good way to attach debugger to it before it crashes? I wrote a script what intercepts kwin_wayland launch and attaches gdb to it. But when I do continue in it, it simply exists rather that segfaults. Where can I find KWin logs? That's what I see in: $HOME/.local/share/sddm/wayland-session.log startplasmacompositor: Starting up... dbus-daemon[1791]: [session uid=1000 pid=1791] Activating service name='org.freedesktop.systemd1' requested by ':1.1' (uid=1000 pid=1893 comm="dbus-update-activation-environment --systemd --all") dbus-daemon[1791]: [session uid=1000 pid=1791] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1 dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 No backend specified through command line argument, trying auto resolution FATAL ERROR: backend failed to initialize, exiting now startplasmacompositor: Shutting down... startplasmacompositor: Done. The log says that the platform plugin failed to initialize. Could it be that systemd/logind don't function correctly? It functions OK for X11 session at least. And that Wayland client core did appear in dmesg before. I tried to start Plasma session manually from tty, and got this: startplasmacompositor: Starting up... dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.InvalidArgs: Invalid environment assignments No backend specified through command line argument, trying auto resolution FATAL ERROR: backend failed to initialize, exiting now startplasmacompositor: Shutting down... startplasmacompositor: Done. try dbus-launch startplasmacompositor instead startplasmacompositor: Starting up... dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 No backend specified through command line argument, trying auto resolution FATAL ERROR: backend failed to initialize, exiting now Segmentation fault startplasmacompositor: Shutting down... startplasmacompositor: Done. I tried it a few times - that segfault doesn't happen every time, and I don't see any cores. Is there some way to force core generation? I'm not sure why it's not created, ulimit is set to unlimited. I also copied startplasmacompositor and edited kwin launch there to use: gdb -ex run --args /usr/bin/kwin_wayland --xwayland --libinput --exit-with-session=/usr/lib/x86_64-linux-gnu/libexec/startplasma It hung the system completely to me. According to the log KWin is not segfaulting but exiting due to drm Backend Not working. So what exactly can be segfaulting using QThread and libwayland-client.so.0.3.0? It could be a bug in amdgpu driver. I'd appreciate any other suggestion how to debug it. Corresponding amdgpu/dri bug: https://bugs.freedesktop.org/show_bug.cgi?id=107213 I managed to make it produce a core. It's from kwin_wayland. After installing needed debug symbol packages, here is a backtrace: Core was generated by `/usr/bin/kwin_wayland --xwayland --libinput --exit-with-session=/usr/lib/x86_64'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007eff59760f30 in wl_closure_init (message=message@entry=0x7, size=size@entry=52, num_arrays=num_arrays@entry=0x7eff5140858c, args=args@entry=0x0) at ../src/connection.c:562 562 ../src/connection.c: No such file or directory. [Current thread is 1 (Thread 0x7eff51409700 (LWP 7249))] (gdb) bt #0 0x00007eff59760f30 in wl_closure_init (message=message@entry=0x7, size=size@entry=52, num_arrays=num_arrays@entry=0x7eff5140858c, args=args@entry=0x0) at ../src/connection.c:562 #1 0x00007eff59761aa0 in wl_connection_demarshal (connection=0x7eff440053e0, size=size@entry=52, objects=objects@entry=0x7eff440052e8, message=0x7) at ../src/connection.c:698 #2 0x00007eff5975fae8 in queue_event (len=52, display=0x7eff44005270) at ../src/wayland-client.c:1364 #3 read_events (display=0x7eff44005270) at ../src/wayland-client.c:1466 #4 wl_display_read_events (display=display@entry=0x7eff44005270) at ../src/wayland-client.c:1549 #5 0x00007eff59760169 in wl_display_dispatch_queue (display=0x7eff44005270, queue=0x7eff44005338) at ../src/wayland-client.c:1788 #6 0x00007eff5d123933 in KWayland::Client::ConnectionThread::Private::<lambda()>::operator() (__closure=0x7eff44009550) at ./src/client/connection_thread.cpp:129 #7 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWayland::Client::ConnectionThread::Private::setupSocketNotifier()::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:128 #8 QtPrivate::Functor<KWayland::Client::ConnectionThread::Private::setupSocketNotifier()::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:238 #9 QtPrivate::QFunctorSlotObject<KWayland::Client::ConnectionThread::Private::setupSocketNotifier()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x7eff44009540, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:421 #10 0x00007eff5e606910 in QtPrivate::QSlotObjectBase::call (a=0x7eff514087d0, r=0x564a80be84f0, this=0x7eff44009540) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:376 #11 QMetaObject::activate(QObject*, int, int, void**) () at kernel/qobject.cpp:3754 #12 0x00007eff5e606dd7 in QMetaObject::activate (sender=sender@entry=0x7eff44009440, m=m@entry=0x7eff5e863c60 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7eff514087d0) at kernel/qobject.cpp:3633 #13 0x00007eff5e611ff9 in QSocketNotifier::activated (this=this@entry=0x7eff44009440, _t1=<optimized out>, _t2=...) at .moc/moc_qsocketnotifier.cpp:136 #14 0x00007eff5e612341 in QSocketNotifier::event (this=0x7eff44009440, e=0x7eff51408a30) at kernel/qsocketnotifier.cpp:266 #15 0x00007eff5e9cb4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #16 0x00007eff5e9d2ae0 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #17 0x00007eff5e5dd579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at ../../include/QtCore/5.11.1/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:307 #18 0x00007eff5e62fe4a in QCoreApplication::sendEvent (event=0x7eff51408a30, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234 #19 socketNotifierSourceDispatch(_GSource*, int (*)(void*), void*) () at kernel/qeventdispatcher_glib.cpp:106 #20 0x00007eff5a647287 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #21 0x00007eff5a6474c0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #22 0x00007eff5a64754c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #23 0x00007eff5e62f223 in QEventDispatcherGlib::processEvents (this=0x7eff44000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:423 #24 0x00007eff5e5dc24b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at ../../include/QtCore/../../src/corelib/global/qflags.h:140 #25 0x00007eff5e42b176 in QThread::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:120 #26 0x00007eff5e434d47 in QThreadPrivate::start(void*) () at thread/qthread_unix.cpp:367 #27 0x00007eff5efb5f2a in start_thread (arg=0x7eff51409700) at pthread_create.c:463 #28 0x00007eff5e0fdedf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Corresponding wayland-client bug: https://gitlab.freedesktop.org/wayland/wayland/issues/56 This is likely an upstream bug. If they say something differently, pls reopen. It can be a downstream issue with Debian specifically (since according to Mesa developers, it doesn't happen on Arch). So I also opened a Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=909636 (In reply to Shmerl from comment #18) > It can be a downstream issue with Debian specifically (since according to > Mesa developers, it doesn't happen on Arch). So I also opened a Debian bug: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=909636 I'm not a developer, but I suggest you try booting the latest Neon ISO to check if it works on your hardware, if it does, it is upstream or distribution issue. It looks like it's related to https://bugs.freedesktop.org/show_bug.cgi?id=107978 My monitor (Dell U2413) has a setting for toggling DisplayPort 1.2. When I disable it, Wayland Plasma session isn't crashing anymore and is logging in properly! Great that you finally found the reason. It's fixed now for amdgpu in Linux kernel master and the fix should be available in 4.20 release. It is still a KWin bug though, since the session shoulnd't be crashing when there are no outputs found (which is the case here for a split moment caused by amdgpu bug above). (In reply to Shmerl from comment #23) > It is still a KWin bug though, since the session shoulnd't be crashing when > there are no outputs found (which is the case here for a split moment caused > by amdgpu bug above). No, this is working as intended. KWin exits gracefully as on the DRM platform we require screens to be present. KWin cannot start up without screens. |