obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
57.22k stars 7.72k forks source link

Segmentation fault Linux #10767

Open Am0rphous opened 1 month ago

Am0rphous commented 1 month ago

Operating System Info

Other

Other OS

Kali-rolling 2024.2 with kernel 6.6.9-amd64

OBS Studio Version

Other

OBS Studio Version (Other)

30.1.2.1-1

OBS Studio Log URL

https://obsproject.com/logs/U3cAGnTTP2c6rUaG

OBS Studio Crash Log URL

No response

Expected Behavior

Does not freeze, so I can click properties on one of the sources.

Current Behavior

Freezes and gives segmentation fault

Steps to Reproduce

  1. Open OBS
  2. Click on one of the sources with webcamera
  3. Click "Properties"
  4. The program freezes

Anything else we should know?

Third-party plugins installed: obs-backgroundremoval

The uploaded log file seems not to capture the error. Running obs in the terminal shows the software gives a segmentation fault:

info: v4l2-input: Start capture from /dev/v4l/by-id/usb-Elgato_Elgato_Facecam_FW31L1A11219-video-index0
error: v4l2-input: Unable to open device
error: v4l2-input: Initialization failed, errno: No such file or directory
info: [obs-backgroundremoval] Background filter created
info: [obs-backgroundremoval] Background filter updated
info: [obs-backgroundremoval] Model models/mediapipe.onnx input 0: name input_1:0 shape (4 dim) 1 x 144 x 256 x 3
info: [obs-backgroundremoval] Model models/mediapipe.onnx output 0: name segment:0 shape (4 dim) 1 x 144 x 256 x 2
info: [obs-backgroundremoval] Allocated 110592 sized float-array for input 0
info: [obs-backgroundremoval] Allocated 73728 sized float-array for output 0
info: [obs-backgroundremoval] Background Removal Filter Options:
info: [obs-backgroundremoval]   Source: Background Removal
info: [obs-backgroundremoval]   Model: models/mediapipe.onnx
info: [obs-backgroundremoval]   Inference Device: cpu
info: [obs-backgroundremoval]   Num Threads: 1
info: [obs-backgroundremoval]   Enable Threshold: true
info: [obs-backgroundremoval]   Threshold: 0.500000
info: [obs-backgroundremoval]   Contour Filter: 0.050000
info: [obs-backgroundremoval]   Smooth Contour: 0.500000
info: [obs-backgroundremoval]   Feather: 0.000000
info: [obs-backgroundremoval]   Mask Every X Frames: 1
info: [obs-backgroundremoval]   Enable Image Similarity: true
info: [obs-backgroundremoval]   Image Similarity Threshold: 35.000000
info: [obs-backgroundremoval]   Blur Background: 0
info: [obs-backgroundremoval]   Enable Focal Blur: false
info: [obs-backgroundremoval]   Blur Focus Point: 0.100000
info: [obs-backgroundremoval]   Blur Focus Depth: 0.000000
info: [obs-backgroundremoval]   Disabled: true
info: [obs-backgroundremoval]   Model file path: /usr/share/obs/obs-plugins/obs-backgroundremoval/models/mediapipe.onnx
[swscaler @ 0x556c80bf0b80] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x556c842cbf00] deprecated pixel format used, make sure you did set range correctly                                                                                             
[swscaler @ 0x556c85167300] deprecated pixel format used, make sure you did set range correctly                                                                                             
info: Switched to scene 'Bakgrunn'                                                                                                                                                          
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Blurry bakgrunn':
info:     - source: 'Cam + Blurry background' (v4l2_input)
info:         - filter: 'Background Removal' (background_removal)
info:         - filter: 'Chroma Key' (chroma_key_filter_v2)
info:     - source: 'Peugeot' (image_source)
info:     - source: 'Firefox' (xcomposite_input)
info: - scene 'Bakgrunn':
info:     - source: 'Peugeot' (image_source)
info:     - source: 'Japan street' (image_source)
info:     - source: 'Red' (image_source)
info:     - source: 'Cam + Blurry background' (v4l2_input)
info:         - filter: 'Background Removal' (background_removal)
info:         - filter: 'Chroma Key' (chroma_key_filter_v2)
info:     - source: 'Kali' (image_source)
info: ------------------------------------------------
info: [obs-backgroundremoval] Background filter activated
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio)

info: v4l2-input: Start capture from /dev/v4l/by-id/usb-Elgato_Elgato_Facecam_FW31L1A11219-video-index0
error: v4l2-input: Unable to open device
error: v4l2-input: Initialization failed, errno: No such file or directory
info: User switched to scene 'Blurry bakgrunn'
info: User switched to scene 'Bakgrunn'
info: [obs-backgroundremoval] Background filter deactivated
info: [obs-backgroundremoval] Background filter activated
zsh: segmentation fault (core dumped)  obs



I used the gdb debugger and got a stack trace. I also printed the cpu registers further down. Here is from my terminal:

gdb /usr/bin/obs
GNU gdb (Debian 13.2-1+b1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/obs...
(No debugging symbols found in /usr/bin/obs)
(gdb) run
Starting program: /usr/bin/obs 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe85ff6c0 (LWP 18190)]
[New Thread 0x7fffe75856c0 (LWP 18191)]
[New Thread 0x7fffe6d846c0 (LWP 18192)]
[New Thread 0x7fffe65836c0 (LWP 18193)]
debug: Found portal inhibitor
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/themes
debug: Attempted path: /usr/share/obs/obs-studio/themes
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
info: CPU Speed: 4303.871MHz
info: Physical Cores: 6, Logical Cores: 12
info: Physical Memory: 32032MB Total, 17592MB Free
info: Kernel Version: Linux 6.6.9-amd64
info: Distribution: "Kali GNU/Linux" "2024.2"
info: Desktop Environment: XFCE (XFCE)
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
[New Thread 0x7fffe51ff6c0 (LWP 18194)]
[New Thread 0x7fffe49fe6c0 (LWP 18195)]
info: Qt Version: 6.4.2 (runtime), 6.4.2 (compiled)
info: Portable mode: false
[New Thread 0x7fffcffff6c0 (LWP 18196)]
info: OBS 30.1.2.1-1 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
[New Thread 0x7fffcf7fe6c0 (LWP 18197)]
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2
info: OpenGL loaded successfully, version 3.3.0 NVIDIA 545.29.02, shading language 3.30 NVIDIA via Cg compiler
info: ---------------------------------
info: video settings reset:
        base resolution:   1920x1080
        output resolution: 1280x720
        downscale filter:  Bicubic
        fps:               30/1
        format:            NV12
        YUV mode:          Rec. 709/Partial
[New Thread 0x7fffc15ff6c0 (LWP 18198)]
info: NV12 texture support not available
info: P010 texture support not available
[New Thread 0x7fffb7fff6c0 (LWP 18199)]
info: Audio monitoring device:
        name: Default
        id: default
info: ---------------------------------
[Detaching after fork from child process 18200]
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
[Detaching after fork from child process 18202]
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
[Detaching after fork from child process 18210]
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
[Detaching after fork from child process 18211]
[New Thread 0x7fffb77fe6c0 (LWP 18212)]
[Detaching after fork from child process 18213]
[Detaching after fork from child process 18214]
[Detaching after fork from child process 18215]
[Detaching after fork from child process 18216]
[Detaching after fork from child process 18225]
info: [pipewire] No captures available
[Detaching after fork from child process 18226]
[Detaching after fork from child process 18227]
[Detaching after vfork from child process 18228]
warning: v4l2loopback not installed, virtual camera disabled
[Detaching after fork from child process 18230]
info: [obs-backgroundremoval] Plugin loaded successfully (version 1.1.13)
info: [obs-backgroundremoval] Failed to open config file /home/henrik/.config/obs-studio/plugin_config/obs-backgroundremoval/config.ini
info: [obs-backgroundremoval] Failed to open config file /home/henrik/.config/obs-studio/plugin_config/obs-backgroundremoval/config.ini
[New Thread 0x7fffaffff6c0 (LWP 18231)]
[Thread 0x7fffaffff6c0 (LWP 18231) exited]
info: [obs-backgroundremoval] Latest release is 1.1.13
[Detaching after fork from child process 18312]
[New Thread 0x7fffaffff6c0 (LWP 18332)]
[New Thread 0x7fffa13ff6c0 (LWP 18333)]
[New Thread 0x7fff98bfe6c0 (LWP 18334)]
[New Thread 0x7fff883fd6c0 (LWP 18335)]
[New Thread 0x7fff7fbfc6c0 (LWP 18336)]
[New Thread 0x7fff7f3fb6c0 (LWP 18337)]
[New Thread 0x7fff6ebfa6c0 (LWP 18338)]
[New Thread 0x7fff663f96c0 (LWP 18339)]
[New Thread 0x7fff65bf86c0 (LWP 18340)]
[New Thread 0x7fff553f76c0 (LWP 18341)]
[New Thread 0x7fff4cbf66c0 (LWP 18342)]
info: NVENC supported
error: VAAPI: Failed to initialize display in vaapi_device_h264_supported
info: FFmpeg VAAPI H264 encoding not supported
error: VAAPI: Failed to initialize display in vaapi_device_av1_supported
info: FFmpeg VAAPI AV1 encoding not supported
error: VAAPI: Failed to initialize display in vaapi_device_hevc_supported
info: FFmpeg VAAPI HEVC encoding not supported
[Thread 0x7fff4cbf66c0 (LWP 18342) exited]
[Thread 0x7fff553f76c0 (LWP 18341) exited]
[Thread 0x7fff65bf86c0 (LWP 18340) exited]
[Thread 0x7fff663f96c0 (LWP 18339) exited]
[Thread 0x7fff6ebfa6c0 (LWP 18338) exited]
[Thread 0x7fff7f3fb6c0 (LWP 18337) exited]
[Thread 0x7fff7fbfc6c0 (LWP 18336) exited]
[Thread 0x7fff883fd6c0 (LWP 18335) exited]
[Thread 0x7fff98bfe6c0 (LWP 18334) exited]
[Thread 0x7fffa13ff6c0 (LWP 18333) exited]
[Thread 0x7fffaffff6c0 (LWP 18332) exited]
[Detaching after fork from child process 18351]
[Detaching after fork from child process 18352]
[Detaching after fork from child process 18353]
[Detaching after fork from child process 18354]
info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.4.2 | RPC Version: 1)
info: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.4.2 | Qt version (run-time): 6.4.2
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 102801
info: [obs-websocket] [obs_module_load] Module loaded.
[Detaching after fork from child process 18355]
[Detaching after fork from child process 18356]
[New Thread 0x7fff4cbf66c0 (LWP 18357)]
[New Thread 0x7fff553f76c0 (LWP 18358)]
[Detaching after fork from child process 18359]
[Detaching after fork from child process 18360]
info: [vlc-video]: VLC 3.0.20 Vetinari found, VLC video source enabled
info: ---------------------------------
info:   Loaded Modules:
info:     vlc-video.so
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-websocket.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     obs-backgroundremoval.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-jack.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info: ---------------------------------
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
[New Thread 0x7fff65bf86c0 (LWP 18361)]
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.6) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor' (default)
info: [Loaded global audio device]: 'Desktop Audio'
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.0.6) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.iec958-stereo.2.monitor' (default)
info: [Loaded global audio device]: 'Mic/Aux'
info: [window-capture: 'Firefox'] update settings:
        title: unknown
        class: unknown
info: v4l2-input: Start capture from /dev/v4l/by-id/usb-Elgato_Elgato_Facecam_FW31L1A11219-video-index0
error: v4l2-input: Unable to open device
error: v4l2-input: Initialization failed, errno: No such file or directory
[New Thread 0x7fff663f96c0 (LWP 18362)]
info: [obs-backgroundremoval] Background filter created
info: [obs-backgroundremoval] Background filter updated
info: [obs-backgroundremoval] Model models/mediapipe.onnx input 0: name input_1:0 shape (4 dim) 1 x 144 x 256 x 3
info: [obs-backgroundremoval] Model models/mediapipe.onnx output 0: name segment:0 shape (4 dim) 1 x 144 x 256 x 2
info: [obs-backgroundremoval] Allocated 110592 sized float-array for input 0
info: [obs-backgroundremoval] Allocated 73728 sized float-array for output 0
info: [obs-backgroundremoval] Background Removal Filter Options:
info: [obs-backgroundremoval]   Source: Background Removal
info: [obs-backgroundremoval]   Model: models/mediapipe.onnx
info: [obs-backgroundremoval]   Inference Device: cpu
info: [obs-backgroundremoval]   Num Threads: 1
info: [obs-backgroundremoval]   Enable Threshold: true
info: [obs-backgroundremoval]   Threshold: 0.500000
info: [obs-backgroundremoval]   Contour Filter: 0.050000
info: [obs-backgroundremoval]   Smooth Contour: 0.500000
info: [obs-backgroundremoval]   Feather: 0.000000
info: [obs-backgroundremoval]   Mask Every X Frames: 1
info: [obs-backgroundremoval]   Enable Image Similarity: true
info: [obs-backgroundremoval]   Image Similarity Threshold: 35.000000
info: [obs-backgroundremoval]   Blur Background: 0
info: [obs-backgroundremoval]   Enable Focal Blur: false
info: [obs-backgroundremoval]   Blur Focus Point: 0.100000
info: [obs-backgroundremoval]   Blur Focus Depth: 0.000000
info: [obs-backgroundremoval]   Disabled: true
info: [obs-backgroundremoval]   Model file path: /usr/share/obs/obs-plugins/obs-backgroundremoval/models/mediapipe.onnx
[swscaler @ 0x55555a516800] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x55555ce21800] deprecated pixel format used, make sure you did set range correctly                                                                                             
[swscaler @ 0x55555dcbcbc0] deprecated pixel format used, make sure you did set range correctly                                                                                             
info: [obs-backgroundremoval] Background filter activated                                                                                                                                   
info: Switched to scene 'Bakgrunn'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Blurry bakgrunn':
info:     - source: 'Cam + Blurry background' (v4l2_input)
info:         - filter: 'Background Removal' (background_removal)
info:         - filter: 'Chroma Key' (chroma_key_filter_v2)
info:     - source: 'Peugeot' (image_source)
info:     - source: 'Firefox' (xcomposite_input)
info: - scene 'Bakgrunn':
info:     - source: 'Peugeot' (image_source)
info:     - source: 'Japan street' (image_source)
info:     - source: 'Red' (image_source)
info:     - source: 'Cam + Blurry background' (v4l2_input)
info:         - filter: 'Background Removal' (background_removal)
info:         - filter: 'Chroma Key' (chroma_key_filter_v2)
info:     - source: 'Kali' (image_source)
info: ------------------------------------------------
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio)

[New Thread 0x7fff33fff6c0 (LWP 18375)]

Thread 1 "obs" received signal SIGSEGV, Segmentation fault.
0x00007ffff2cb4dea in free () from /lib/x86_64-linux-gnu/libc.so.6

(gdb) bt
#0  0x00007ffff2cb4dea in free () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffc3fb6c9d in ?? () from /usr//lib/x86_64-linux-gnu/obs-plugins/linux-v4l2.so
#2  0x00007fffc3fb70a5 in ?? () from /usr//lib/x86_64-linux-gnu/obs-plugins/linux-v4l2.so
#3  0x00007ffff7da036e in obs_source_properties () from /lib/x86_64-linux-gnu/libobs.so.0
#4  0x000055555566fa9d in ?? ()
#5  0x00007ffff33723e0 in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#6  0x00007ffff4454626 in QFrame::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#7  0x00007ffff4382d62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#8  0x00007ffff33356d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#9  0x00007ffff33358b7 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#10 0x00007ffff3525257 in ?? () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#11 0x00007ffff310de1f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff310fea7 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff31104c0 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff3522f60 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#15 0x00007ffff333f5ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#16 0x00007ffff33385ca in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#17 0x00005555555f1d7c in ?? ()
#18 0x00007ffff2c42c8a in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#19 0x00007ffff2c42d45 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#20 0x00005555555f4651 in ?? ()

(gdb) info registers
rax            0xffffffff          4294967295
rbx            0xfffffffffffffe78  -392
rcx            0x7ffff2cece30      140737267027504
rdx            0x0                 0
rsi            0x3a800000250       4020089389648
rdi            0x3a800000260       4020089389664
rbp            0x5555565c3f00      0x5555565c3f00
rsp            0x7fffffffbc50      0x7fffffffbc50
r8             0x0                 0
r9             0x72                114
r10            0x7ffff2c2c8a8      140737266239656
r11            0x7ffff2cb4dd0      140737266798032
r12            0x7fffe000a2e0      140736951526112
r13            0x0                 0
r14            0x5555578a4540      93825029260608
r15            0xffffffff          4294967295
rip            0x7ffff2cb4dea      0x7ffff2cb4dea <free+26>
eflags         0x10206             [ PF IF RF ]
cs             0x33                51
ss             0x2b                43
ds             0x0                 0
es             0x0                 0
fs             0x0                 0
gs             0x0                 0
Am0rphous commented 1 month ago

sudo dmesg shows error in file libc.so.6

[ 1934.165278] obs[33661]: segfault at 3c30000025a ip 00007fc8f18b4dea sp 00007ffe1136ed90 error 4 in libc.so.6[7fc8f1841000+157000] likely on CPU 9 (core 3, socket 0)
[ 1934.165288] Code: e8 3b c0 f9 ff 66 66 2e 0f 1f 84 00 00 00 00 00 48 85 ff 0f 84 bf 00 00 00 55 48 8d 77 f0 53 48 83 ec 18 48 8b 1d 16 c0 13 00 <48> 8b 47 f8 64 8b 2b a8 02 75 5b 48 8b 15 a4 bf 13 00 64 48 83 3a
kkartaltepe commented 1 month ago

You will need to install debug symbols and make the backtrace again for it to be useful.