Discussion:
[kwin] [Bug 396066] New: Wayland session is coring right after login [radeonsi/DisplayPort]
Shmerl
2018-07-01 21:24:10 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

Bug ID: 396066
Summary: Wayland session is coring right after login
[radeonsi/DisplayPort]
Product: kwin
Version: 5.13.1
Platform: Debian testing
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: wayland-generic
Assignee: kwin-bugs-***@kde.org
Reporter: ***@mykolab.com
Target Milestone: ---

I just tried to use Wayland session with KDE Plasma 5.13.1 and it's coring
right after login and falling back to sddm.

That's what I see in dmesg:

[ 176.359816] [drm:generic_reg_wait [amdgpu]] *ERROR* REG_WAIT timeout 10us *
3000 tries - dce110_stream_encoder_dp_blank line:956
[ 176.814144] QThread[2620]: segfault at f ip 00007f30f30b0e60 sp
00007f30e506e4f0 error 4 in libwayland-client.so.0.3.0[7f30f30a9000+d000]

Is it a Mesa problem of something with KWin?

Current Debian testing x86_64, Plasma 5.13.1 pulled from unstable. GPU: AMD
Vega 56, connected over DisplayPort.

OpenGL renderer string: Radeon RX Vega (VEGA10, DRM 3.25.0, 4.17.0-trunk-amd64,
LLVM 6.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.2
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-07-02 04:16:37 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

Martin Flöser <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEEDSINFO
Resolution|--- |BACKTRACE

--- Comment #1 from Martin Flöser <***@kde.org> ---
Please try to get a backtrace from KWin.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-02 04:21:34 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #2 from Shmerl <***@mykolab.com> ---
(In reply to Martin Flöser from comment #1)
Post by Martin Flöser
Please try to get a backtrace from KWin.
What is a good way to attach debugger to it before it crashes?
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-02 22:17:02 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #3 from Shmerl <***@mykolab.com> ---
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.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-07-03 04:25:08 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #4 from Martin Flöser <***@kde.org> ---
The log says that the platform plugin failed to initialize. Could it be that
systemd/logind don't function correctly?
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-03 04:30:17 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #5 from Shmerl <***@mykolab.com> ---
It functions OK for X11 session at least. And that Wayland client core did
appear in dmesg before.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-04 23:28:03 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #6 from Shmerl <***@mykolab.com> ---
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.
--
You are receiving this mail because:
You are watching all bug changes.
David Edmundson
2018-07-04 23:35:24 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

David Edmundson <***@davidedmundson.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@davidedmundson.co.uk

--- Comment #7 from David Edmundson <***@davidedmundson.co.uk> ---
try dbus-launch startplasmacompositor instead
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-04 23:46:50 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #8 from Shmerl <***@mykolab.com> ---
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.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-05 00:47:57 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #9 from Shmerl <***@mykolab.com> ---
Is there some way to force core generation? I'm not sure why it's not created,
ulimit is set to unlimited.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-05 00:51:16 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #10 from Shmerl <***@mykolab.com> ---
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.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-07-05 04:23:59 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #11 from Martin Flöser <***@kde.org> ---
According to the log KWin is not segfaulting but exiting due to drm Backend Not
working.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-05 04:28:09 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #12 from Shmerl <***@mykolab.com> ---
So what exactly can be segfaulting using QThread and
libwayland-client.so.0.3.0?
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-10 02:23:36 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #13 from Shmerl <***@mykolab.com> ---
It could be a bug in amdgpu driver. I'd appreciate any other suggestion how to
debug it.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-07-13 14:27:20 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #14 from Shmerl <***@mykolab.com> ---
Corresponding amdgpu/dri bug:
https://bugs.freedesktop.org/show_bug.cgi?id=107213
--
You are receiving this mail because:
You are watching all bug changes.
Simon Andric
2018-09-02 17:47:50 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

Simon Andric <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-09-14 01:30:58 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

Shmerl <***@mykolab.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|Wayland session is coring |Wayland session is coring
|right after login |right after login
|[radeonsi/DisplayPort] |[amdgpu/DisplayPort]
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-09-14 13:10:04 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #15 from Shmerl <***@mykolab.com> ---
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=***@entry=0x7,
size=***@entry=52, num_arrays=***@entry=0x7eff5140858c,
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=***@entry=0x7,
size=***@entry=52, num_arrays=***@entry=0x7eff5140858c,
args=***@entry=0x0) at ../src/connection.c:562
#1 0x00007eff59761aa0 in wl_connection_demarshal (connection=0x7eff440053e0,
size=***@entry=52, 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=***@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=***@entry=0x7eff44009440, m=***@entry=0x7eff5e863c60
<QSocketNotifier::staticMetaObject>,
local_signal_index=***@entry=0,
argv=***@entry=0x7eff514087d0) at kernel/qobject.cpp:3633
#13 0x00007eff5e611ff9 in QSocketNotifier::activated
(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
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-09-14 15:10:09 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #16 from Shmerl <***@mykolab.com> ---
Corresponding wayland-client bug:
https://gitlab.freedesktop.org/wayland/wayland/issues/56
--
You are receiving this mail because:
You are watching all bug changes.
Roman Gilg
2018-09-14 23:58:18 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

Roman Gilg <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDSINFO |RESOLVED
Resolution|BACKTRACE |UPSTREAM
CC| |***@gmail.com

--- Comment #17 from Roman Gilg <***@gmail.com> ---
This is likely an upstream bug. If they say something differently, pls reopen.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-09-26 03:19:51 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #18 from Shmerl <***@mykolab.com> ---
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
--
You are receiving this mail because:
You are watching all bug changes.
Mustafa Muhammad
2018-10-10 08:06:00 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

Mustafa Muhammad <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com

--- Comment #19 from Mustafa Muhammad <***@gmail.com> ---
(In reply to Shmerl from comment #18)
Post by Shmerl
It can be a downstream issue with Debian specifically (since according to
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.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-10-11 16:44:01 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #20 from Shmerl <***@mykolab.com> ---
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!
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-10-11 17:01:25 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #21 from Martin Flöser <***@kde.org> ---
Great that you finally found the reason.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-12-07 06:34:40 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #22 from Shmerl <***@gmail.com> ---
It's fixed now for amdgpu in Linux kernel master and the fix should be
available in 4.20 release.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-12-09 18:53:00 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #24 from Martin Flöser <***@kde.org> ---
(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.
--
You are receiving this mail because:
You are watching all bug changes.
Shmerl
2018-12-09 18:04:44 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=396066

--- Comment #23 from Shmerl <***@gmail.com> ---
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).
--
You are receiving this mail because:
You are watching all bug changes.
Loading...