Bug 474059 - kwin_wayland crashed in PipeWire code while doing an in-place software upgrade that upgraded PipeWire
Summary: kwin_wayland crashed in PipeWire code while doing an in-place software upgrad...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 474056 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-02 14:31 UTC by Nate Graham
Modified: 2023-09-27 02:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
coredumpctl dump 2> (10.02 KB, text/plain)
2023-09-27 02:49 UTC, idoitprone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-09-02 14:31:59 UTC
KWin from yesterday's Plasma 6 git master.


STEPS TO REPRODUCE
1. Do an in-place upgrade of the system that includes a new version of PipeWire
2. Do something light on the machine that does *not* involve showing KPipeWire-provided Task Manager thumbnails

OBSERVED RESULT
kwin_wayland crashed in suspiciously in PipeWire code:

#0  spa_list_insert (elem=0x3b2e6c0, list=0x800000007000000) at ../spa/include/spa/utils/list.h:44
#1  create_mix (data=data@entry=0x3057288, port=port@entry=0x3e0e200, mix_id=mix_id@entry=4294967295, 
    peer_id=peer_id@entry=4294967295) at ../src/modules/module-client-node/remote-node.c:189
#2  0x00007fd836d3864d in do_node_init (data=0x3057288)
    at ../src/modules/module-client-node/remote-node.c:964
#3  node_export (core=<optimized out>, object=<optimized out>, do_free=<optimized out>, 
    user_data_size=<optimized out>) at ../src/modules/module-client-node/remote-node.c:1250
#4  0x00007fd8740eba69 in pw_core_export (core=0x41099a0, 
    type=0x7fd874146259 "PipeWire:Interface:Node", props=0x0, object=0x3e0dca0, user_data_size=0)
    at ../src/pipewire/core.c:279
#5  0x00007fd874130f2e in pw_stream_connect (stream=0x40cb6d0, direction=SPA_DIRECTION_OUTPUT, 
    target_id=<optimized out>, flags=<optimized out>, params=<optimized out>, 
    n_params=<optimized out>) at ../src/pipewire/stream.c:2112
#6  0x00007fd8741cb2b8 in KWin::ScreenCastStream::createStream (this=this@entry=0x39cf710)
    at /usr/include/qt6/QtCore/qarraydatapointer.h:104
#7  0x00007fd8741cb909 in KWin::ScreenCastStream::init (this=this@entry=0x39cf710)
    at /home/nate/kde/src/kwin/src/plugins/screencast/screencaststream.cpp:357
#8  0x00007fd8741c2a6e in KWin::ScreencastManager::integrateStreams (this=<optimized out>, 
    waylandStream=0x34e75a0, stream=0x39cf710)
    at /home/nate/kde/src/kwin/src/plugins/screencast/screencastmanager.cpp:219
#9  0x00007fd897fde394 in QtPrivate::QSlotObjectBase::call (a=0x7ffe5dd836b0, r=0x1b2f600, 
    this=0x21bf560)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobjectdefs_impl.h:363
#10 doActivate<false> (sender=0x21be8f0, signal_index=5, argv=0x7ffe5dd836b0)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:3992
#11 0x00007fd897fd4e17 in QMetaObject::activate (sender=<optimized out>, 
    m=m@entry=0x7fd89b96b160 <KWaylandServer::ScreencastV1Interface::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffe5dd836b0)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:4052
#12 0x00007fd89b6d8c65 in KWaylandServer::ScreencastV1Interface::windowScreencastRequested (
    this=<optimized out>, _t1=<optimized out>, _t2=..., _t3=<optimized out>)
    at /home/nate/kde/build6/kwin/src/kwin_autogen/include/moc_screencast_v1_interface.cpp:459
#13 0x00007fd89b7b72d3 in QtWaylandServer::zkde_screencast_unstable_v1::handle_stream_window (
    client=<optimized out>, resource=<optimized out>, stream=370, 
    window_uuid=0x3ea3980 "{5d9f5314-f2c4-46d7-9a49-b260fd34c7fe}", pointer=1)
    at /home/nate/kde/build6/kwin/src/wayland/qwayland-server-zkde-screencast-unstable-v1.cpp:262
#14 0x00007fd897496be6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#15 0x00007fd8974934bf in ffi_call_int (cif=cif@entry=0x7ffe5dd83930, fn=<optimized out>, 
    rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0)
    at ../src/x86/ffi64.c:673
#16 0x00007fd89749618e in ffi_call (cif=cif@entry=0x7ffe5dd83930, fn=<optimized out>, 
    rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffe5dd83a00) at ../src/x86/ffi64.c:710
#17 0x00007fd89affe521 in wl_closure_invoke (closure=0x3ea38a0, flags=<optimized out>, 
    target=<optimized out>, opcode=1, data=<optimized out>) at ../../src/wayland/src/connection.c:1025
#18 0x00007fd89aff9a92 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, 
    data=0x2df0a30) at ../../src/wayland/src/wayland-server.c:438
#19 0x00007fd89affc652 in wl_event_loop_dispatch (loop=0x1ad85a0, timeout=<optimized out>)
    at ../../src/wayland/src/event-loop.c:1104
#20 0x00007fd89b698c64 in KWaylandServer::Display::dispatchEvents (this=<optimized out>)
    at /home/nate/kde/src/kwin/src/wayland/display.cpp:113
#21 0x00007fd897fde394 in QtPrivate::QSlotObjectBase::call (a=0x7ffe5dd83eb0, r=0x1b6bf40, 
    this=0x1e7d5a0)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobjectdefs_impl.h:363
#22 doActivate<false> (sender=0x1b5d340, signal_index=3, argv=0x7ffe5dd83eb0)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:3992
#23 0x00007fd897fd4e17 in QMetaObject::activate (sender=sender@entry=0x1b5d340, 
    m=m@entry=0x7fd89840a0a0, local_signal_index=local_signal_index@entry=0, 
    argv=argv@entry=0x7ffe5dd83eb0)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:4052
#24 0x00007fd897feebfd in QSocketNotifier::activated (this=this@entry=0x1b5d340, _t1=..., 
    _t2=<optimized out>, _t3=...)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/redhat-linux-build/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:231
#25 0x00007fd897fef3fb in QSocketNotifier::event (this=0x1b5d340, e=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qsocketnotifier.cpp:326
#26 0x00007fd8993c0af8 in QApplicationPrivate::notify_helper (this=<optimized out>, 
    receiver=0x1b5d340, e=0x7ffe5dd84000)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287
#27 0x00007fd897f7cdb8 in QCoreApplication::notifyInternal2 (receiver=0x1b5d340, event=0x7ffe5dd84000)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1118
#28 0x00007fd897f7cfbd in QCoreApplication::sendEvent (receiver=<optimized out>, 
    event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1536
#29 0x00007fd8980fe10e in QEventDispatcherUNIXPrivate::activateSocketNotifiers (
    this=this@entry=0x1b5a0b0)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_unix.cpp:268
#30 0x00007fd8980fea37 in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_unix.cpp:477
#31 0x00007fd898d40092 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...)
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/gui/platform/unix/qunixeventdispatcher.cpp:27
#32 0x00007fd897f899f3 in QEventLoop::exec (this=this@entry=0x7ffe5dd841c0, flags=..., 
    flags@entry=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:34
#33 0x00007fd897f8569d in QCoreApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:74
#34 0x00007fd8987f917d in QGuiApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/gui/kernel/qguiapplication.cpp:1908
#35 0x00007fd8993c0a69 in QApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:2566
#36 0x00000000004308e8 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/nate/kde/src/kwin/src/main_wayland.cpp:613

Normally I do offline upgrades, but Discover is somewhat broken in Plasma 6 right now, so I have been doing `sudo dnf update` instead recently.

I can't be sure that the in-place upgrade triggered this, but the timing seems suspicious to me. I was not doing anything that should have triggered any pipewire-related code to be run, though. And it's clearly not ideal for kwin_wayland to crash when performing in-place upgrades. :)
Comment 1 Zamundaaa 2023-09-02 19:03:12 UTC
Sadly Pipewire doesn't guarantee that in-place upgrades work without crashes at the moment, see https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3243
Comment 2 Zamundaaa 2023-09-02 19:03:35 UTC
*** Bug 474056 has been marked as a duplicate of this bug. ***
Comment 3 medin 2023-09-02 20:14:31 UTC
Today, after two hours of typing, I lost some important XML files that I was filling using text editor, normally when Plasma crashes it simply restarts and all apps stay opened, but in this case all my apps were closed and there was no way to recover previous working data.
Comment 4 Nate Graham 2023-09-02 21:22:50 UTC
Plasma isn't crashing, it's KWin.

With Qt 6.6, your Qt-based apps should survive the crash though.
Comment 5 medin 2023-09-02 21:28:55 UTC
(In reply to Nate Graham from comment #4)
> Plasma isn't crashing, it's KWin.
> 
> With Qt 6.6, your Qt-based apps should survive the crash though.

Good to hear, and hope for also non Qt apps to be included ;)
Comment 6 idoitprone 2023-09-27 02:49:47 UTC
Created attachment 161896 [details]
coredumpctl dump 2>

The coredump is a 127 MB binary. I do not know how upload the whole coredump. I uploaded the text file only
Comment 7 idoitprone 2023-09-27 02:50:21 UTC
I apologize wrong bug. Please ignore my attachment