Bug 458336

Summary: Krfb crashes after some time on Wayland/PipeWire
Product: [Applications] krfb Reporter: Prajna Sariputra <putr4.s>
Component: generalAssignee: George Goldberg <grundleborg>
Status: RESOLVED FIXED    
Severity: normal CC: antti.savo, zawertun
Priority: NOR    
Version: 22.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Stack trace from gdb

Description Prajna Sariputra 2022-08-26 09:36:32 UTC
Created attachment 151609 [details]
Stack trace from gdb

SUMMARY
On Plasma Wayland Krfb eventually crashes with a segmentation fault after some time (under 10 minutes usually), while on X11 Krfb stays working (for over 30 minutes at least) just fine. It seems like the crash does not appear as quickly if there is not much going on in the shared screen.

I also tried both allowing remote input/control and disabling it, Krfb still crashes regardless.

STEPS TO REPRODUCE
1. Run Krfb on Wayland
2. Connect to the system using a VNC viewer (I used bVNC Pro on Android as well as KRDC locally, same results)
3. Continue working as normal

OBSERVED RESULT
Krfb inevitably crashes after some time.

EXPECTED RESULT
Krfb does not crash.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530

ADDITIONAL INFORMATION
I have attached a stack trace from gdb (obtained by running `thread apply all bt` on the coredump).
Comment 1 Prajna Sariputra 2022-08-26 09:39:28 UTC
The output when running from a terminal:

Initializing D-Bus connectivity with XDG Desktop Portal
DBus session created:  "/org/freedesktop/portal/desktop/request/1_150/krfb2570626603"
Initializing Pipewire connectivity
Stream state changed:  connecting
Stream state changed:  paused
Stream format changed
Stream state changed:  streaming
[1]    5767 segmentation fault (core dumped)  krfb
Comment 2 Prajna Sariputra 2022-08-31 07:39:28 UTC
I also tried using `krfb-virtualmonitor`, and it too keeps crashing like normal Krfb. Although, if I never connect a VNC client to it and instead stream the virtual screen using OBS or whatever else no crash occurs.

Additionally I tried plain Krfb on an openSUSE Tumbleweed VM and connecting to it using KRDC, and Krfb ends up crashing there as well.
Comment 3 Antti Savolainen 2024-03-30 13:33:01 UTC
Can you retest this issue? There's been changes and as of 6.0.3 I can no longer cause krfb-virtualmonitor to crash nor can I use it to crash plasmashell.
Comment 4 Prajna Sariputra 2024-03-30 14:58:34 UTC
krfb-virtualmonitor did manage to last more than 30mins this time it seems, so yeah seems fixed now.