Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault during playback #341

Closed
MightyMrMuesli opened this issue Dec 2, 2022 · 18 comments
Closed

Segmentation fault during playback #341

MightyMrMuesli opened this issue Dec 2, 2022 · 18 comments
Labels
bug Something isn't working

Comments

@MightyMrMuesli
Copy link

Since the update to mpv 0.35.0 from 0.34.1 and rebuild of Jellyfin Media Player with the new libmpv the app crashes reproducibly and constantly during playback if you skip, pause, resume or jump in a video. Cross-tested with Jellyfin for Android and exoplayer, no issues there, so I guess it isn't a problem in jellyfin-web. Logs appended, here's the segfault from terminal launch:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
libpng warning: iCCP: known incorrect sRGB profile
Logging to /home/eanor/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
Cannot load libcuda.so.1
Segmentation fault (core dumped)

Steps to reproduce the behavior:

  1. Open Jellyfin Media Player build with libmpv from mpv 0.35.0
  2. Play a random video
  3. Pause, resume, skip or jump in the video
  4. App crashes with segmentation fault

Desktop

  • OS: Arch Linux with mpv 0.35.0
  • Jellyfin Media Player 1.7.1
  • Build from Source via AUR package

jellyfinmediaplayer.log

@MightyMrMuesli MightyMrMuesli added the bug Something isn't working label Dec 2, 2022
@IAmTheMilkManMyMilkIsDelicious

I have the exact same issue, I start using QT_QPA_PLATFORM=wayland but it's the same regardless:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QSocketNotifier: Can only be used with threads started with QThread
libpng warning: iCCP: known incorrect sRGB profile
Logging to /home/user/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
Cannot load libcuda.so.1
zsh: segmentation fault (core dumped)  QT_QPA_PLATFORM=wayland QT_QPA_PLATFORMTHEME='gnome' jellyfinmediaplayer

Seems to require some interaction, clicking next, skipping ahead, but it might not happen every time. Since the issue happens after the line Cannot load libcuda, and cuda is nvidias GPU acceleration library, i thought it would be related to hardware decoding. So I went into Client Settings > HardwareDecoding and set it to decode.disabled.

This didn't fix the issue, and it crashed again with the same error, including the libcuda warning. I don't even have an nvidia GPU either.

@SupahXYT
Copy link

SupahXYT commented Dec 4, 2022

I also have the same issue, Arch Linux and everything.

libpng warning: iCCP: known incorrect sRGB profile
Logging to /home/supax/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
Cannot load libcuda.so.1
Failed to open VDPAU backend libvdpau_radeonsi.so: cannot open shared object file: No such file or directory
[1]    128076 segmentation fault (core dumped)  jellyfinmediaplayer

I tried running export VDPAU_DRIVER=va_gl to fix the VDPAU error hoping it'd work but it still crashed anyway.

libpng warning: iCCP: known incorrect sRGB profile
Logging to /home/supahx/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
Cannot load libcuda.so.1
[1]    129923 segmentation fault (core dumped)  jellyfinmediaplayer

There is a comment on the AUR page stating this is due to an mpv update and that rebuilding with paru -S jellyfin-media-player --rebuild is supposed to fix the issue but that also didn't work.

@MightyMrMuesli
Copy link
Author

I have the exact same issue, I start using QT_QPA_PLATFORM=wayland but it's the same regardless:

Even with export QT_QPA_PLATFORM=wayland jellyfinmediaplayer the warning will be displayed, but I've tried switching over to X11 and am still getting segfaults.

Seems to require some interaction, clicking next, skipping ahead, but it might not happen every time. Since the issue happens after the line Cannot load libcuda, and cuda is nvidias GPU acceleration library, i thought it would be related to hardware decoding. So I went into Client Settings > HardwareDecoding and set it to decode.disabled.

This didn't fix the issue, and it crashed again with the same error, including the libcuda warning. I don't even have an nvidia GPU either.

The libcuda warning is a bug in the ffmpeg autoloading mechanism according to the mpv guys. It doesn't have any effect and is just a warning at startup, but for thoroughness' sake I've created ~/.local/share/jellyfinmediaplayer/mpv.conf and wrote gpu-hwdec-interop=vaapi-egl in it. The warning is removed but the segfault issue still prevails. This seems to be an unstable debug option so use at own risk.

There is a comment on the AUR page stating this is due to an mpv update and that rebuilding with paru -S jellyfin-media-player --rebuild is supposed to fix the issue but that also didn't work.

The rebuild fix was for the instantaneous crash at the app startup because of the new libmpv, see #336.

@trentks
Copy link

trentks commented Dec 7, 2022

Same fault, same symptoms (segfault when skipping around the video). I'm on Manjaro, just updated to the latest jellyfinmediaplayer (v 1.7.1 or 1.7.1-3 on the AUR).

Here's a sample of the log file (~/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log) just as I'm skipping around, and prior to the segfault (this log runs right up to the segfault):

2022-12-07 15:20:06 [ INFO  ] JS: Sending web socket message: KeepAlive 
2022-12-07 15:20:06 [ INFO  ] JS: Received KeepAlive from server. 
2022-12-07 15:20:09 [ INFO  ] JS: Requesting url without automatic networking: http://192.168.100.100:8096/Sessions/Playing/Progress 
2022-12-07 15:20:19 [ INFO  ] JS: Requesting url without automatic networking: http://192.168.100.100:8096/Sessions/Playing/Progress 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: queuing seek to 3110.988000 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: cached range 0: 3129.710000 <-> 3513.171667 (bof=0, eof=1) 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: execute seek (to 3110.988000 flags 32) 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ffmpeg: stream level seek from 2237523767 to 2013491055 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - cplayer: hr-seek, skipping to 3110.988000 
2022-12-07 15:20:27 [ INFO  ] PlayerComponent.cpp @ 460 - Entering state: buffering 
2022-12-07 15:20:27 [ INFO  ] JS: Requesting url without automatic networking: http://192.168.100.100:8096/Sessions/Playing/Progress 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pipewire: PipeWire does not have any audio sinks, skipping 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pulse: Library version: 16.1.0 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pulse: Proto: 35 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pulse: Server proto: 4294967295 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: seek done 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - vd: Decoder format: 1920x1080 [0:1] yuv420p10 auto/auto/auto/limited/auto CL=mpeg2/4/h264 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - vd: Using container aspect ratio. 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - cplayer: first video frame after restart shown 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - cplayer: audio ready 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - cplayer: starting audio playback 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pulse: starting AO 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - cplayer: playback restart complete @ 3110.983000, audio=playing, video=playing 
2022-12-07 15:20:27 [ INFO  ] PlayerComponent.cpp @ 456 - Entering state: playing 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pipewire: PipeWire does not have any audio sinks, skipping 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pulse: Library version: 16.1.0 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pulse: Proto: 35 
2022-12-07 15:20:27 [ DEBUG ] PlayerComponent.cpp @ 588 - ao/pulse: Server proto: 4294967295 
2022-12-07 15:20:29 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: queuing seek to 2506.356000 
2022-12-07 15:20:29 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: cached range 0: 3397.144000 <-> 3513.171667 (bof=0, eof=1) 
2022-12-07 15:20:29 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: cached range 1: 3109.417000 <-> 3341.129000 (bof=0, eof=0) 
2022-12-07 15:20:29 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: execute seek (to 2506.356000 flags 32) 
2022-12-07 15:20:29 [ DEBUG ] PlayerComponent.cpp @ 588 - ffmpeg: stream level seek from 2172037495 to 1629913203 
2022-12-07 15:20:29 [ DEBUG ] PlayerComponent.cpp @ 588 - cplayer: hr-seek, skipping to 2506.356000 
2022-12-07 15:20:29 [ DEBUG ] PlayerComponent.cpp @ 588 - mkv: seek done 
2022-12-07 15:20:29 [ INFO  ] PlayerComponent.cpp @ 460 - Entering state: buffering 
2022-12-07 15:20:29 [ INFO  ] JS: Requesting url without automatic networking: http://192.168.100.100:8096/Sessions/Playing/Progress 

I also had the libmpv fault prior to this, but I rebuilt jellyfinmediaplayer and that solved that. This is indeed different. I also have the libcuda load warning, but I'm satisfied that it isn't a problem.

There is this comment on the AUR where someone has run gdb on it... they're claiming the segfault is related to pipewire:

Since the rebuild with new mpv the player crashes very often. especially after pausing. gdb points to pipewire segfault.

@coreybruce
Copy link

coreybruce commented Dec 10, 2022

I am also getting a lot of crashing from segmentation fault core dumps, usually when I pause a video and play again at random but happens a lot , I am also getting playback issues. I am on Manjaro using the AUR package https://aur.archlinux.org/packages/jellyfin-media-player

This started happening after the latest update to jellyfin mediaplayer.

@mohkale
Copy link

mohkale commented Dec 11, 2022

So yeah, this looks to be caused by pipewire or jmp's communication with pipewire. I tried running a release+debinfo build of jellyfin-media-player in gdb and it eventually segfaulted. This is the backtrace where it happened. I'll try installing pipewire with debug info as well to see a little more about why.

Thread 227 "ao-pipewire" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffdacff96c0 (LWP 459678)]
0x00007fffb5360c3a in ?? () from /usr/lib/pipewire-0.3/libpipewire-module-protocol-native.so
(gdb) bt
#0  0x00007fffb5360c3a in  () at /usr/lib/pipewire-0.3/libpipewire-module-protocol-native.so
#1  0x00007fffb5358b5b in  () at /usr/lib/pipewire-0.3/libpipewire-module-protocol-native.so
#2  0x00007fffb53591f0 in  () at /usr/lib/pipewire-0.3/libpipewire-module-protocol-native.so
#3  0x00007fffb5395c77 in  () at /usr/lib/spa-0.2/support/libspa-support.so
#4  0x00007ffff37b032a in  () at /usr/lib/libpipewire-0.3.so.0
#5  0x00007ffff509f8fd in  () at /usr/lib/libc.so.6
#6  0x00007ffff5121a60 in  () at /usr/lib/libc.so.6

@QuantumRipple
Copy link

I have been experiencing this issue as well. As others mentioned, looks like a problem between mpv and pipewire. I have not been able to reproduce it skipping around in naked mpv though, just jellyfin-media-player. Here is a stack trace:

[New Thread 0x7ffedd7916c0 (LWP 200650)]
[Thread 0x7fff4ffff6c0 (LWP 200364) exited]
[New Thread 0x7fff4ffff6c0 (LWP 200670)]
[New Thread 0x7fff057fa6c0 (LWP 200671)]
[New Thread 0x7fffd88676c0 (LWP 200672)]

Thread 187 "ao-pipewire" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff4ffff6c0 (LWP 200670)]
0x00007fffd2f2fc3a in spa_list_remove (elem=0x7fffac16f288) at ../pipewire/spa/include/spa/utils/list.h:82
82		elem->next->prev = elem->prev;
(gdb) thread apply all bt

Thread 189 (Thread 0x7fffd88676c0 (LWP 200672) "mpv/mpv core"):
#0  clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:62
#1  0x0000000000000000 in  ()

Thread 188 (Thread 0x7fff057fa6c0 (LWP 200671) "mpv/mpv core"):
#0  0x00007ffff5121096 in epoll_wait (epfd=153, events=events@entry=0x7fff057f9070, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1  0x00007fffd305d5c9 in impl_pollfd_wait (object=<optimized out>, pfd=<optimized out>, ev=0x7fff057f9240, n_ev=<optimized out>, timeout=<optimized out>) at ../pipewire/spa/plugins/support/system.c:157
#2  0x00007fffd304fb2b in loop_iterate (object=0x7fffac17d008, timeout=-1) at ../pipewire/spa/plugins/support/loop.c:401
#3  0x00007ffff3770177 in do_loop (user_data=0x7fffac085580) at ../pipewire/src/pipewire/data-loop.c:81
#4  0x00007ffff509f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#5  0x00007ffff5121a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 187 (Thread 0x7fff4ffff6c0 (LWP 200670) "ao-pipewire"):
#0  0x00007fffd2f2fc3a in spa_list_remove (elem=0x7fffac16f288) at ../pipewire/spa/include/spa/utils/list.h:82
#1  core_event_demarshal_remove_id (data=<optimized out>, msg=<optimized out>) at ../pipewire/src/modules/module-protocol-native/protocol-native.c:400
#2  0x00007fffd2f27b5b in process_remote (impl=impl@entry=0x7fffac084100) at ../pipewire/src/modules/module-protocol-native.c:966
#3  0x00007fffd2f281f0 in on_remote_data (data=0x7fffac084100, fd=161, mask=1) at ../pipewire/src/modules/module-protocol-native.c:1000
#4  0x00007fffd304fc77 in loop_iterate (object=<optimized out>, timeout=<optimized out>) at ../pipewire/spa/plugins/support/loop.c:431
#5  0x00007ffff37b032a in do_loop (user_data=0x7fffac0484f0) at ../pipewire/src/pipewire/thread-loop.c:253
#6  0x00007ffff509f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#7  0x00007ffff5121a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 186 (Thread 0x7ffedd7916c0 (LWP 200650) "mpv/ao"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x7ffedd790440, op=393, expected=0, futex_word=0x7fffac0e9fb8) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fffac0e9fb8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x7ffedd790440, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007ffff509c51f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fffac0e9fb8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x7ffedd790440, private=private@entry=0) at futex-internal.c:139
#3  0x00007ffff509efd4 in __pthread_cond_wait_common (abstime=0x7ffedd790440, clockid=0, mutex=0x7fffac0e9f68, cond=0x7fffac0e9f90) at pthread_cond_wait.c:503
#4  ___pthread_cond_timedwait64 (cond=0x7fffac0e9f90, mutex=0x7fffac0e9f68, abstime=0x7ffedd790440) at pthread_cond_wait.c:643
#5  0x00007ffff7c5b3dc in  () at /usr/lib/libmpv.so.2
#6  0x00007ffff509f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#7  0x00007ffff5121a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
--Type <RET> for more, q to quit, c to continue without paging--

There is an open issue about segfaults in pipewire (https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2877) but I cannot tell if they are related.

@MightyMrMuesli
Copy link
Author

There is an open issue about segfaults in pipewire (https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2877) but I cannot tell if they are related.

The pipewire bug has been closed with the release of 0.3.63.

$ pacman -Qs pipewire
local/gst-plugin-pipewire 1:0.3.63-1
    Multimedia graph framework - pipewire plugin
local/pipewire 1:0.3.63-1
    Low-latency audio/video router and processor

Still segfaulting.

@iwalton3
Copy link
Member

I am running pipewire version 0.3.54 and have not had any segfault issues.

@bnonn
Copy link

bnonn commented Dec 27, 2022

I am having this problem as well after running the latest updates on Manjaro. I can copy the URL stream into VLC and play it without any crashes, but in Jellyfin, basically I can expect a crash if I:

  • Pause and resume a video
  • Skip in a video
  • Back out of a video
  • Try to resume a video I backed out of (this one is 100%—I have never successfully resumed a video since the update; it's an instant crash every time)

@mohkale
Copy link

mohkale commented Dec 27, 2022

I am running pipewire version 0.3.54 and have not had any segfault issues.

I see. For reference I'm seeing crashes with pipewire 0.3.63-1 on Arch Linux. I couldn't figure out how to create a DEBUG build of pipewire but looks like there's a separate troubleshooting guide. I'm not at my PC at the moment but should be by the weekend. Then I can try investigating a little more about the cause.

@iwalton3
Copy link
Member

This definitely looks like a pipewire problem:
image

@iwalton3
Copy link
Member

I only get this issue after upgrading MPV. Most likely because I was originally not running a version of MPV with the pipewire output included. If I build the latest MPV master with:

--disable-pipewire

as a build option, I don't get any segfaults.

@iwalton3
Copy link
Member

After building the latest pipewire master from source, I get this when trying to build libmpv:
image
If I comment out SPA_WARN_UNUSED_RESULT it builds fine. With this latest pipewire I am able to start the application now and start playback, but I still get a segfault when I quit the application:
image

@klongmore
Copy link

Am running Arch Linux also. Can confirm that downgrading mpv to 0.34.1 and then rebuilding JMP fixes this issue for me, at least for now.

bjornfor added a commit to bjornfor/nixpkgs that referenced this issue Jan 1, 2023
Without this change it segfaults when trying to play any media:

  $ jellyfinmediaplayer
  Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
  libpng warning: iCCP: known incorrect sRGB profile
  Logging to /home/bf/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
  Cannot load libcuda.so.1
  Segmentation fault (core dumped)

The backtrace shows pipewire being at fault:

  $ coredumpctl debug
  [...]
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x00007f711428c9bb in core_event_demarshal_remove_id () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  [Current thread is 1 (Thread 0x7f6ffdc87640 (LWP 1360949))]
  (gdb) bt
  #0  0x00007f711428c9bb in core_event_demarshal_remove_id () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #1  0x00007f711428886c in process_remote () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  NixOS#2  0x00007f7114288e68 in on_remote_data () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  NixOS#3  0x00007f7114310efe in loop_iterate () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/spa-0.2/support/libspa-support.so
  NixOS#4  0x00007f71266fe7f2 in do_loop () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/libpipewire-0.3.so.0
  NixOS#5  0x00007f7128b08e86 in start_thread () from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
  NixOS#6  0x00007f7128b8fce0 in clone3 () from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
  (gdb)

Standalone mpv doesn't segfault (when directly playing the underlying
media files). I don't know why.

Fixes: b97cda7 ("mpv-unwrapped: 0.34.1 -> 0.35.0")

Fixes NixOS#205141

Ref jellyfin/jellyfin-media-player#341
bjornfor added a commit to NixOS/nixpkgs that referenced this issue Jan 2, 2023
Without this change it segfaults when trying to play any media:

  $ jellyfinmediaplayer
  Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
  libpng warning: iCCP: known incorrect sRGB profile
  Logging to /home/bf/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
  Cannot load libcuda.so.1
  Segmentation fault (core dumped)

The backtrace shows pipewire being at fault:

  $ coredumpctl debug
  [...]
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x00007f711428c9bb in core_event_demarshal_remove_id () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  [Current thread is 1 (Thread 0x7f6ffdc87640 (LWP 1360949))]
  (gdb) bt
  #0  0x00007f711428c9bb in core_event_demarshal_remove_id () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #1  0x00007f711428886c in process_remote () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #2  0x00007f7114288e68 in on_remote_data () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #3  0x00007f7114310efe in loop_iterate () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/spa-0.2/support/libspa-support.so
  #4  0x00007f71266fe7f2 in do_loop () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/libpipewire-0.3.so.0
  #5  0x00007f7128b08e86 in start_thread () from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
  #6  0x00007f7128b8fce0 in clone3 () from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
  (gdb)

Standalone mpv doesn't segfault (when directly playing the underlying
media files). I don't know why.

Fixes: b97cda7 ("mpv-unwrapped: 0.34.1 -> 0.35.0")

Fixes #205141

Ref jellyfin/jellyfin-media-player#341
github-actions bot pushed a commit to NixOS/nixpkgs that referenced this issue Jan 2, 2023
Without this change it segfaults when trying to play any media:

  $ jellyfinmediaplayer
  Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
  libpng warning: iCCP: known incorrect sRGB profile
  Logging to /home/bf/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
  Cannot load libcuda.so.1
  Segmentation fault (core dumped)

The backtrace shows pipewire being at fault:

  $ coredumpctl debug
  [...]
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x00007f711428c9bb in core_event_demarshal_remove_id () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  [Current thread is 1 (Thread 0x7f6ffdc87640 (LWP 1360949))]
  (gdb) bt
  #0  0x00007f711428c9bb in core_event_demarshal_remove_id () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #1  0x00007f711428886c in process_remote () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #2  0x00007f7114288e68 in on_remote_data () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #3  0x00007f7114310efe in loop_iterate () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/spa-0.2/support/libspa-support.so
  #4  0x00007f71266fe7f2 in do_loop () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/libpipewire-0.3.so.0
  #5  0x00007f7128b08e86 in start_thread () from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
  #6  0x00007f7128b8fce0 in clone3 () from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
  (gdb)

Standalone mpv doesn't segfault (when directly playing the underlying
media files). I don't know why.

Fixes: b97cda7 ("mpv-unwrapped: 0.34.1 -> 0.35.0")

Fixes #205141

Ref jellyfin/jellyfin-media-player#341

(cherry picked from commit 3c528bc)
bjornfor added a commit to NixOS/nixpkgs that referenced this issue Jan 3, 2023
Without this change it segfaults when trying to play any media:

  $ jellyfinmediaplayer
  Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
  libpng warning: iCCP: known incorrect sRGB profile
  Logging to /home/bf/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
  Cannot load libcuda.so.1
  Segmentation fault (core dumped)

The backtrace shows pipewire being at fault:

  $ coredumpctl debug
  [...]
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x00007f711428c9bb in core_event_demarshal_remove_id () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  [Current thread is 1 (Thread 0x7f6ffdc87640 (LWP 1360949))]
  (gdb) bt
  #0  0x00007f711428c9bb in core_event_demarshal_remove_id () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #1  0x00007f711428886c in process_remote () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #2  0x00007f7114288e68 in on_remote_data () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/pipewire-0.3/libpipewire-module-protocol-native.so
  #3  0x00007f7114310efe in loop_iterate () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/spa-0.2/support/libspa-support.so
  #4  0x00007f71266fe7f2 in do_loop () from /nix/store/nhffrd7f15dhfbkwzgayq7hhzmdvdy19-pipewire-0.3.63-lib/lib/libpipewire-0.3.so.0
  #5  0x00007f7128b08e86 in start_thread () from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
  #6  0x00007f7128b8fce0 in clone3 () from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
  (gdb)

Standalone mpv doesn't segfault (when directly playing the underlying
media files). I don't know why.

Fixes: b97cda7 ("mpv-unwrapped: 0.34.1 -> 0.35.0")

Fixes #205141

Ref jellyfin/jellyfin-media-player#341

(cherry picked from commit 3c528bc)
@MightyMrMuesli
Copy link
Author

Don't know which pipewire/mpv/jellyfin-update in the last months it was, but I don't have segfaults anymore. If somebody can confirm, I would close this issue.

@IAmTheMilkManMyMilkIsDelicious

@MightyMrMuesli
Can confirm no more issues

@MightyMrMuesli
Copy link
Author

Fixed with updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants