Bug 492400 - plasmashell crashed in pw_stream_update_params() after PipeWireSourceStream::onRenegotiate() when clicking on taskbar to switch application
Summary: plasmashell crashed in pw_stream_update_params() after PipeWireSourceStream::...
Status: RESOLVED FIXED
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages User Edition (show other bugs)
Version: unspecified
Platform: Neon Linux
: VHI crash
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2024-08-30 09:45 UTC by tctc
Modified: 2024-10-15 03:45 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.1
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/5819/events/f70cbc0b4a524eb08e75d059c0f80873/


Attachments
New crash information added by DrKonqi (249.36 KB, text/plain)
2024-08-30 09:45 UTC, tctc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tctc 2024-08-30 09:45:19 UTC
Application: plasmashell (6.1.4)

Qt Version: 6.7.2
Frameworks Version: 6.5.0
Operating System: Linux 6.8.0-40-generic x86_64
Windowing System: Wayland
Distribution: KDE neon 6.1
DrKonqi: 6.1.4 [CoredumpBackend]

-- Information about the crash:
Looks like this bug is related to pipewire?

The crash can be reproduced sometimes.

-- Backtrace (Reduced):
#6  spa_pod_is_object (pod=0x0) at ../spa/include/spa/pod/iter.h:383
#7  update_params (impl=0x5acc69b92990, id=4294967295, params=0x5acc6b3dbaf0, n_params=18) at ../src/pipewire/stream.c:298
#8  0x0000775f50db0737 in pw_stream_update_params (stream=0x5acc69b92990, params=0x5acc6b3dbaf0, n_params=18) at ../src/pipewire/stream.c:1971
#9  0x0000775f5205c657 in PipeWireSourceStream::onRenegotiate(void*, unsigned long) (data=0x5acc6b6947f0) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qscopedpointer.h:90
#10 0x0000775f516b28aa in source_event_func (source=0x5acc6576fe10) at ../spa/plugins/support/loop.c:524


Reported using DrKonqi
Comment 1 tctc 2024-08-30 09:45:22 UTC
Created attachment 173121 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Akseli Lahtinen 2024-08-30 12:06:43 UTC
Searchable backtrace:

Thread 1 (Thread 0x775f7af1dac0 (LWP 104018)):
[KCrash Handler]
#6  spa_pod_is_object (pod=0x0) at ../spa/include/spa/pod/iter.h:383
#7  update_params (impl=0x5acc69b92990, id=4294967295, params=0x5acc6b3dbaf0, n_params=18) at ../src/pipewire/stream.c:298
#8  0x0000775f50db0737 in pw_stream_update_params (stream=0x5acc69b92990, params=0x5acc6b3dbaf0, n_params=18) at ../src/pipewire/stream.c:1971
#9  0x0000775f5205c657 in PipeWireSourceStream::onRenegotiate(void*, unsigned long) (data=0x5acc6b6947f0) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qscopedpointer.h:90
#10 0x0000775f516b28aa in source_event_func (source=0x5acc6576fe10) at ../spa/plugins/support/loop.c:524
#11 0x0000775f516b3e33 in loop_iterate (object=0x5acc65e354e8, timeout=<optimized out>) at ../spa/plugins/support/loop.c:368
#12 0x0000775f52053040 in operator() (__closure=<optimized out>, __closure=<optimized out>) at ./src/pipewirecore.cpp:90
#13 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, PipeWireCore::init(int)::<lambda()> >::call (arg=<optimized out>, f=<optimized out>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:137
#14 QtPrivate::FunctorCallable<PipeWireCore::init(int)::<lambda()> >::call<QtPrivate::List<>, void> (arg=<optimized out>, f=<optimized out>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:345
#15 QtPrivate::QCallableObject<PipeWireCore::init(int)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=<optimized out>, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:555
#16 0x0000775f8106381b in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffc56d1060, r=0x5acc65e33950, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ./src/corelib/kernel/qobjectdefs_impl.h:469
#17 doActivate<false>(QObject*, int, void**) (sender=0x5acc65e3d6a0, signal_index=3, argv=0x7fffc56d1060) at ./src/corelib/kernel/qobject.cpp:4086
#18 0x0000775f8100e8d3 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=this@entry=0x5acc65e3d6a0, _t1=..., _t2=<optimized out>, _t3=...) at ./obj-x86_64-linux-gnu/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:195
#19 0x0000775f810132c6 in QSocketNotifier::event(QEvent*) (this=0x5acc65e3d6a0, e=<optimized out>) at ./src/corelib/kernel/qsocketnotifier.cpp:327
#20 0x0000775f8320a1ab in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5acc65e3d6a0, e=0x7fffc56d11a0) at ./src/widgets/kernel/qapplication.cpp:3287
#21 0x0000775f810a1dd8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5acc65e3d6a0, event=0x7fffc56d11a0) at ./src/corelib/kernel/qcoreapplication.cpp:1142
#22 0x0000775f80e660c4 in socketNotifierSourceDispatch(GSource*, GSourceFunc, gpointer) (source=0x5acc64007df0) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:75
#23 0x0000775f7f792d3b in g_main_dispatch (context=0x775f74005040) at ../../../glib/gmain.c:3419
#24 g_main_context_dispatch (context=0x775f74005040) at ../../../glib/gmain.c:4137
#25 0x0000775f7f7e82b8 in g_main_context_iterate.constprop.0 (context=context@entry=0x775f74005040, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4213
#26 0x0000775f7f7903e3 in g_main_context_iteration (context=0x775f74005040, may_block=1) at ../../../glib/gmain.c:4278
#27 0x0000775f80e62700 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5acc63f6ba10, flags=...) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:394
#28 0x0000775f810a3feb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffc56d13d0, flags=..., flags@entry=...) at ./src/corelib/global/qflags.h:34
#29 0x0000775f810a5c2c in QCoreApplication::exec() () at ./src/corelib/global/qflags.h:74
#30 0x0000775f814e44a0 in QGuiApplication::exec() () at ./src/gui/kernel/qguiapplication.cpp:1926
#31 0x0000775f83208259 in QApplication::exec() () at ./src/widgets/kernel/qapplication.cpp:2555
#32 0x00005acc633605ec in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:188
Comment 3 Nate Graham 2024-08-30 16:18:37 UTC
Not the same as Bug 491865, but it's similarly in PipeWire, likely due to the old version.
Comment 4 tctc 2024-08-31 01:46:49 UTC
(In reply to Nate Graham from comment #3)
> Not the same as Bug 491865, but it's similarly in PipeWire, likely due to
> the old version.

Yes, I agree with you. I have downloaded the source code of kpipewire 6.1.4, patched Bug 491865 and updated the related libs in my operating system. after that Bug 491865 is gone.
Comment 5 Nate Graham 2024-09-25 21:05:56 UTC
125 seen per day among Neon users according to https://crash-reports.kde.org/organizations/kde/issues/5819; raising priority.
Comment 6 Fushan Wen 2024-10-15 03:43:22 UTC
Git commit c88b4df25905f52fc7410ad66ba6a334c2be527f by Fushan Wen.
Committed on 15/10/2024 at 03:42.
Pushed by fusionfuture into branch 'master'.

PipeWireSourceStream: work around crashes for pipewire < 0.3.49

Before 0.3.49 pw_stream_update_params will crash when the param list has
nullptr, but Neon only has 0.3.48. This adds a check to make sure the
param list doesn't have nullptr to fix the crash.
SENTRY: PLASMA-WORKSPACE-1R8
FIXED-IN: 6.2.1

M  +3    -0    src/pipewiresourcestream.cpp

https://invent.kde.org/plasma/kpipewire/-/commit/c88b4df25905f52fc7410ad66ba6a334c2be527f
Comment 7 Fushan Wen 2024-10-15 03:45:52 UTC
Git commit eaa5d58bdd9dac8c7ca3d54c227e2f56bb02afb5 by Fushan Wen.
Committed on 15/10/2024 at 03:44.
Pushed by fusionfuture into branch 'Plasma/6.2'.

PipeWireSourceStream: work around crashes for pipewire < 0.3.49

Before 0.3.49 pw_stream_update_params will crash when the param list has
nullptr, but Neon only has 0.3.48. This adds a check to make sure the
param list doesn't have nullptr to fix the crash.
SENTRY: PLASMA-WORKSPACE-1R8
FIXED-IN: 6.2.1


(cherry picked from commit c88b4df25905f52fc7410ad66ba6a334c2be527f)

Co-authored-by: Fushan Wen <qydwhotmail@gmail.com>

M  +3    -0    src/pipewiresourcestream.cpp

https://invent.kde.org/plasma/kpipewire/-/commit/eaa5d58bdd9dac8c7ca3d54c227e2f56bb02afb5