Screen share causes segmentation fault in Wayland

Bug #2074358 reported by Nathan Teodosio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Fix Released
Critical
Nathan Teodosio

Bug Description

latest/candidate: 127.0.6533.72 2024-07-26 (2919) 176MB -

Trying to share screen in Wayland causes segmentation fault. Not happening in latest/stable: 126.0.6478.182 2024-07-19 (2910).

--->
[W][06188.305863] default | [ thread.c: 137 pw_thread_utils_set()] pw_thread_utils_set is deprecated and does nothing anymore
[0729/101708.956104:ERROR:ptracer.cc(605)] ptrace: Input/output error (5)
[0729/101709.056429:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0729/101709.082714:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0729/101709.096608:WARNING:thread_snapshot_linux.cc(112)] Unknown scheduling policy 1073741824
[0729/101709.099478:WARNING:thread_snapshot_linux.cc(112)] Unknown scheduling policy 1073741824
Segmentation fault (core dumped)
<---

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

We're using 24.04's Pipewire to build Chromium (as it will fail to build with 22.04's).

Chromium's snapcraft.yaml furthermore specifies

  PIPEWIRE_MODULE_DIR: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/pipewire-0.3

It is however not being respected as, inside the snap,

  PIPEWIRE_MODULE_DIR=/snap/chromium/2916/gnome-platform/usr/lib/x86_64-linux-gnu/pipewire-0.3

That's 22.04's Pipewire as Chromium candidate and stable are still on core22.

tags: added: core22 pipewire wayland
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Problem located:

--->
% cat /snap/chromium/current/snap/command-chain/desktop-launch
#!/bin/bash

set -- "${SNAP}/gnome-platform/command-chain/desktop-launch" "$@"
# shellcheck source=/dev/null
source "${SNAP}/snap/command-chain/run"
<---

And ${SNAP}/gnome-platform/command-chain/desktop-launch forces

--->
# Tell Pipewire where to find its configuration and plugins
export PIPEWIRE_CONFIG_DIR="$SNAP_DESKTOP_RUNTIME/usr/share/pipewire"
export PIPEWIRE_MODULE_DIR="$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/pipewire-0.3"
export SPA_PLUGIN_DIR="$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/spa-0.2"
<---

This is 8 months old[1] so that is why we didn't get it last year, which was the last time we used this work-around.

There is already a merge request[2] addressing this.

[1] https://github.com/snapcore/snapcraft-desktop-integration/blame/main/common/desktop-exports#L131
[2] https://github.com/snapcore/snapcraft-desktop-integration/pull/24

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

James provided an alternative that I verified to solve the issue.

jamesh: I know we had trouble with some Rust apps due to pipewire-rs being incompatible with the old Pipewire[1]. But for some of those cases, the resulting binaries actually worked with the core22 pipewire since they weren't using any of the newer features the binding covered. I wonder if Chromium is similar?
nteodosio: No, it does cause a segmentation fault when attempting a screen share, <LP#2074358>. jamesh: You'll get a segfault if you mix one version of libpipewire/libspa with a different version of the plugins. One test would be to unpack the snap with unsquashfs, remove all pipewire libraries and plugins, and repack it with snap pack. See if it still crashes.

[1] https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/75

Changed in chromium-browser (Ubuntu):
status: Triaged → Fix Committed
Changed in chromium-browser (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.