Bug 449568 - Kwin crash in KWin::PipeWireCore::init()
Summary: Kwin crash in KWin::PipeWireCore::init()
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git-stable-Plasma/5.24
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL: https://gitlab.freedesktop.org/pipewi...
Keywords: wayland
: 449579 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-03 18:36 UTC by Matej Mrenica
Modified: 2023-07-10 09:24 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matej Mrenica 2022-02-03 18:36:47 UTC
SUMMARY
I was using plasma with Firefox, Dolphin and mpv running and my session crashed out of the blue.
Log: https://pastebin.com/W9Fqybup

Since Pipewire is mentioned, I did just update to 0.3.45 and not restated yet.
Comment 1 Nate Graham 2022-02-03 20:17:52 UTC
Pasting inline:

#0  0x0000565522192198 in  ()
#1  0x00007f148d6e2334 in impl_connect_fd (client=0x565521b76920, fd=211, do_close=<optimized out>) at ../pipewire/src/modules/module-protocol-native.c:909
#2  0x00007f148d6e4a59 in try_connect (client=client@entry=0x565521b76920, runtime_dir=<optimized out>, name=name@entry=0x7f148d6fdaab "pipewire-0", done_callback=done_callback@entry=
    0x0, data=data@entry=0x0) at ../pipewire/src/modules/module-protocol-native/local-socket.c:130
#3  0x00007f148d6e4d69 in pw_protocol_native_connect_local_socket (client=0x565521b76920, props=<optimized out>, done_callback=0x0, data=0x0)
    at ../pipewire/src/modules/module-protocol-native/local-socket.c:160
#4  0x00007f14ec0257f7 in pw_data_loop_start (loop=0x66) at ../pipewire/src/pipewire/data-loop.c:206
#5  pw_data_loop_start (loop=0x66) at ../pipewire/src/pipewire/data-loop.c:197
#6  0x000056551de082b3 in KWin::PipeWireCore::init() (this=0x5655222568c0) at /home/mthw/kde/kwin/src/plugins/screencast/pipewirecore.cpp:82
#7  0x000056551de08713 in KWin::PipeWireCore::self() () at /home/mthw/kde/kwin/src/plugins/screencast/pipewirecore.cpp:107
#8  0x000056551de11ddd in KWin::ScreenCastStream::init() (this=0x565521d7f400) at /home/mthw/kde/kwin/src/plugins/screencast/screencaststream.cpp:229
#9  0x000056551de09dd8 in KWin::ScreencastManager::integrateStreams(KWaylandServer::ScreencastStreamV1Interface*, KWin::ScreenCastStream*) (this=
    0x56551fcafc60, waylandStream=0x565521bc9700, stream=0x565521d7f400) at /home/mthw/kde/kwin/src/plugins/screencast/screencastmanager.cpp:160
#10 0x000056551de09591 in KWin::ScreencastManager::streamWindow(KWaylandServer::ScreencastStreamV1Interface*, QString const&) (this=0x56551fcafc60, waylandStream=0x565521bc9700, winid=...)
    at /home/mthw/kde/kwin/src/plugins/screencast/screencastmanager.cpp:95
#11 0x000056551de0d04e in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<KWaylandServer::ScreencastStreamV1Interface*, QString const&>, void, void (KWin::ScreencastManager::*)(KWaylandServer::ScreencastStreamV1Interface*, QString const&)>::call(void (KWin::ScreencastManager::*)(KWaylandServer::ScreencastStreamV1Interface*, QString const&), KWin::ScreencastManager*, void**) (f=
    (void (KWin::ScreencastManager::*)(KWin::ScreencastManager * const, KWaylandServer::ScreencastStreamV1Interface *, const QString &)) 0x56551de094c2 <KWin::ScreencastManager::streamWindow(KWaylandServer::ScreencastStreamV1Interface*, QString const&)>, o=0x56551fcafc60, arg=0x7ffd57b8d670) at /usr/include/qt/QtCore/qobjectdefs_impl.h:152
#12 0x000056551de0cbd8 in QtPrivate::FunctionPointer<void (KWin::ScreencastManager::*)(KWaylandServer::ScreencastStreamV1Interface*, QString const&)>::call<QtPrivate::List<KWaylandServer::ScreencastStreamV1Interface*, QString const&>, void>(void (KWin::ScreencastManager::*)(KWaylandServer::ScreencastStreamV1Interface*, QString const&), KWin::ScreencastManager*, void**) (f=
    (void (KWin::ScreencastManager::*)(KWin::ScreencastManager * const, KWaylandServer::ScreencastStreamV1Interface *, const QString &)) 0x56551de094c2 <KWin::ScreencastManager::streamWindow(KWaylandServer::ScreencastStreamV1Interface*, QString const&)>, o=0x56551fcafc60, arg=0x7ffd57b8d670) at /usr/include/qt/QtCore/qobjectdefs_impl.h:185
#13 0x000056551de0c305 in QtPrivate::QSlotObject<void (KWin::ScreencastManager::*)(KWaylandServer::ScreencastStreamV1Interface*, QString const&), QtPrivate::List<KWaylandServer::ScreencastStreamV1Interface*, QString const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x56551fc02ca0, r=0x56551fcafc60, a=0x7ffd57b8d670, ret=0x0)
    at /usr/include/qt/QtCore/qobjectdefs_impl.h:418
--Type <RET> for more, q to quit, c to continue without paging--
#14 0x00007f14ec638d93 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7ffd57b8d670, r=<optimized out>, this=0x56551fc02ca0, this=<optimized out>, r=<optimized out>, a=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#15 doActivate<false>(QObject*, int, void**) (sender=0x56551fcafcc0, signal_index=5, argv=0x7ffd57b8d670) at kernel/qobject.cpp:3886
#16 0x00007f14ee8d135a in KWaylandServer::ScreencastV1Interface::windowScreencastRequested(KWaylandServer::ScreencastStreamV1Interface*, QString const&, KWaylandServer::ScreencastV1Interface::CursorMode) () at /usr/lib/libKWaylandServer.so.5
#17 0x00007f14ee96dfb6 in  () at /usr/lib/libKWaylandServer.so.5
#18 0x00007f14eb48dd4a in  () at /usr/lib/libffi.so.8
#19 0x00007f14eb48d267 in  () at /usr/lib/libffi.so.8
#20 0x00007f14ee84a323 in  () at /usr/lib/libwayland-server.so.0
#21 0x00007f14ee8455cc in  () at /usr/lib/libwayland-server.so.0
#22 0x00007f14ee8481ca in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#23 0x00007f14ee8e7b7b in KWaylandServer::Display::dispatchEvents() () at /usr/lib/libKWaylandServer.so.5
#24 0x00007f14ec638d93 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7ffd57b8de10, r=<optimized out>, this=0x56551ffe9790, this=<optimized out>, r=<optimized out>, a=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#25 doActivate<false>(QObject*, int, void**) (sender=0x56552000d540, signal_index=3, argv=0x7ffd57b8de10) at kernel/qobject.cpp:3886
#26 0x00007f14ec63aa54 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal)
    (this=this@entry=0x56552000d540, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#27 0x00007f14ec63ab9f in QSocketNotifier::event(QEvent*) (this=0x56552000d540, e=<optimized out>) at kernel/qsocketnotifier.cpp:302
#28 0x00007f14ed1a31a6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x56552000d540, e=0x7ffd57b8df50) at kernel/qapplication.cpp:3632
#29 0x00007f14ec60816a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x56552000d540, event=0x7ffd57b8df50) at kernel/qcoreapplication.cpp:1064
#30 0x00007f14ec6520e4 in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x56551f9aeae0) at kernel/qeventdispatcher_unix.cpp:304
#31 0x00007f14ec653055 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:511
#32 0x000056551df37d92 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
#33 0x00007f14ec60044b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffd57b8e0e0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#34 0x00007f14ec60bb97 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
--Type <RET> for more, q to quit, c to continue without paging--
#35 0x000056551ddc3a32 in main(int, char**) (argc=14, argv=0x7ffd57b8e528) at /home/mthw/kde/kwin/src/main_wayland.cpp:727
Comment 2 Nate Graham 2022-02-04 16:41:28 UTC
*** Bug 449579 has been marked as a duplicate of this bug. ***
Comment 3 zellox 2022-02-05 09:09:10 UTC
Same here, but with wayland.

Arch Linux
KDE Plasma: 5.23.5
KDE frameworks: 5.90.0
Qt version: 5.15.2
Kernel: 5.16.5

My backtrace is similar:

#0  0x0000561a88568048 in  ()
#1  0x00007f47a441a334 in impl_connect_fd (client=0x561a88097c90, fd=319, do_close=<optimized out>)
    at ../pipewire/src/modules/module-protocol-native.c:909
#2  0x00007f47a441ca59 in try_connect
    (client=client@entry=0x561a88097c90, runtime_dir=<optimized out>, name=name@entry=0x7f47a4435aab "pipewire-0", done_callback=done_callback@entry=0x0, data=data@entry=0x0)
    at ../pipewire/src/modules/module-protocol-native/local-socket.c:130
#3  0x00007f47a441cd69 in pw_protocol_native_connect_local_socket
    (client=0x561a88097c90, props=<optimized out>, done_callback=0x0, data=0x0)
    at ../pipewire/src/modules/module-protocol-native/local-socket.c:160
#4  0x00007f47c16857f7 in pw_data_loop_start (loop=0x7ffedaa79bf8)
    at ../pipewire/src/pipewire/data-loop.c:206
#5  pw_data_loop_start (loop=0x7ffedaa79bf8) at ../pipewire/src/pipewire/data-loop.c:197
#6  0x0000561a86f93496 in  ()
#7  0x00007f47c1b26da3 in QtPrivate::QSlotObjectBase::destroyIfLastRef() (this=0x561a872df440)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#8  QtPrivate::QSlotObjectBase::destroyIfLastRef() (this=0x561a872df440)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#9  doActivate<false>(QObject*, int, void**)::Deleter::operator()(QtPrivate::QSlotObjectBase*) const
    (slot=0x561a872df440, this=<optimized out>) at kernel/qobject.cpp:3879
#10 std::unique_ptr<QtPrivate::QSlotObjectBase, doActivate<false>(QObject*, int, void**)::Deleter>::~unique_ptr() (this=<synthetic pointer>, this=<optimized out>) at /usr/include/c++/11.1.0/bits/unique_ptr.h:361
#11 doActivate<false>(QObject*, int, void**) (sender=0x561a873881e0, signal_index=4, argv=0x7ffedaa79d60)
    at kernel/qobject.cpp:3888
#12 0x00007f47c249d5fa in KWaylandServer::ScreencastV1Interface::windowScreencastRequested(KWaylandServer::ScreencastStreamV1Interface*, QString const&, KWaylandServer::ScreencastV1Interface::CursorMode) ()
    at /usr/lib/libKWaylandServer.so.5
#13 0x00007f47c2531766 in  () at /usr/lib/libKWaylandServer.so.5
#14 0x00007f47bef9fd4a in  () at /usr/lib/libffi.so.8
--Type <RET> for more, q to quit, c to continue without paging--
#15 0x00007f47bef9f267 in  () at /usr/lib/libffi.so.8
#16 0x00007f47c0c56323 in  () at /usr/lib/libwayland-server.so.0
#17 0x00007f47c0c515cc in  () at /usr/lib/libwayland-server.so.0
#18 0x00007f47c0c541ca in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#19 0x00007f47c24b20cb in KWaylandServer::Display::dispatchEvents() () at /usr/lib/libKWaylandServer.so.5
#20 0x00007f47c1b26da3 in QtPrivate::QSlotObjectBase::destroyIfLastRef() (this=0x561a87d8f110)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#21 QtPrivate::QSlotObjectBase::destroyIfLastRef() (this=0x561a87d8f110)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#22 doActivate<false>(QObject*, int, void**)::Deleter::operator()(QtPrivate::QSlotObjectBase*) const
    (slot=0x561a87d8f110, this=<optimized out>) at kernel/qobject.cpp:3879
#23 std::unique_ptr<QtPrivate::QSlotObjectBase, doActivate<false>(QObject*, int, void**)::Deleter>::~unique_ptr() (this=<synthetic pointer>, this=<optimized out>) at /usr/include/c++/11.1.0/bits/unique_ptr.h:361
#24 doActivate<false>(QObject*, int, void**) (sender=0x561a87db79d0, signal_index=3, argv=0x7ffedaa7a500)
    at kernel/qobject.cpp:3888
#25 0x00007f47c1b28a64 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=<optimized out>, _t1=..., _t2=<optimized out>, _t3=...)
    at .moc/moc_qsocketnotifier.cpp:179
#26 0x00007f47c1b28baf in QSocketNotifier::event(QEvent*) (this=0x561a87db79d0, e=<optimized out>)
    at kernel/qsocketnotifier.cpp:304
#27 0x00007f47c27121a6 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    (this=<optimized out>, receiver=0x561a87db79d0, e=0x7ffedaa7a640) at kernel/qapplication.cpp:3632
#28 0x00007f47c1af617a in QScopedScopeLevelCounter::~QScopedScopeLevelCounter()
    (this=<optimized out>, this=<optimized out>)
    at ../../include/QtCore/5.15.2/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#29 QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x561a87db79d0, event=0x7ffedaa7a640)
    at kernel/qcoreapplication.cpp:1065
#30 0x00007f47c1b400f4 in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x561a8713da90)
    at ../../include/QtCore/../../src/corelib/tools/qvector.h:90
--Type <RET> for more, q to quit, c to continue without paging--
#31 0x00007f47c1b41065 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
    (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:515
#32 0x0000561a86fc7932 in  ()
#33 0x00007f47c1aee45b in QMutexLocker::relock() (this=<synthetic pointer>) at thread/qmutex.h:260
#34 QEventLoop::LoopReference::~LoopReference (this=<synthetic pointer>, this=<optimized out>)
    at kernel/qeventloop.cpp:206
#35 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...)
    at kernel/qeventloop.cpp:236
#36 0x00007f47c1af9ba7 in QCoreApplication::exec() ()
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:86
#37 0x0000561a86f689c6 in  ()
#38 0x00007f47c1283b25 in __libc_start_main () at /usr/lib/libc.so.6
#39 0x0000561a86f691de in  ()
Comment 4 Vlad Zahorodnii 2022-02-07 09:59:34 UTC
Can you check whether pipewire-media-session or wireplumber is running?
Comment 5 Matej Mrenica 2022-02-07 10:39:38 UTC
Currently it's wireplumber but before the crash it was pipewire-media-session. IIRC the crash happened sometimes after me switching from one to another and not rebooting yet, but that's more or less a guess at this point.
Comment 6 zellox 2022-02-07 10:41:51 UTC
pipewire-media-session for me. I don't have wireplumber running.
Comment 7 Lyubomir 2022-02-07 11:35:31 UTC
I believe it should be wireplumber all the time for me, but i can't know if it it was pipewire-media-session for some reason before it crashed.
Comment 8 Lyubomir 2022-02-07 11:43:58 UTC
(In reply to Lyubomir from comment #7)
> I believe it should be wireplumber all the time for me, but i can't know if
> it it was pipewire-media-session for some reason before it crashed.

That said, pipewire-media-session is a separate package on Arch which conflicts with wireplumber - and i don't have pipewire-media-session installed but do have wireplumber. I replaced pipewire-media-session with wireplumber at least a few weeks before the crash and had smh like 10 restarts, so definitely no chance that pipewire-media-session was running at the time of the crash.
Comment 9 Pawel 2022-02-18 09:32:35 UTC
I experienced this crash before but sadly I don't have the logs anymore.

This might be related to https://bugs.kde.org/show_bug.cgi?id=450445
Comment 10 Aleix Pol 2022-04-19 14:26:47 UTC
Can this still be reproduced after updating and rebooting?

This is crashing deep into pipewire.
Comment 11 Lyubomir 2022-04-19 20:41:09 UTC
I don't think it has happened recently?
Comment 12 Bug Janitor Service 2023-05-24 06:46:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4131