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

[WIP] segfault with RX6600XT at boot #226

Closed
bibitocarlos opened this issue Mar 10, 2023 · 24 comments
Closed

[WIP] segfault with RX6600XT at boot #226

bibitocarlos opened this issue Mar 10, 2023 · 24 comments
Labels
bug Something isn't working

Comments

@bibitocarlos
Copy link

bibitocarlos commented Mar 10, 2023

Describe The Bug
At every boot, jellyfin launch ffmpeg when it scan my computer.
I get a segfault in my log.

Steps To Reproduce

Start latest jellyfin with latest ffmpeg-jellyfin

Expected Behavior
To work without error

System (please complete the following information):

  • **Platform: linux 6.2.2-zen2-1-zen
  • **Operating System: latest archlinux
  • **Hardware Acceleration: VAAPI
  • CPU & GPU Model: RX6600XT

FFmpeg Logs

` systemd[1]: [email protected]: Deactivated successfully.
mars 10 08:55:08 bibiserveur systemd-coredump[2588]: [🡕] Process 2572 (ffmpeg) of user 969 dumped core.

                                                 Module ffmpeg without build-id.
                                                 Stack trace of thread 2577:
                                                 #0  0x00007fadd0245afa n/a (libLLVM-15.so + 0x1645afa)
                                                 #1  0x00007fadd025805b n/a (libLLVM-15.so + 0x165805b)
                                                 #2  0x00007fadd0260a83 n/a (libLLVM-15.so + 0x1660a83)
                                                 #3  0x00007fadd0261256 _ZN4llvm12SelectionDAG13LegalizeTypesEv (libLLVM-15.so + 0x1661256)
                                                 #4  0x00007fadd039c6d9 _ZN4llvm16SelectionDAGISel17CodeGenAndEmitDAGEv (libLLVM-15.so + 0x179c6d9)
                                                 #5  0x00007fadd039f7b9 _ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE (libLLVM-15.so + 0x179f7b9)
                                                 #6  0x00007fadd03a1c52 n/a (libLLVM-15.so + 0x17a1c52)
                                                 #7  0x00007fadcfde7333 n/a (libLLVM-15.so + 0x11e7333)
                                                 #8  0x00007fadcfaf2a10 _ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE (libLLVM-15.so + 0xef2a10)
                                                 #9  0x00007fadd12362fa n/a (libLLVM-15.so + 0x26362fa)
                                                 #10 0x00007fadcfaf34bb _ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE (libLLVM-15.so + 0xef34bb)
                                                 #11 0x00007fadd68866eb n/a (radeonsi_drv_video.so + 0x2866eb)
                                                 #12 0x00007fadd687a47b n/a (radeonsi_drv_video.so + 0x27a47b)
                                                 #13 0x00007fadd687cc83 n/a (radeonsi_drv_video.so + 0x27cc83)
                                                 #14 0x00007fadd68ea5ff n/a (radeonsi_drv_video.so + 0x2ea5ff)
                                                 #15 0x00007fadd6a815e7 n/a (radeonsi_drv_video.so + 0x4815e7)
                                                 #16 0x00007fadd66c9e5c n/a (radeonsi_drv_video.so + 0xc9e5c)
                                                 #17 0x00007fadd76e7bb5 n/a (libc.so.6 + 0x85bb5)
                                                 #18 0x00007fadd7769d90 n/a (libc.so.6 + 0x107d90)
                                                 
                                                 Stack trace of thread 2579:
                                                 #0  0x00007fadcf9a4970 _ZNK4llvm13AttributeList19hasAttributeAtIndexEjNS_9Attribute8AttrKindE (libLLVM-15.so + 0xda4970)
                                                 #1  0x00007fadcfabe5b6 _ZNK4llvm8CallBase12paramHasAttrEjNS_9Attribute8AttrKindE (libLLVM-15.so + 0xebe5b6)
                                                 #2  0x00007fadd07c3351 _ZN4llvm29canReplaceOperandWithVariableEPKNS_11InstructionEj (libLLVM-15.so + 0x1bc3351)
                                                 #3  0x00007fadd0b4afd5 _ZN4llvm20ConstantHoistingPass25collectConstantCandidatesERNS_8FunctionE (libLLVM-15.so + 0x1f4afd5)
                                                 #4  0x00007fadd0b51ed5 _ZN4llvm20ConstantHoistingPass7runImplERNS_8FunctionERNS_19TargetTransformInfoERNS_13DominatorTreeEPNS_18BlockFrequencyInfoERNS_10BasicBlockEPNS_18ProfileSummar>
                                                 #5  0x00007fadd0b5249e n/a (libLLVM-15.so + 0x1f5249e)
                                                 #6  0x00007fadcfaf2a10 _ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE (libLLVM-15.so + 0xef2a10)
                                                 #7  0x00007fadcfaf2b54 _ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE (libLLVM-15.so + 0xef2b54)
                                                 #8  0x00007fadcfaf34bb _ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE (libLLVM-15.so + 0xef34bb)
                                                 #9  0x00007fadd68866eb n/a (radeonsi_drv_video.so + 0x2866eb)
                                                 #10 0x00007fadd687a47b n/a (radeonsi_drv_video.so + 0x27a47b)
                                                 #11 0x00007fadd687cc83 n/a (radeonsi_drv_video.so + 0x27cc83)
                                                 #12 0x00007fadd68ea5ff n/a (radeonsi_drv_video.so + 0x2ea5ff)
                                                 #13 0x00007fadd6a815e7 n/a (radeonsi_drv_video.so + 0x4815e7)
                                                 #14 0x00007fadd66c9e5c n/a (radeonsi_drv_video.so + 0xc9e5c)
                                                 #15 0x00007fadd76e7bb5 n/a (libc.so.6 + 0x85bb5)
                                                 #16 0x00007fadd7769d90 n/a (libc.so.6 + 0x107d90)
                                                 
                                                 Stack trace of thread 2572:
                                                 #0  0x00007fadd76e4766 n/a (libc.so.6 + 0x82766)
                                                 #1  0x00007fadd76e96a3 n/a (libc.so.6 + 0x876a3)
                                                 #2  0x00007fadd6a79578 n/a (radeonsi_drv_video.so + 0x479578)
                                                 #3  0x00007fadd6a79694 n/a (radeonsi_drv_video.so + 0x479694)
                                                 #4  0x00007fadd769d445 n/a (libc.so.6 + 0x3b445)
                                                 #5  0x00007fadd769d5b0 exit (libc.so.6 + 0x3b5b0)
                                                 #6  0x000056364f9f55a8 n/a (ffmpeg + 0x3ad5a8)
                                                 #7  0x000056364f9edb45 n/a (ffmpeg + 0x3a5b45)
                                                 #8  0x00007fadd7685790 n/a (libc.so.6 + 0x23790)
                                                 #9  0x00007fadd768584a __libc_start_main (libc.so.6 + 0x2384a)
                                                 #10 0x000056364f9f2a79 n/a (ffmpeg + 0x3aaa79)
                                                 
                                                 Stack trace of thread 2576:
                                                 #0  0x00007fadd76e4766 n/a (libc.so.6 + 0x82766)
                                                 #1  0x00007fadd76e6f90 pthread_cond_wait (libc.so.6 + 0x84f90)
                                                 #2  0x00007fadd6a8151c n/a (radeonsi_drv_video.so + 0x48151c)
                                                 #3  0x00007fadd66c9e5c n/a (radeonsi_drv_video.so + 0xc9e5c)
                                                 #4  0x00007fadd76e7bb5 n/a (libc.so.6 + 0x85bb5)
                                                 #5  0x00007fadd7769d90 n/a (libc.so.6 + 0x107d90)
                                                 
                                                 Stack trace of thread 2580:
                                                 #0  0x00007fadcfc39852 n/a (libLLVM-15.so + 0x1039852)
                                                 #1  0x00007fadcfc38822 n/a (libLLVM-15.so + 0x1038822)
                                                 #2  0x00007fadcfc53aa0 n/a (libLLVM-15.so + 0x1053aa0)
                                                 #3  0x00007fadcfc59645 n/a (libLLVM-15.so + 0x1059645)
                                                 #4  0x00007fadcfc5c057 n/a (libLLVM-15.so + 0x105c057)
                                                 #5  0x00007fadcfaf2a10 _ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE (libLLVM-15.so + 0xef2a10)
                                                 #6  0x00007fadd12362fa n/a (libLLVM-15.so + 0x26362fa)
                                                 #7  0x00007fadcfaf34bb _ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE (libLLVM-15.so + 0xef34bb)
                                                 #8  0x00007fadd68866eb n/a (radeonsi_drv_video.so + 0x2866eb)
                                                 #9  0x00007fadd687a47b n/a (radeonsi_drv_video.so + 0x27a47b)
                                                 #10 0x00007fadd687cc83 n/a (radeonsi_drv_video.so + 0x27cc83)
                                                 #11 0x00007fadd68ea5ff n/a (radeonsi_drv_video.so + 0x2ea5ff)
                                                 #12 0x00007fadd6a815e7 n/a (radeonsi_drv_video.so + 0x4815e7)
                                                 #13 0x00007fadd66c9e5c n/a (radeonsi_drv_video.so + 0xc9e5c)
                                                 #14 0x00007fadd76e7bb5 n/a (libc.so.6 + 0x85bb5)
                                                 #15 0x00007fadd7769d90 n/a (libc.so.6 + 0x107d90)
                                                 
                                                 Stack trace of thread 2575:
                                                 #0  0x00007fadd76e4766 n/a (libc.so.6 + 0x82766)
                                                 #1  0x00007fadd76e6f90 pthread_cond_wait (libc.so.6 + 0x84f90)
                                                 #2  0x00007fadd6a8151c n/a (radeonsi_drv_video.so + 0x48151c)
                                                 #3  0x00007fadd66c9e5c n/a (radeonsi_drv_video.so + 0xc9e5c)
                                                 #4  0x00007fadd76e7bb5 n/a (libc.so.6 + 0x85bb5)
                                                 #5  0x00007fadd7769d90 n/a (libc.so.6 + 0x107d90)
                                                 
                                                 Stack trace of thread 2585:
                                                 #0  0x00007fadd76f7e5c __libc_free (libc.so.6 + 0x95e5c)
                                                 #1  0x00007fadd122de90 n/a (libLLVM-15.so + 0x262de90)
                                                 #2  0x00007fadd122de11 n/a (libLLVM-15.so + 0x262de11)
                                                 #3  0x00007fadd20a042e n/a (libLLVM-15.so + 0x34a042e)
                                                 #4  0x00007fadcfaf34bb _ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE (libLLVM-15.so + 0xef34bb)
                                                 #5  0x00007fadd68866eb n/a (radeonsi_drv_video.so + 0x2866eb)
                                                 #6  0x00007fadd687a47b n/a (radeonsi_drv_video.so + 0x27a47b)
                                                 #7  0x00007fadd68a6dce n/a (radeonsi_drv_video.so + 0x2a6dce)
                                                 #8  0x00007fadd6a815e7 n/a (radeonsi_drv_video.so + 0x4815e7)
                                                 #9  0x00007fadd66c9e5c n/a (radeonsi_drv_video.so + 0xc9e5c)
                                                 #10 0x00007fadd76e7bb5 n/a (libc.so.6 + 0x85bb5)
                                                 #11 0x00007fadd7769d90 n/a (libc.so.6 + 0x107d90)

Stack trace of thread 2584:
#0 0x00007fadd0b69f54 n/a (libLLVM-15.so + 0x1f69f54)
#1 0x00007fadd0df4992 n/a (libLLVM-15.so + 0x21f4992)
#2 0x00007fadd0df642b n/a (libLLVM-15.so + 0x21f642b)
#3 0x00007fadd142738c _ZN4llvm13RGPassManager13runOnFunctionERNS_8FunctionE (libLLVM-15.so + 0x282738c)
#4 0x00007fadcfaf2a10 _ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE (libLLVM-15.so + 0xef2a10)
#5 0x00007fadd12362fa n/a (libLLVM-15.so + 0x26362fa)
#6 0x00007fadcfaf34bb _ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE (libLLVM-15.so + 0xef34bb)
#7 0x00007fadd68866eb n/a (radeonsi_drv_video.so + 0x2866eb)
#8 0x00007fadd687a47b n/a (radeonsi_drv_video.so + 0x27a47b)
#9 0x00007fadd687cc83 n/a (radeonsi_drv_video.so + 0x27cc83)
#10 0x00007fadd68ea5ff n/a (radeonsi_drv_video.so + 0x2ea5ff)
#11 0x00007fadd6a815e7 n/a (radeonsi_drv_video.so + 0x4815e7)
#12 0x00007fadd66c9e5c n/a (radeonsi_drv_video.so + 0xc9e5c)
#13 0x00007fadd76e7bb5 n/a (libc.so.6 + 0x85bb5)
#14 0x00007fadd7769d90 n/a (libc.so.6 + 0x107d90)

                                                 Stack trace of thread 2582:
                                                 #0  0x00007fadd05109c4 _ZN4llvm14CombinerHelper37applyCombineUnmergeMergeToPlainValuesERNS_12MachineInstrERNS_15SmallVectorImplINS_8RegisterEEE (libLLVM-15.so + 0x19109c4)
                                                 #1  0x00007fadc88af870 n/a (n/a + 0x0)
                                                 ELF object binary architecture: AMD x86-64

mars 10 08:55:07 bibiserveur systemd[1]: Started Process Core Dump (PID 2587/UID 0).
mars 10 08:55:07 bibiserveur kernel: Code: f3 0f 1e fa 41 57 41 56 49 89 fe 41 55 41 54 55 48 89 f5 53 48 83 ec 68 64 48 8b 04 25 28 00 00 00 48 89 44 24 58 48 8b 46 20 0f 6f 00 48 8b 70 28 48 8b 50 30 0f 29 04 24 e8 81 ce ff ff 4c
mars 10 08:55:07 bibiserveur kernel: ffmpeg:sh0[2577]: segfault at 0 ip 00007fadd0245afa sp 00007fadcb4b46a0 error 4 in libLLVM-15.so[7fadcf6e3000+3e5a000] likely on CPU 5 (core 5, socket 0)
`

Additional Context

@bibitocarlos bibitocarlos added the bug Something isn't working label Mar 10, 2023
@nyanmisaka
Copy link
Member

nyanmisaka commented Mar 10, 2023

Jellyfin performs a check by querying VA-API and Vulkan device when it starts up.

But the kernel driver or Mesa driver is some how broken on your system.

Try these three commands and see which fails:

/usr/lib/jellyfin-ffmpeg/ffmpeg -init_hw_device drm=dr:/dev/dri/renderD128
/usr/lib/jellyfin-ffmpeg/ffmpeg -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr
/usr/lib/jellyfin-ffmpeg/ffmpeg -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr

@bibitocarlos
Copy link
Author

bibitocarlos commented Mar 10, 2023

None of them gives me an error, all give me the same output, see below
I tried with ffmpeg6, but still get the segfault :

`/usr/lib/jellyfin-ffmpeg/ffmpeg -init_hw_device drm=dr:/dev/dri/renderD128
ffmpeg version 5.1.2-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
configuration: --prefix=/ffbuild/prefix --pkg-config=pkg-config --pkg-config-flags=--static --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --extra-version=Jellyfin --extra-cflags= --extra-cxxflags= --extra-ldflags= --extra-ldexeflags=-pie --extra-libs='-lfftw3f -lstdc++ -ldl' --enable-gpl --enable-version3 --enable-lto --disable-ffplay --disable-debug --disable-doc --disable-ptx-compression --disable-sdl2 --disable-libxcb --disable-xlib --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-chromaprint --enable-libvorbis --enable-opencl --enable-amf --enable-libdav1d --enable-libfdk-aac --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libsrt --enable-libsvtav1 --enable-libdrm --enable-vaapi --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libzimg --enable-libzvbi
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'`

@bibitocarlos
Copy link
Author

Just downgrade my kernel, still get an error, not the same :

`[ 16.462707] ffmpeg:sh6[1575]: segfault at 8 ip 00007fe7968b1358 sp 00007fe78cdf1bf8 error 4 in libLLVM-15.so[7fe795ee3000+3e5a000] likely on CPU 5 (core 5, socket 0)
[ 16.462715] Code: 8b 44 24 28 64 48 2b 04 25 28 00 00 00 75 07 89 d0 48 83 c4 38 c3 ff 15 4e 71 34 06 66 0f 1f 44 00 00 f3 0f 1e fa 48 8b 47 08 <80> 78 08 12 0f 94 c0 c3 f3 0f 1e fa 48 8b 47 08 80 78 08 13 0f 94
[ 16.462721] ffmpeg:sh5[1574]: segfault at 8 ip 00007fe7968b1358 sp 00007fe78d5f2bf8 error 4 in libLLVM-15.so[7fe795ee3000+3e5a000] likely on CPU 9 (core 3, socket 0)
[ 16.462744] Code: 8b 44 24 28 64 48 2b 04 25 28 00 00 00 75 07 89 d0 48 83 c4 38 c3 ff 15 4e 71 34 06 66 0f 1f 44 00 00 f3 0f 1e fa 48 8b 47 08 <80> 78 08 12 0f 94 c0 c3 f3 0f 1e fa 48 8b 47 08 80 78 08 13 0f 94
[ 16.629137] input: solaar-keyboard as /devices/virtual/input/input39
[ 16.988526] ffmpeg:sh7[1757]: segfault at 8 ip 00007f28024b0f38 sp 00007f27f2ff5228 error 4 in libLLVM-15.so[7f2801ae3000+3e5a000] likely on CPU 2 (core 2, socket 0)
[ 16.988537] Code: b6 50 08 80 fa 0d 0f 94 c0 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8b 47 08 80 78 08 0d 0f 94 c0 c3 f3 0f 1e fa 48 8b 47 08 <0f> b6 40 08 83 e8 12 83 f8 01 0f 96 c0 c3 66 2e 0f 1f 84 00 00 00
[ 16.988544] ffmpeg:sh0[1749]: segfault at 8 ip 00007f28024b0f38 sp 00007f27f3ff7198 error 4
[ 16.988544] ffmpeg:sh1[1751]: segfault at 8 ip 00007f28024b0f38 sp 00007f27faff5198 error 4
[ 16.988545] ffmpeg:sh6[1756]: segfault at 8 ip 00007f28024b0f38 sp 00007f27f37f6198 error 4
[ 16.988548] in libLLVM-15.so[7f2801ae3000+3e5a000]
[ 16.988549] in libLLVM-15.so[7f2801ae3000+3e5a000]
[ 16.988549] likely on CPU 7 (core 1, socket 0)
[ 16.988550] in libLLVM-15.so[7f2801ae3000+3e5a000]

[ 16.988551] likely on CPU 6 (core 0, socket 0)
[ 16.988552] likely on CPU 3 (core 3, socket 0)
[ 16.988551] Code: b6 50 08 80 fa 0d 0f 94 c0 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8b 47 08 80 78 08 0d 0f 94 c0 c3 f3 0f 1e fa 48 8b 47 08 <0f> b6 40 08 83 e8 12 83 f8 01 0f 96 c0 c3 66 2e 0f 1f 84 00 00 00
[ 16.988553] Code: b6 50 08 80 fa 0d 0f 94 c0 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8b 47 08 80 78 08 0d 0f 94 c0 c3 f3 0f 1e fa 48 8b 47 08 <0f> b6 40 08 83 e8 12 83 f8 01 0f 96 c0 c3 66 2e 0f 1f 84 00 00 00
[ 16.988554] Code: b6 50 08 80 fa 0d 0f 94 c0 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8b 47 08 80 78 08 0d 0f 94 c0 c3 f3 0f 1e fa 48 8b 47 08 <0f> b6 40 08 83 e8 12 83 f8 01 0f 96 c0 c3 66 2e 0f 1f 84 00 00 00
[ 17.330453] ffmpeg:sh0[1813]: segfault at 8 ip 00007fbeb8eb0f38 sp 00007fbeb69f5198 error 4 likely on CPU 3 (core 3, socket 0)
[ 17.330461] Code: b6 50 08 80 fa 0d 0f 94 c0 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8b 47 08 80 78 08 0d 0f 94 c0 c3 f3 0f 1e fa 48 8b 47 08 <0f> b6 40 08 83 e8 12 83 f8 01 0f 96 c0 c3 66 2e 0f 1f 84 00 00 00
[ 17.330469] ffmpeg:sh2[1816]: segfault at 8 ip 00007fbeb8eb0f38 sp 00007fbeb4df2198 error 4 likely on CPU 0 (core 0, socket 0)
[ 17.330474] Code: b6 50 08 80 fa 0d 0f 94 c0 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8b 47 08 80 78 08 0d 0f 94 c0 c3 f3 0f 1e fa 48 8b 47 08 <0f> b6 40 08 83 e8 12 83 f8 01 0f 96 c0 c3 66 2e 0f 1f 84 00 00 00`

@nyanmisaka
Copy link
Member

Can you try adding a startup delay to the jellyfin service?

Also what is the version of Mesa?

@bibitocarlos
Copy link
Author

Mesa 23, i'm downgrading it to see if it's related.
If i start jellyfin manually and not at boot, i still get the error.

@bibitocarlos
Copy link
Author

Ok, it still happens with previous mesa, at launch or not :
uname -r 6.1.12-zen1-1-zen
Device: AMD Radeon RX 6600 XT (navi23, LLVM 15.0.7, DRM 3.49, 6.1.12-zen1-1-zen) (0x73ff)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.3.6

@nyanmisaka
Copy link
Member

Which jellyfin-server package are you using?

@bibitocarlos
Copy link
Author

Version: 10.8.9

Operating System: Linux

Architecture: X64

@nyanmisaka
Copy link
Member

I mean the AUR package:

https://aur.archlinux.org/packages/jellyfin-server

https://aur.archlinux.org/packages/jellyfin-server-bin

Or is it a portable installation?

@bibitocarlos
Copy link
Author

bibitocarlos commented Mar 10, 2023

jellyfin-server, will try with the other

@bibitocarlos
Copy link
Author

Happens with both

@nyanmisaka
Copy link
Member

getent group render
getent group video

Check if the jellyfin user exists in render and video group?

If not:
usermod -aG render jellyfin
usermod -aG video jellyfin
systemctl restart jellyfin

@bibitocarlos
Copy link
Author

getent group video
video:x:985:sddm,tvheadend,jellyfin

getent group render
render:x:989:jellyfin

mars 10 10:37:54 bibiserveur jellyfin[2748]: [10:37:54] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete
mars 10 10:37:54 bibiserveur jellyfin[2748]: [10:37:54] [INF] [1] Emby.Server.Implementations.ApplicationHost: Executed all pre-startup entry points in 0:00:00.0507676
mars 10 10:37:53 bibiserveur jellyfin[2748]: [10:37:53] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: 8272fdfd291641e798f4473e7f025e04
mars 10 10:37:53 bibiserveur jellyfin[2748]: [10:37:53] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: ffmpeg
mars 10 10:37:53 bibiserveur jellyfin[2748]: [10:37:53] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 is AMD GPU
mars 10 10:37:53 bibiserveur systemd[1]: [email protected]: Deactivated successfully.
mars 10 10:37:53 bibiserveur systemd-coredump[2874]: [🡕] Process 2856 (ffmpeg) of user 969 dumped core.
                                                     
                                                     Stack trace of thread 2863:
                                                     #0  0x00007f0deaeb0f38 _ZNK4llvm3EVT16isExtendedVectorEv (libLLVM-15.so + 0x14b0f38)
                                                     #1  0x00007f0deae70b6e _ZNK4llvm18TargetLoweringBase17getTypeConversionERNS_11LLVMContextENS_3EVTE (libLLVM-15.so + 0x1470b6e)
                                                     #2  0x00007f0deb06085b n/a (libLLVM-15.so + 0x166085b)
                                                     #3  0x00007f0deb061256 _ZN4llvm12SelectionDAG13LegalizeTypesEv (libLLVM-15.so + 0x1661256)
                                                     #4  0x00007f0deb19c6d9 _ZN4llvm16SelectionDAGISel17CodeGenAndEmitDAGEv (libLLVM-15.so + 0x179c6d9)
                                                     #5  0x00007f0deb19f7b9 _ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE (libLLVM-15.so + 0x179f7b9)
                                                     #6  0x00007f0deb1a1c52 n/a (libLLVM-15.so + 0x17a1c52)
                                                     #7  0x00007f0deabe7333 n/a (libLLVM-15.so + 0x11e7333)
                                                     #8  0x00007f0dea8f2a10 _ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE (libLLVM-15.so + 0xef2a10)
                                                     #9  0x00007f0dec0362fa n/a (libLLVM-15.so + 0x26362fa)
                                                     #10 0x00007f0dea8f34bb _ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE (libLLVM-15.so + 0xef34bb)
                                                     #11 0x00007f0df16866eb n/a (radeonsi_drv_video.so + 0x2866eb)
                                                     #12 0x00007f0df167a47b n/a (radeonsi_drv_video.so + 0x27a47b)
                                                     #13 0x00007f0df167cc83 n/a (radeonsi_drv_video.so + 0x27cc83)
                                                     #14 0x00007f0df16ea5ff n/a (radeonsi_drv_video.so + 0x2ea5ff)
                                                     #15 0x00007f0df18815e7 n/a (radeonsi_drv_video.so + 0x4815e7)
                                                     #16 0x00007f0df14c9e5c n/a (radeonsi_drv_video.so + 0xc9e5c)
                                                     #17 0x00007f0e0309ebb5 n/a (libc.so.6 + 0x85bb5)
                                                     #18 0x00007f0e03120d90 n/a (libc.so.6 + 0x107d90)

@nyanmisaka
Copy link
Member

/usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vulkan=vk@dr

I'm wondering why this works in command line but not in systemd service?

@bibitocarlos
Copy link
Author

/usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vulkan=vk@dr
ffmpeg version 5.1.2-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
  configuration: --prefix=/ffbuild/prefix --pkg-config=pkg-config --pkg-config-flags=--static --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --extra-version=Jellyfin --extra-cflags= --extra-cxxflags= --extra-ldflags= --extra-ldexeflags=-pie --extra-libs='-lfftw3f -lstdc++ -ldl' --enable-gpl --enable-version3 --enable-lto --disable-ffplay --disable-debug --disable-doc --disable-ptx-compression --disable-sdl2 --disable-libxcb --disable-xlib --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-chromaprint --enable-libvorbis --enable-opencl --enable-amf --enable-libdav1d --enable-libfdk-aac --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libsrt --enable-libsvtav1 --enable-libdrm --enable-vaapi --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libzimg --enable-libzvbi
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'drm=dr:/dev/dri/renderD128'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'vulkan=vk@dr'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument drm=dr:/dev/dri/renderD128.
[AVHWDeviceContext @ 0x55e7492457c0] Opened DRM device /dev/dri/renderD128: driver amdgpu version 3.49.0.
Applying option init_hw_device (initialise hardware device) with argument vulkan=vk@dr.
[AVHWDeviceContext @ 0x55e749246c80] Supported validation layers:
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_RENDERDOC_Capture
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_VALVE_steam_fossilize_32
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_VALVE_steam_overlay_64
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_VALVE_steam_overlay_32
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_VALVE_steam_fossilize_64
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_fossilize
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_MANGOHUD_overlay
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_NV_optimus
[AVHWDeviceContext @ 0x55e749246c80]    VK_LAYER_KHRONOS_validation
[AVHWDeviceContext @ 0x55e749246c80] GPU listing:
[AVHWDeviceContext @ 0x55e749246c80]     0: AMD Radeon RX 6600 XT (RADV NAVI23) (discrete) (0x73ff)
[AVHWDeviceContext @ 0x55e749246c80] Requested device: 0x73ff
[AVHWDeviceContext @ 0x55e749246c80] Device 0 selected: AMD Radeon RX 6600 XT (RADV NAVI23) (discrete) (0x73ff)
[AVHWDeviceContext @ 0x55e749246c80] Queue families:
[AVHWDeviceContext @ 0x55e749246c80]     0: graphics compute transfer sparse (queues: 1)
[AVHWDeviceContext @ 0x55e749246c80]     1: compute transfer sparse (queues: 4)
[AVHWDeviceContext @ 0x55e749246c80] Using device extension VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x55e749246c80] Using device extension VK_KHR_sampler_ycbcr_conversion
[AVHWDeviceContext @ 0x55e749246c80] Using device extension VK_KHR_synchronization2
[AVHWDeviceContext @ 0x55e749246c80] Using device extension VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x55e749246c80] Using device extension VK_EXT_external_memory_dma_buf
[AVHWDeviceContext @ 0x55e749246c80] Using device extension VK_EXT_image_drm_format_modifier
[AVHWDeviceContext @ 0x55e749246c80] Using device extension VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x55e749246c80] Using device extension VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x55e749246c80] Using device: AMD Radeon RX 6600 XT (RADV NAVI23)
[AVHWDeviceContext @ 0x55e749246c80] Alignments:
[AVHWDeviceContext @ 0x55e749246c80]     optimalBufferCopyRowPitchAlignment: 1
[AVHWDeviceContext @ 0x55e749246c80]     minMemoryMapAlignment:              4096
[AVHWDeviceContext @ 0x55e749246c80]     minImportedHostPointerAlignment:    4096
[AVHWDeviceContext @ 0x55e749246c80] Using queue family 0 (queues: 1) for graphics
[AVHWDeviceContext @ 0x55e749246c80] Using queue family 1 (queues: 4) for compute transfers
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

@bibitocarlos
Copy link
Author

Jellyfin user :

[root@bibiserveur bibi]# sudo -u jellyfin -s
[jellyfin@bibiserveur bibi]$ /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vulkan=vk@dr
ffmpeg version 5.1.2-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
  configuration: --prefix=/ffbuild/prefix --pkg-config=pkg-config --pkg-config-flags=--static --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --extra-version=Jellyfin --extra-cflags= --extra-cxxflags= --extra-ldflags= --extra-ldexeflags=-pie --extra-libs='-lfftw3f -lstdc++ -ldl' --enable-gpl --enable-version3 --enable-lto --disable-ffplay --disable-debug --disable-doc --disable-ptx-compression --disable-sdl2 --disable-libxcb --disable-xlib --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-chromaprint --enable-libvorbis --enable-opencl --enable-amf --enable-libdav1d --enable-libfdk-aac --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libsrt --enable-libsvtav1 --enable-libdrm --enable-vaapi --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libzimg --enable-libzvbi
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'drm=dr:/dev/dri/renderD128'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'vulkan=vk@dr'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument drm=dr:/dev/dri/renderD128.
[AVHWDeviceContext @ 0x55c19c0c37c0] Opened DRM device /dev/dri/renderD128: driver amdgpu version 3.49.0.
Applying option init_hw_device (initialise hardware device) with argument vulkan=vk@dr.
[AVHWDeviceContext @ 0x55c19c0c4c80] Supported validation layers:
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_RENDERDOC_Capture
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_fossilize
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_MANGOHUD_overlay
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_NV_optimus
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_KHRONOS_validation
Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

[AVHWDeviceContext @ 0x55c19c0c4c80] GPU listing:
[AVHWDeviceContext @ 0x55c19c0c4c80]     0: AMD Radeon RX 6600 XT (RADV NAVI23) (discrete) (0x73ff)
[AVHWDeviceContext @ 0x55c19c0c4c80] Requested device: 0x73ff
[AVHWDeviceContext @ 0x55c19c0c4c80] Device 0 selected: AMD Radeon RX 6600 XT (RADV NAVI23) (discrete) (0x73ff)
[AVHWDeviceContext @ 0x55c19c0c4c80] Queue families:
[AVHWDeviceContext @ 0x55c19c0c4c80]     0: graphics compute transfer sparse (queues: 1)
[AVHWDeviceContext @ 0x55c19c0c4c80]     1: compute transfer sparse (queues: 4)
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device extension VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device extension VK_KHR_sampler_ycbcr_conversion
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device extension VK_KHR_synchronization2
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device extension VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device extension VK_EXT_external_memory_dma_buf
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device extension VK_EXT_image_drm_format_modifier
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device extension VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device extension VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x55c19c0c4c80] Using device: AMD Radeon RX 6600 XT (RADV NAVI23)
[AVHWDeviceContext @ 0x55c19c0c4c80] Alignments:
[AVHWDeviceContext @ 0x55c19c0c4c80]     optimalBufferCopyRowPitchAlignment: 1
[AVHWDeviceContext @ 0x55c19c0c4c80]     minMemoryMapAlignment:              4096
[AVHWDeviceContext @ 0x55c19c0c4c80]     minImportedHostPointerAlignment:    4096
[AVHWDeviceContext @ 0x55c19c0c4c80] Using queue family 0 (queues: 1) for graphics
[AVHWDeviceContext @ 0x55c19c0c4c80] Using queue family 1 (queues: 4) for compute transfers
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

@bibitocarlos
Copy link
Author

I have modified jellyfin.service like that and i get the error, definitively something with systemd :

[Unit]
Description=Jellyfin Media Server
After=network.target

[Service]
User=jellyfin
EnvironmentFile=/etc/conf.d/jellyfin
ExecStart=/usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vulkan=vk@dr
#/usr/lib/jellyfin/bin/jellyfin --datadir ${JELLYFIN_DATA_DIRECTORY} --cachedir ${JELLYFIN_CACHE_DIRECTORY} ${JELLYFIN_ADD_OPTS}
Restart=on-abort
TimeoutSec=20

[Install]
WantedBy=multi-user.target

@bibitocarlos
Copy link
Author

bibitocarlos commented Mar 10, 2023

If i delete User=jellyfin in the systemd service, it works...
Maybe related with

[AVHWDeviceContext @ 0x55c19c0c37c0] Opened DRM device /dev/dri/renderD128: driver amdgpu version 3.49.0.
Applying option init_hw_device (initialise hardware device) with argument vulkan=vk@dr.
[AVHWDeviceContext @ 0x55c19c0c4c80] Supported validation layers:
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_RENDERDOC_Capture
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_fossilize
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_MANGOHUD_overlay
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_NV_optimus
[AVHWDeviceContext @ 0x55c19c0c4c80]    VK_LAYER_KHRONOS_validation
Authorization required, but no authorization protocol specified

@bibitocarlos
Copy link
Author

If i use bibi user in the systemd service, it works, something is fishy with the jellyfin user, still investigating.

@nyanmisaka
Copy link
Member

nyanmisaka commented Mar 10, 2023

My contexts are Linux 6.2.1, Mesa 23.1.0-devel, Vega 64.

I fresh installed the AUR jellyfin-server-git package and it works for me:

dotnet[31552]: [23:15:34] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 is AMD GPU
dotnet[31552]: [23:15:34] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: VAAPI device /dev/dri/renderD128 supports Vulkan DRM format modifier

I didn't install any other validation layers such as KHRONOS and NV.

[AVHWDeviceContext @ 0x557f13a57bc0] Supported validation layers:
[AVHWDeviceContext @ 0x557f13a57bc0]    VK_LAYER_MESA_device_select
[AVHWDeviceContext @ 0x557f13a57bc0]    VK_LAYER_MESA_overlay
[AVHWDeviceContext @ 0x557f13a57bc0] GPU listing:
[AVHWDeviceContext @ 0x557f13a57bc0]     0: AMD Radeon RX Vega (RADV VEGA10) (discrete) (0x687f)
[AVHWDeviceContext @ 0x557f13a57bc0]     1: llvmpipe (LLVM 15.0.7, 256 bits) (software) (0x0)
[AVHWDeviceContext @ 0x557f13a57bc0] Device 0 selected: AMD Radeon RX Vega (RADV VEGA10) (discrete) (0x687f)
[AVHWDeviceContext @ 0x557f13a57bc0] Queue families:
[AVHWDeviceContext @ 0x557f13a57bc0]     0: graphics compute transfer sparse (queues: 1)
[AVHWDeviceContext @ 0x557f13a57bc0]     1: compute transfer sparse (queues: 4)
[AVHWDeviceContext @ 0x557f13a57bc0] Using device extension VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x557f13a57bc0] Using device extension VK_KHR_sampler_ycbcr_conversion
[AVHWDeviceContext @ 0x557f13a57bc0] Using device extension VK_KHR_synchronization2
[AVHWDeviceContext @ 0x557f13a57bc0] Using device extension VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x557f13a57bc0] Using device extension VK_EXT_external_memory_dma_buf
[AVHWDeviceContext @ 0x557f13a57bc0] Using device extension VK_EXT_image_drm_format_modifier
[AVHWDeviceContext @ 0x557f13a57bc0] Using device extension VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x557f13a57bc0] Using device extension VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x557f13a57bc0] Using device: AMD Radeon RX Vega (RADV VEGA10)
[AVHWDeviceContext @ 0x557f13a57bc0] Alignments:
[AVHWDeviceContext @ 0x557f13a57bc0]     optimalBufferCopyRowPitchAlignment: 1
[AVHWDeviceContext @ 0x557f13a57bc0]     minMemoryMapAlignment:              4096
[AVHWDeviceContext @ 0x557f13a57bc0]     minImportedHostPointerAlignment:    4096
[AVHWDeviceContext @ 0x557f13a57bc0] Using queue family 0 (queues: 1) for graphics
[AVHWDeviceContext @ 0x557f13a57bc0] Using queue family 1 (queues: 4) for compute transfers

@nyanmisaka
Copy link
Member

nyanmisaka commented Mar 10, 2023

For reference this is the systemd config used in our debian packages.

https://github.com/jellyfin/jellyfin/blob/master/debian/jellyfin.service

And many commented configs that are not used.

https://github.com/jellyfin/jellyfin/blob/master/debian/conf/jellyfin.service.conf

@bibitocarlos
Copy link
Author

I tried to combine arch/debian systemd service, no luck.
I tried to create a new user with the same groups than my "classic" user, no luck

@bibitocarlos
Copy link
Author

If i desactivate hardware decoding, the issue is gone.
Removed vulkan-validation-layers, no luck.

@bibitocarlos
Copy link
Author

The issue is gone with latest mesa and latest jellyfin.
Strange.

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

2 participants