Bug 513049

Summary: Plasma freezes for quite some time in PipeWireCore::~PipeWireCore() in KPipeWire when stopping pipewire manually
Product: [Frameworks and Libraries] KPipeWire Reporter: timon2201
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: minor CC: aleixpol, isma.af, kde, nate, niccolo.venerandi
Priority: NOR    
Version First Reported In: 6.5.3   
Target Milestone: ---   
Platform: CachyOS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description timon2201 2025-12-07 16:15:26 UTC
When stopping pipewire the taskbar freezes

STEPS TO REPRODUCE
1. systemctl stop --user wireplumber.service pipewire-pulse.service pipewire.service pipewire-pulse.socket pipewire.socket

OBSERVED RESULT
task bar freezes

EXPECTED RESULT

does not freeze


SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux 
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.18.0-273-tkg-eevdf-llvm (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X3D 8-Core Processor
Memory: 32 GiB of RAM (31,3 GiB usable)
Graphics Processor: AMD Radeon RX 7900 XTX
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 AORUS MASTER
System Version: -CF
Comment 1 David Redondo 2025-12-08 09:22:36 UTC
Probably blocking somewhere in plasma-pa. But it also seemes to me a case of dont do it then.
Comment 2 David Redondo 2025-12-08 10:34:09 UTC
I can't reproduce, please attach a backtrace of plasmashell when its frozen.
Comment 3 timon2201 2025-12-08 10:45:19 UTC
(In reply to David Redondo from comment #2)
> I can't reproduce, please attach a backtrace of plasmashell when its frozen.

How do i make a backtrace ?
Comment 4 David Redondo 2025-12-08 11:33:28 UTC
type 

gdb -p $(pidof plasmashell)

wait until you see the (gdb) prompt and type

bt
Comment 5 timon2201 2025-12-08 12:02:00 UTC
(In reply to David Redondo from comment #4)
> type 
> 
> gdb -p $(pidof plasmashell)
> 
> wait until you see the (gdb) prompt and type
> 
> bt

(gdb) bt
#0  0x0000773969cb0892 in ??? () at /usr/lib/libc.so.6
#1  0x0000773969ca4248 in ??? () at /usr/lib/libc.so.6
#2  0x0000773969ca49a3 in ??? () at /usr/lib/libc.so.6
#3  0x0000773969ca9d33 in ??? () at /usr/lib/libc.so.6
#4  0x000077391a50e318 in pw_thread_loop_stop (loop=loop@entry=0x646b40ca8a90) at ../src/pipewire/thread-loop.c:246
#5  0x000077391a50e721 in pw_thread_loop_destroy (loop=0x646b40ca8a90) at ../src/pipewire/thread-loop.c:137
#6  0x000077391a58b015 in module_destroy (data=0x646b403dadc0) at ../src/modules/module-rt.c:482
#7  0x000077391a4c64c8 in pw_impl_module_destroy (module=0x646b4011c7f0) at ../src/pipewire/impl-module.c:303
#8  0x000077391a487125 in pw_context_destroy (context=0x646b41435d90) at ../src/pipewire/context.c:644
#9  0x000077391a55c54d in PipeWireCore::~PipeWireCore() () at /usr/lib/libKPipeWire.so.6
#10 0x000077391a55c64f in ??? () at /usr/lib/libKPipeWire.so.6
#11 0x000077391a55eb7a in PipeWireSourceStream::~PipeWireSourceStream() () at /usr/lib/libKPipeWire.so.6
#12 0x000077391a55eca9 in PipeWireSourceItem::~PipeWireSourceItem() () at /usr/lib/libKPipeWire.so.6
#13 0x000077391a56cbcb in ??? () at /usr/lib/libKPipeWire.so.6
#14 0x000077396a5d4731 in QObjectPrivate::deleteChildren() () at /usr/lib/libQt6Core.so.6
#15 0x000077396a5db3ab in QObject::~QObject() () at /usr/lib/libQt6Core.so.6
#16 0x000077396c22c67b in ??? () at /usr/lib/libQt6Quick.so.6
#17 0x000077396a5d4731 in QObjectPrivate::deleteChildren() () at /usr/lib/libQt6Core.so.6
#18 0x000077396a5db3ab in QObject::~QObject() () at /usr/lib/libQt6Core.so.6
#19 0x000077396c2297aa in ??? () at /usr/lib/libQt6Quick.so.6
#20 0x000077396a5d4731 in QObjectPrivate::deleteChildren() () at /usr/lib/libQt6Core.so.6
#21 0x000077396a5db3ab in QObject::~QObject() () at /usr/lib/libQt6Core.so.6
#22 0x0000773941c8b11e in ??? () at /usr/lib/qt6/qml/QtQuick/Layouts/../../../../libQt6QuickLayouts.so.6
#23 0x000077396a5dc68a in QObject::event(QEvent*) () at /usr/lib/libQt6Core.so.6
#24 0x000077396c902229 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt6Widgets.so.6
#25 0x000077396a57aed8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
#26 0x000077396a57b278 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt6Core.so.6
#27 0x000077396a891b80 in ??? () at /usr/lib/libQt6Core.so.6
#28 0x0000773968e913e9 in ??? () at /usr/lib/libglib-2.0.so.0
#29 0x0000773968e92808 in ??? () at /usr/lib/libglib-2.0.so.0
#30 0x0000773968e92942 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#31 0x000077396a88e7db in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#32 0x000077396a586336 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#33 0x000077396a57fb2c in QCoreApplication::exec() () at /usr/lib/libQt6Core.so.6
#34 0x0000646b3893df4c in ??? ()
#35 0x0000773969c27b8b in ??? () at /usr/lib/libc.so.6
#36 0x0000773969c27c4b in __libc_start_main () at /usr/lib/libc.so.6
#37 0x0000646b3893e505 in ??? ()



and i get it reliable reproduce with doing systemctl restart --user pipewire.service pipewire-pulse.service wireplumber.service pipewire.socket pipewire-pulse.socket
 and then right after click on play on a youtube video.
Comment 6 David Redondo 2025-12-08 12:51:40 UTC
Thanks I cannot immediately reproduce, looks like tear down of pipewire stuff
Comment 7 Nate Graham 2025-12-08 17:44:49 UTC
I also cannot reproduce the issue on current git master, BTW.