Skip to content

Segfault in pipewire.c (Wayland) #5468

@outfrost

Description

@outfrost

Operating System Info

Other

Other OS

Manjaro stable

OBS Studio Version

27.1.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/6cmcf_nCJdt-Kqoe

OBS Studio Crash Log URL

No response

Expected Behavior

Sustained broadcast/recording with no crashes

Current Behavior

Unpredictable crashes every 5 to 180 minutes

Steps to Reproduce

  1. Run obs on Wayland
  2. Use a screen capture via PipeWire
  3. Start recording
  4. Wait anywhere between 5 to 180 minutes

Anything else we should know?

I'm using:

  • OBS Studio 27.1.3, built from aur: obs-studio-browser, with obs-browser, obs-vst, CEF compatibility patch and python binary loading patch
  • KDE Plasma 5.22.5
  • plasma-wayland-session
  • Qt 5.15.2
  • PipeWire 0.3.38
  • cef-minimal 94.4.9

During recent streaming sessions, I've encountered a lot of random crashes, sometimes minutes apart, sometimes after a couple hours of streaming. Running with debug symbols under gdb has revealed a segfault at plugins/linux-capture/pipewire.c:478:

Thread 73 "PipeWire thread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffe737fe640 (LWP 8002)]
on_process_cb (user_data=0x55555628dd20) at /usr/src/debug/obs-studio-browser/plugins/linux-capture/pipewire.c:478
478     /usr/src/debug/obs-studio-browser/plugins/linux-capture/pipewire.c: No such file or directory.
(gdb) backtrace -full
#0  on_process_cb (user_data=0x55555628dd20) at /usr/src/debug/obs-studio-browser/plugins/linux-capture/pipewire.c:478
        bitmap = 0x7fff0bfdf424
        format = GS_BGRA
        obs_pw = 0x55555628dd20
        cursor = 0x7fff0c00f728
        drm_format = 4294769916
        region = <optimized out>
        buffer = <optimized out>
        b = 0x5555588b4758
        swap_red_blue = <optimized out>
        has_buffer = <optimized out>
#1  0x00007fff503f5b68 in  () at /usr/lib/libpipewire-0.3.so.0
#2  0x00007fff504807d9 in  () at /usr/lib/spa-0.2/support/libspa-support.so
#3  0x00007fff5047cac6 in  () at /usr/lib/spa-0.2/support/libspa-support.so
#4  0x00007fff50480e8b in  () at /usr/lib/spa-0.2/support/libspa-support.so
#5  0x00007fff503f8fdf in  () at /usr/lib/libpipewire-0.3.so.0
#6  0x00007ffff630c259 in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007ffff4ac55e3 in clone () at /usr/lib/libc.so.6

Given that line 478 nullchecks the pointer before using it, I assume it must be a dangling pointer. I'm not sure where to go looking from there, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfirmedThis bug report has been confirmed by project membersDependency IssueIssue is in external library or dependency, not OBS itselfLinuxAffects Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions