Transcoding on Raspberry 4 hangs up process #4571

Closed
opened 2026-02-07 00:56:58 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @RenHoekNL on GitHub (Jan 29, 2023).

Server System (please complete the following information):

  • OS: Debian 10 (buster) arm64 - Raspberry Pi 4
  • Jellyfin Version: 10.8.8
  • Hardware settings & device: Video4Linux (V4L2) / H264 / Enable hardware encoding
  • Reverse proxy: no
  • Other hardware notes: n/a

Client System (please complete the following information):

  • OS: Windows 10
  • Browser (if Web client): Firefox
  • Client and Browser Version: 109.0 (64-bit)

I'm running into issues with transcoding.. Especially when skipping on the timeline. The process hangs. Often 'bcm2835-codec: Mutex fail' messages pop up in dmesg.

[Fri Jan 20 20:58:02 2023] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
[Fri Jan 20 20:58:02 2023] Mem abort info:
[Fri Jan 20 20:58:02 2023] ESR = 0x0000000096000045
[Fri Jan 20 20:58:02 2023] EC = 0x25: DABT (current EL), IL = 32 bits
[Fri Jan 20 20:58:02 2023] SET = 0, FnV = 0
[Fri Jan 20 20:58:02 2023] EA = 0, S1PTW = 0
[Fri Jan 20 20:58:02 2023] FSC = 0x05: level 1 translation fault
[Fri Jan 20 20:58:02 2023] Data abort info:
[Fri Jan 20 20:58:02 2023] ISV = 0, ISS = 0x00000045
[Fri Jan 20 20:58:02 2023] CM = 0, WnR = 1
[Fri Jan 20 20:58:02 2023] user pgtable: 4k pages, 39-bit VAs, pgdp=00000000e6bed000
[Fri Jan 20 20:58:02 2023] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[Fri Jan 20 20:58:02 2023] Internal error: Oops: 96000045 [#1] PREEMPT SMP
[Fri Jan 20 20:58:02 2023] Modules linked in: bnep hci_uart btbcm bluetooth ecdh_generic ecc xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo xt_addrtype iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter bridge stp llc ipt_REJECT nf_reject_ipv4 xt_multiport iptable_filter overlay fuse vc4 brcmfmac snd_soc_hdmi_codec cec v3d sg drm_kms_helper brcmutil gpu_sched drm snd_soc_core rpivid_hevc(C) bcm2835_codec(C) bcm2835_v4l2(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem cfg80211 videobuf2_dma_contig videobuf2_vmalloc snd_compress videobuf2_memops snd_pcm_dmaengine snd_bcm2835(C) videobuf2_v4l2 snd_pcm videobuf2_common drm_panel_orientation_quirks rfkill videodev snd_timer raspberrypi_hwmon i2c_bcm2835 snd vc_sm_cma(C) mc syscopyarea sysfillrect sysimgblt fb_sys_fops backlight uio_pdrv_genirq uio nvmem_rmem i2c_dev aes_neon_bs aes_neon_blk crypto_simd cryptd libaes ip_tables x_tables ipv6
[Fri Jan 20 20:58:02 2023] CPU: 1 PID: 2946 Comm: ffmpeg Tainted: G C 5.15.89-v8+ #1620
[Fri Jan 20 20:58:02 2023] Hardware name: Raspberry Pi 4 Model B Rev 1.2 (DT)
[Fri Jan 20 20:58:02 2023] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[Fri Jan 20 20:58:02 2023] pc : vchiq_mmal_port_enable+0xd8/0x158 [bcm2835_mmal_vchiq]
[Fri Jan 20 20:58:02 2023] lr : vchiq_mmal_port_enable+0x114/0x158 [bcm2835_mmal_vchiq]
[Fri Jan 20 20:58:02 2023] sp : ffffffc00eb33a60
[Fri Jan 20 20:58:02 2023] x29: ffffffc00eb33a60 x28: 0000000000000002 x27: dead000000000100
[Fri Jan 20 20:58:02 2023] x26: dead000000000122 x25: ffffff8048e80220 x24: ffffff8048e80008
[Fri Jan 20 20:58:02 2023] x23: ffffff8048e80000 x22: ffffff8048e80178 x21: 0000000000000000
[Fri Jan 20 20:58:02 2023] x20: 0000000000000000 x19: ffffff8046da6918 x18: 0000000000000011
[Fri Jan 20 20:58:02 2023] x17: 000000010eb338c0 x16: ffffffe773128898 x15: ffffffffffffffff
[Fri Jan 20 20:58:02 2023] x14: ffffffe773688de8 x13: ffffffc08eb337d7 x12: ffffffc00eb337dd
[Fri Jan 20 20:58:02 2023] x11: bcbcbcbcbcbcbcbc x10: 000000000000003a x9 : ffffffe7731288d4
[Fri Jan 20 20:58:02 2023] x8 : 00000000000000d4 x7 : 0000000000000002 x6 : ffffffc00eb336e0
[Fri Jan 20 20:58:02 2023] x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffffff8043a2601c
[Fri Jan 20 20:58:02 2023] x2 : 408ffbb2c6e5fe00 x1 : 0000000000000000 x0 : 0000000000000000
[Fri Jan 20 20:58:02 2023] Call trace:
[Fri Jan 20 20:58:02 2023] vchiq_mmal_port_enable+0xd8/0x158 [bcm2835_mmal_vchiq]
[Fri Jan 20 20:58:02 2023] bcm2835_codec_start_streaming+0x214/0x408 [bcm2835_codec]
[Fri Jan 20 20:58:02 2023] vb2_start_streaming+0x74/0x160 [videobuf2_common]
[Fri Jan 20 20:58:02 2023] vb2_core_streamon+0x98/0x198 [videobuf2_common]
[Fri Jan 20 20:58:02 2023] vb2_streamon+0x24/0x78 [videobuf2_v4l2]
[Fri Jan 20 20:58:02 2023] v4l2_m2m_streamon+0x34/0x88 [v4l2_mem2mem]
[Fri Jan 20 20:58:02 2023] v4l2_m2m_ioctl_streamon+0x20/0x30 [v4l2_mem2mem]
[Fri Jan 20 20:58:02 2023] v4l_streamon+0x2c/0x38 [videodev]
[Fri Jan 20 20:58:02 2023] __video_do_ioctl+0x188/0x410 [videodev]
[Fri Jan 20 20:58:02 2023] video_usercopy+0x310/0x7d0 [videodev]
[Fri Jan 20 20:58:02 2023] video_ioctl2+0x20/0x38 [videodev]
[Fri Jan 20 20:58:02 2023] v4l2_ioctl+0x48/0x68 [videodev]
[Fri Jan 20 20:58:02 2023] __arm64_sys_ioctl+0xb0/0xf0
[Fri Jan 20 20:58:02 2023] invoke_syscall+0x4c/0x110
[Fri Jan 20 20:58:02 2023] el0_svc_common.constprop.3+0xfc/0x120
[Fri Jan 20 20:58:02 2023] do_el0_svc+0x2c/0xa0
[Fri Jan 20 20:58:02 2023] el0_svc+0x24/0x60
[Fri Jan 20 20:58:02 2023] el0t_64_sync_handler+0x90/0xb8
[Fri Jan 20 20:58:02 2023] el0t_64_sync+0x1a0/0x1a4
[Fri Jan 20 20:58:02 2023] Code: f2fbd5bb f2fbd5ba 1400000c a9400261 (f9000420)
[Fri Jan 20 20:58:02 2023] ---[ end trace e6aa93e991e2b248 ]---
[Fri Jan 20 20:58:14 2023] bcm2835-codec bcm2835-codec: Mutex fail
[Fri Jan 20 20:58:23 2023] bcm2835-codec bcm2835-codec: Mutex fail
[Fri Jan 20 20:58:23 2023] bcm2835-codec bcm2835-codec: Mutex fail

I've updated to the latest rpi firmware:

cat /boot/.firmware_revision
cba3c6dae94962876e8fa4f2fbc85bf04918d8ba

But it still happens:

root 3171 0.2 0.8 508540 31872 ? Sl 20:58 0:00 _ /usr/share/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -ss 00:41:42.000 -autorotate 0 -i file:/xxx.avi -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_v4l2m2m -b:v 5075324 -maxrate 5075324 -bufsize 10150648 -level 51 -force_key_frames:0 expr:gte(t,2502+n_forced3) -g:v:0 72 -keyint_min:v:0 72 -vf setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw,iha),min(640,480*a))/64)*64:trunc(min(max(iw/a,ih),min(640/a,480))/2)*2,format=yuv420p -codec:a:0 copy -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 834 -hls_segment_filename /opt/jellyfin/data/transcodes/61a60521fd71873b41b04fa5d7aef4f3%d.ts -hls_playlist_type vod -hls_list_size 0 -y /opt/jellyfin/data/transcodes/61a60521fd71873b41b04fa5d7aef4f3.m3u8

This is where it hangs:

strace -v -p 3171
strace: Process 3171 attached
openat(AT_FDCWD, "/dev/video11", O_RDWR|O_NONBLOCK

It will be stuck there forever until I kill the process with a 'kill -9 '

Originally created by @RenHoekNL on GitHub (Jan 29, 2023). **Server System (please complete the following information):** - OS: Debian 10 (buster) arm64 - Raspberry Pi 4 - Jellyfin Version: 10.8.8 - Hardware settings & device: Video4Linux (V4L2) / H264 / Enable hardware encoding - Reverse proxy: no - Other hardware notes: n/a **Client System (please complete the following information):** - OS: Windows 10 - Browser (if Web client): Firefox - Client and Browser Version: 109.0 (64-bit) I'm running into issues with transcoding.. Especially when skipping on the timeline. The process hangs. Often 'bcm2835-codec: Mutex fail' messages pop up in dmesg. > [Fri Jan 20 20:58:02 2023] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 > [Fri Jan 20 20:58:02 2023] Mem abort info: > [Fri Jan 20 20:58:02 2023] ESR = 0x0000000096000045 > [Fri Jan 20 20:58:02 2023] EC = 0x25: DABT (current EL), IL = 32 bits > [Fri Jan 20 20:58:02 2023] SET = 0, FnV = 0 > [Fri Jan 20 20:58:02 2023] EA = 0, S1PTW = 0 > [Fri Jan 20 20:58:02 2023] FSC = 0x05: level 1 translation fault > [Fri Jan 20 20:58:02 2023] Data abort info: > [Fri Jan 20 20:58:02 2023] ISV = 0, ISS = 0x00000045 > [Fri Jan 20 20:58:02 2023] CM = 0, WnR = 1 > [Fri Jan 20 20:58:02 2023] user pgtable: 4k pages, 39-bit VAs, pgdp=00000000e6bed000 > [Fri Jan 20 20:58:02 2023] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 > [Fri Jan 20 20:58:02 2023] Internal error: Oops: 96000045 [#1] PREEMPT SMP > [Fri Jan 20 20:58:02 2023] Modules linked in: bnep hci_uart btbcm bluetooth ecdh_generic ecc xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo xt_addrtype iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter bridge stp llc ipt_REJECT nf_reject_ipv4 xt_multiport iptable_filter overlay fuse vc4 brcmfmac snd_soc_hdmi_codec cec v3d sg drm_kms_helper brcmutil gpu_sched drm snd_soc_core rpivid_hevc(C) bcm2835_codec(C) bcm2835_v4l2(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem cfg80211 videobuf2_dma_contig videobuf2_vmalloc snd_compress videobuf2_memops snd_pcm_dmaengine snd_bcm2835(C) videobuf2_v4l2 snd_pcm videobuf2_common drm_panel_orientation_quirks rfkill videodev snd_timer raspberrypi_hwmon i2c_bcm2835 snd vc_sm_cma(C) mc syscopyarea sysfillrect sysimgblt fb_sys_fops backlight uio_pdrv_genirq uio nvmem_rmem i2c_dev aes_neon_bs aes_neon_blk crypto_simd cryptd libaes ip_tables x_tables ipv6 > [Fri Jan 20 20:58:02 2023] CPU: 1 PID: 2946 Comm: ffmpeg Tainted: G C 5.15.89-v8+ #1620 > [Fri Jan 20 20:58:02 2023] Hardware name: Raspberry Pi 4 Model B Rev 1.2 (DT) > [Fri Jan 20 20:58:02 2023] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) > [Fri Jan 20 20:58:02 2023] pc : vchiq_mmal_port_enable+0xd8/0x158 [bcm2835_mmal_vchiq] > [Fri Jan 20 20:58:02 2023] lr : vchiq_mmal_port_enable+0x114/0x158 [bcm2835_mmal_vchiq] > [Fri Jan 20 20:58:02 2023] sp : ffffffc00eb33a60 > [Fri Jan 20 20:58:02 2023] x29: ffffffc00eb33a60 x28: 0000000000000002 x27: dead000000000100 > [Fri Jan 20 20:58:02 2023] x26: dead000000000122 x25: ffffff8048e80220 x24: ffffff8048e80008 > [Fri Jan 20 20:58:02 2023] x23: ffffff8048e80000 x22: ffffff8048e80178 x21: 0000000000000000 > [Fri Jan 20 20:58:02 2023] x20: 0000000000000000 x19: ffffff8046da6918 x18: 0000000000000011 > [Fri Jan 20 20:58:02 2023] x17: 000000010eb338c0 x16: ffffffe773128898 x15: ffffffffffffffff > [Fri Jan 20 20:58:02 2023] x14: ffffffe773688de8 x13: ffffffc08eb337d7 x12: ffffffc00eb337dd > [Fri Jan 20 20:58:02 2023] x11: bcbcbcbcbcbcbcbc x10: 000000000000003a x9 : ffffffe7731288d4 > [Fri Jan 20 20:58:02 2023] x8 : 00000000000000d4 x7 : 0000000000000002 x6 : ffffffc00eb336e0 > [Fri Jan 20 20:58:02 2023] x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffffff8043a2601c > [Fri Jan 20 20:58:02 2023] x2 : 408ffbb2c6e5fe00 x1 : 0000000000000000 x0 : 0000000000000000 > [Fri Jan 20 20:58:02 2023] Call trace: > [Fri Jan 20 20:58:02 2023] vchiq_mmal_port_enable+0xd8/0x158 [bcm2835_mmal_vchiq] > [Fri Jan 20 20:58:02 2023] bcm2835_codec_start_streaming+0x214/0x408 [bcm2835_codec] > [Fri Jan 20 20:58:02 2023] vb2_start_streaming+0x74/0x160 [videobuf2_common] > [Fri Jan 20 20:58:02 2023] vb2_core_streamon+0x98/0x198 [videobuf2_common] > [Fri Jan 20 20:58:02 2023] vb2_streamon+0x24/0x78 [videobuf2_v4l2] > [Fri Jan 20 20:58:02 2023] v4l2_m2m_streamon+0x34/0x88 [v4l2_mem2mem] > [Fri Jan 20 20:58:02 2023] v4l2_m2m_ioctl_streamon+0x20/0x30 [v4l2_mem2mem] > [Fri Jan 20 20:58:02 2023] v4l_streamon+0x2c/0x38 [videodev] > [Fri Jan 20 20:58:02 2023] __video_do_ioctl+0x188/0x410 [videodev] > [Fri Jan 20 20:58:02 2023] video_usercopy+0x310/0x7d0 [videodev] > [Fri Jan 20 20:58:02 2023] video_ioctl2+0x20/0x38 [videodev] > [Fri Jan 20 20:58:02 2023] v4l2_ioctl+0x48/0x68 [videodev] > [Fri Jan 20 20:58:02 2023] __arm64_sys_ioctl+0xb0/0xf0 > [Fri Jan 20 20:58:02 2023] invoke_syscall+0x4c/0x110 > [Fri Jan 20 20:58:02 2023] el0_svc_common.constprop.3+0xfc/0x120 > [Fri Jan 20 20:58:02 2023] do_el0_svc+0x2c/0xa0 > [Fri Jan 20 20:58:02 2023] el0_svc+0x24/0x60 > [Fri Jan 20 20:58:02 2023] el0t_64_sync_handler+0x90/0xb8 > [Fri Jan 20 20:58:02 2023] el0t_64_sync+0x1a0/0x1a4 > [Fri Jan 20 20:58:02 2023] Code: f2fbd5bb f2fbd5ba 1400000c a9400261 (f9000420) > [Fri Jan 20 20:58:02 2023] ---[ end trace e6aa93e991e2b248 ]--- > [Fri Jan 20 20:58:14 2023] bcm2835-codec bcm2835-codec: Mutex fail > [Fri Jan 20 20:58:23 2023] bcm2835-codec bcm2835-codec: Mutex fail > [Fri Jan 20 20:58:23 2023] bcm2835-codec bcm2835-codec: Mutex fail I've updated to the latest rpi firmware: > cat /boot/.firmware_revision > cba3c6dae94962876e8fa4f2fbc85bf04918d8ba But it still happens: > root 3171 0.2 0.8 508540 31872 ? Sl 20:58 0:00 \_ /usr/share/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -ss 00:41:42.000 -autorotate 0 -i file:/xxx.avi -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_v4l2m2m -b:v 5075324 -maxrate 5075324 -bufsize 10150648 -level 51 -force_key_frames:0 expr:gte(t,2502+n_forced*3) -g:v:0 72 -keyint_min:v:0 72 -vf setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(640\,480*a))/64)*64:trunc(min(max(iw/a\,ih)\,min(640/a\,480))/2)*2,format=yuv420p -codec:a:0 copy -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 834 -hls_segment_filename /opt/jellyfin/data/transcodes/61a60521fd71873b41b04fa5d7aef4f3%d.ts -hls_playlist_type vod -hls_list_size 0 -y /opt/jellyfin/data/transcodes/61a60521fd71873b41b04fa5d7aef4f3.m3u8 This is where it hangs: > strace -v -p 3171 > strace: Process 3171 attached > openat(AT_FDCWD, "/dev/video11", O_RDWR|O_NONBLOCK It will be stuck there forever until I kill the process with a 'kill -9 <pid>'
OVERLORD added the bugstalemedia playback labels 2026-02-07 00:56:58 +03:00
Author
Owner

@jellyfin-bot commented on GitHub (Jul 17, 2023):

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@jellyfin-bot commented on GitHub (Jul 17, 2023): This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#4571