Bug 489314 - Plasma crashing in a loop in DataControlSource::zwlr_data_control_source_v1_send() on Wayland with certain clipboard content
Summary: Plasma crashing in a loop in DataControlSource::zwlr_data_control_source_v1_s...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 6.2.0
Platform: Other Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression, wayland-only
: 495896 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-27 14:59 UTC by Nate Graham
Modified: 2024-11-14 17:38 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2024-06-27 14:59:29 UTC
With today's git master (086a1a5375714a7899200e1d83d392c7275608d9 in plasma-desktop, d5cf7ef122647f5f1c1eadc000bc2a9f277fd26e in plasma-workspace), plasmashell crashes in a loop for me with certain content in the clipboard.

I say "certain" because the issue went away after I cleared the clipboard. I was unable to save the contents because my system was OOMing due to repeated crashing triggering gdb multiple times in the background, and I was trying random things to try to get my system usable again and prevent the OOM killer from destroying everything.

Crash backtrace:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/home/nate/kde/usr/bin/plasmashell --no-respawn'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11,
    no_tid=no_tid@entry=0) at pthread_kill.c:44
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x7f3a8df77b80 (LWP 159237))]
(gdb) bt
#0  __pthread_kill_implementation
    (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f3a932ab1b3 in __pthread_kill_internal (threadid=<optimized out>, signo=11)
    at pthread_kill.c:78
#2  0x00007f3a9325365e in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007f3a96f329eb in KCrash::defaultCrashHandler (sig=11)
    at /home/nate/kde/src/kcrash/src/kcrash.cpp:597
#4  0x00007f3a93253710 in <signal handler called> () at /lib64/libc.so.6
#5  0x00000000208e0e10 in ??? ()
#6  0x00007f3a939e3aa4 in QMimeData::hasImage (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/tools/qarraydatapointer.h:439
#7  0x00007f3a95db9034 in DataControlSource::zwlr_data_control_source_v1_send
    (this=0x1ee2e990, mime_type=..., fd=71)
    at /home/nate/kde/src/kguiaddons/src/systemclipboard/waylandclipboard.cpp:327
#8  0x00007f3a95dafa54 in QtWayland::zwlr_data_control_source_v1::handle_send
    (data=0x1ee2e9a0, object=<optimized out>, mime_type=0x7f3a6c00fd3c "text/plain;charset=utf-8", fd=71) at /home/nate/kde/build/kguiaddons/src/qwayland-wlr-data-control-unstable-v1.cpp:309
#9  0x00007f3a93eb2056 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#10 0x00007f3a93eae6a0 in ffi_call_int
    (cif=cif@entry=0x7ffd63cdb390, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#11 0x00007f3a93eb14ee in ffi_call
    (cif=cif@entry=0x7ffd63cdb390, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffd63cdb460) at ../src/x86/ffi64.c:710
#12 0x00007f3a971e7f2e in wl_closure_invoke
    (closure=closure@entry=0x7f3a6c00fc60, target=<optimized out>,
    target@entry=0x1fde4210, opcode=opcode@entry=0, data=<optimized out>, flags=1)
    at ../src/connection.c:1025
#13 0x00007f3a971e87a3 in dispatch_event (display=display@entry=0x1d0b79b0, queue=0x1d0b7aa0)
    at ../src/wayland-client.c:1631
#14 0x00007f3a971e8a4c in dispatch_queue (queue=0x1d0b7aa0, display=0x1d0b79b0)
    at ../src/wayland-client.c:1777
#15 wl_display_dispatch_queue_pending (display=0x1d0b79b0, queue=0x1d0b7aa0)
    at ../src/wayland-client.c:2019
#16 0x00007f3a952cbc22 in QtWaylandClient::QWaylandDisplay::flushRequests (this=<optimized out>)
    at /usr/src/debug/qt6-qtwayland-6.7.1-1.fc40.x86_64/src/client/qwaylanddisplay.cpp:227
#17 0x00007f3a939faac0 in doActivate<false> (sender=0x1d0b4dd0, signal_index=4, argv=0x7ffd63cdb6b8)
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/kernel/qobject.cpp:4098
#18 0x00007f3a939f0b47 in QMetaObject::activate
    (sender=sender@entry=0x1d0b4dd0, m=m@entry=0x7f3a93e7fa60 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0)
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/kernel/qobject.cpp:4146
#19 0x00007f3a939921c7 in QAbstractEventDispatcher::awake (this=this@entry=0x1d0b4dd0)
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/redhat-linux-build/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:158
#20 0x00007f3a93c7cb8b in QEventDispatcherGlib::processEvents (this=0x1d0b4dd0, flags=...)
--Type <RET> for more, q to quit, c to continue without paging--c
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:401
#21 0x00007f3a939a2713 in QEventLoop::exec (this=this@entry=0x7ffd63cdb800, flags=...,
    flags@entry=...) at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/global/qflags.h:34
#22 0x00007f3a9399e69c in QCoreApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/global/qflags.h:74
#23 0x00007f3a943d53dd in QGuiApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/gui/kernel/qguiapplication.cpp:1926
#24 0x00007f3a9638b0d9 in QApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/widgets/kernel/qapplication.cpp:2555
#25 0x0000000000427a86 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/nate/kde/src/plasma-workspace/shell/main.cpp:188


d5cf7ef122647f5f1c1eadc000bc2a9f277fd26e looks suspicious.
Comment 1 Akseli Lahtinen 2024-06-28 08:17:26 UTC
Looking at DataControlSource::zwlr_data_control_source_v1_send theres some trouble with mimeType being null out of sudden. I guess we should have a guard there just in case.
Comment 2 Nate Graham 2024-11-14 17:37:30 UTC
*** Bug 495896 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2024-11-14 17:38:32 UTC
Bug 495896 also encountered this when dragging any widget from Widget Explorer to the desktop. I can't reproduce that.