xdg-desktop-portal-wlr: Segfault - While screencasting (firefox nightly WebRTC).
Hi @danshick great work.
I’ve got this working on the Mozilla WebRTC demo in firefox nightly, and can see my screen being shared. After a few seconds I get the following segfault:
I ran the tools with the following command lines:
env PIPEWIRE_DEBUG=3 pipewire 2>&1 | tee pipewire.log
gdb --args xdg-desktop-portal-wlr -p BGRx -l TRACE
/usr/local/libexec/xdg-desktop-portal --verbose -r
(gdb) bt
#0 0x0000005400000003 in ?? ()
#1 0x00007ffff7e9b83b in clear_buffers (stream=stream@entry=0x5555555a67a0) at ../src/pipewire/stream.c:570
#2 0x00007ffff7ea3d64 in impl_port_set_param (object=0x5555555a67a0, direction=<optimised out>, port_id=<optimised out>, id=4, flags=<optimised out>, param=<optimised out>) at ../src/pipewire/stream.c:608
#3 0x00007ffff7e9735e in pw_impl_port_set_param (port=port@entry=0x5555555a8c00, id=id@entry=4, flags=flags@entry=0, param=param@entry=0x0) at ../src/pipewire/impl-port.c:1143
#4 0x00007ffff6989a88 in client_node_port_set_param (object=<optimised out>, direction=<optimised out>, port_id=<optimised out>, id=<optimised out>, flags=0, param=0x0) at ../src/modules/module-client-node/remote-node.c:576
#5 0x00007ffff699b55f in client_node_demarshal_port_set_param (object=0x7ffff68a7010, msg=<optimised out>) at ../src/modules/module-client-node/protocol-native.c:451
#6 0x00007ffff69d361d in process_remote (impl=impl@entry=0x555555594440) at ../src/modules/module-protocol-native.c:667
#7 0x00007ffff69d3b78 in on_remote_data (data=0x555555594440, fd=<optimised out>, mask=<optimised out>) at ../src/modules/module-protocol-native.c:707
#8 0x00007ffff7fc3edc in loop_iterate (object=0x55555556ef28, timeout=<optimised out>) at ../spa/plugins/support/loop.c:302
#9 0x0000555555557d8a in main ()
(gdb)
Let me know if I can get more information or help you debug. I’ve pulled everything from the latest master branch and compiled.
Thanks for your efforts.
James
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 18 (1 by maintainers)
You should be able to make something work using the aur source https://aur.tuna.tsinghua.edu.cn/packages/fedora-firefox-wayland-bin/. There’s a
rpmlisted there and some changes can be followed in the PKGBUILD (see prepare section). Hope this helps.Okay, I’ve never tested a version of Firefox with these specific patches. I can’t promise I’ll be able to reproduce this soon, but I’ll see what I can do. Flatpak really complicates things.
Hi @danshick @soyuka
I’m using the flatpak built nightly with built-in support from: https://firefox-flatpak.mojefedora.cz/
Also I’m on Ubuntu 20.04, but most of the packages in play here are self compiled (AFAIK).
Just did a flatpak update to the latest and get the same result.
Best
James
I just noticed @jameswalmsley, you’re using Firefox Nightly. Where are you getting it (what distro and package)?
I haven’t looked into the pipewire logs yet in depth. Nothing you’re seeing there looks out of the ordinary or problematic to me.
This is the issue preventing Firefox from building with pipewire support…https://bugzilla.mozilla.org/show_bug.cgi?id=1430775
It is a tricky fix because it has to do with the build tool in use, and its inability to set custom flags. For now, patched releases will have to do.
Have either of you built the changes in xdpw that were merged this morning for session support?
Edit:
And @jameswalmsley, could you provide a more complete backtrace? Maybe run xdpw in gdb and do a
bt fullafter the segfault? I’m hoping to see if there was any additional context as the segfault is occurring pretty deep into the linked pipewire plugin code.Latest master for me with
fedora-firefox-wayland-bin(from aur), using https://mozilla.github.io/webrtc-landing/gum_test.html full screen sharing. Pipewire logs:The
xdg-portal-wlrdoesn’t segfault though (latest master):Hope that helps.