Kernel WARNING in videobuf2_common when Chromium cycles videos on dual screens leading to video playback failure (Pi 4, 6.12.20)

Open
#6,835 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux

Research direction

Start with drivers/media/common/videobuf2/videobuf2-core.c, especially __vb2_queue_cancel and the stop_streaming path shown in the trace. Reproduce the dual-screen Chromium video cycle on the Raspberry Pi 4 and trace which driver leaves buffers active. Done means identifying and fixing the cause of the warning and subsequent video playback failures, with the reproduction no longer producing active buffers.

Written by the indexing model from the issue text.

Description

Describe the bug

I’m seeing a kernel warning in __vb2_queue_cancel when running Chromium in kiosk mode to cycle through videos on two separate screens. This appears to originate from the videobuf2_common module, with an indication that stop_streaming() is leaving buffers in an active state. After running for a few hours, one or more of the videos will fail to play, usually freezing on the first frame.

Steps to reproduce the behaviour
  1. Configure Raspberry Pi 4 to use dual HDMI outputs.
  2. Launch Chromium (with hardware acceleration enabled) in kiosk mode to display two separate webpages (one per screen).
  3. Each webpage cycles through several videos using <video> tags with autoplay+loop. Videos are cycled by toggling the display tag of each video to either block or none (and subsequently after a small delay, pausing hidden videos and setting video.currentTime = 0).
  4. After 30 mins - 1 hour, kernel warnings start to appear.
  5. After a few hours to a few days, a seemingly random video will fail to play each time it is displayed.
Device (s)

Raspberry Pi 4 Mod. B

System

OS and version:
Raspberry Pi reference 2024-11-19
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 891df1e21ed2b6099a2e6a13e26c91dea44b34d4, stage4

Firmware version:
Mar 19 2025 18:24:21
Copyright (c) 2012 Broadcom
version ca6e8171a80ea46924ffaa629250bfb482f3a02c (clean) (release) (start)

Kernel version:
Linux six 6.12.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.20-1+rpt1~bpo12+1 (2025-03-19) aarch64 GNU/Linux

Logs
[  451.375494] WARNING: CPU: 0 PID: 1587 at drivers/media/common/videobuf2/videobuf2-core.c:2215 __vb2_queue_cancel+0x238/0x2d8 [videobuf2_common]
[  451.375528] Modules linked in: xt_REDIRECT xt_tcpudp nf_nat_pptp nf_conntrack_pptp nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables nfnetlink rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep binfmt_misc brcmfmac_wcc hci_uart btbcm bluetooth pl2303 bcm2835_codec(C) rpi_hevc_dec bcm2835_isp(C) usbserial bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) ecdh_generic vc_sm_cma(C) v4l2_mem2mem brcmfmac ecc videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops brcmutil videobuf2_v4l2 videodev libaes cfg80211 rfkill videobuf2_common snd_bcm2835(C) raspberrypi_hwmon mc i2c_brcmstb raspberrypi_gpiomem nvmem_rmem i2c_dev ledtrig_pattern fuse dm_mod ip_tables x_tables ipv6 vc4 snd_soc_hdmi_codec v3d snd_soc_core snd_compress drm_shmem_helper snd_pcm_dmaengine snd_pcm snd_timer snd gpu_sched drm_display_helper drm_dma_helper cec drm_kms_helper drm drm_panel_orientation_quirks backlight uio_pdrv_genirq uio
[  451.375730] CPU: 0 UID: 1000 PID: 1587 Comm: ThreadPoolSingl Tainted: G         C         6.12.20+rpt-rpi-v8 #1  Debian 1:6.12.20-1+rpt1~bpo12+1
[  451.375739] Tainted: [C]=CRAP
[  451.375743] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[  451.375748] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  451.375754] pc : __vb2_queue_cancel+0x238/0x2d8 [videobuf2_common]
[  451.375770] lr : __vb2_queue_cancel+0x34/0x2d8 [videobuf2_common]
[  451.375783] sp : ffffffc083853b00
[  451.375786] x29: ffffffc083853b00 x28: ffffffe52d81ed18 x27: ffffffe52d93d0f8
[  451.375797] x26: 0000000000000000 x25: ffffff80426c3548 x24: ffffff806c5f2780
[  451.375807] x23: 0000000000000000 x22: ffffff80808c3da8 x21: ffffff80808c3da8
[  451.375816] x20: 000000000000000a x19: ffffff80808c3da8 x18: 0000000000000003
[  451.375826] x17: 0000000000000000 x16: ffffffe53815a9f8 x15: ffffffc0838535b0
[  451.375835] x14: 0000000000000004 x13: ffffff8042280028 x12: 0000000000000000
[  451.375844] x11: ffffff80872b1ee8 x10: ffffff80872b1da8 x9 : ffffffe53815abc0
[  451.375854] x8 : ffffffc083853a10 x7 : 0000000000000000 x6 : 0000000000000228
[  451.375863] x5 : 000000008015000b x4 : fffffffec1b16ea0 x3 : 000000008015000b
[  451.375873] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000004
[  451.375882] Call trace:
[  451.375886]  __vb2_queue_cancel+0x238/0x2d8 [videobuf2_common]
[  451.375901]  vb2_core_streamoff+0x2c/0xd0 [videobuf2_common]
[  451.375914]  vb2_streamoff+0x20/0x78 [videobuf2_v4l2]
[  451.375926]  v4l2_m2m_streamoff+0x50/0x160 [v4l2_mem2mem]
[  451.375942]  v4l2_m2m_ioctl_streamoff+0x20/0x38 [v4l2_mem2mem]
[  451.375954]  v4l_streamoff+0x2c/0x40 [videodev]
[  451.376005]  __video_do_ioctl+0x170/0x3e0 [videodev]
[  451.376041]  video_usercopy+0x1bc/0x780 [videodev]
[  451.376076]  video_ioctl2+0x20/0x38 [videodev]
[  451.376111]  v4l2_ioctl+0x48/0x70 [videodev]
[  451.376146]  __arm64_sys_ioctl+0xb4/0x100
[  451.376157]  invoke_syscall+0x50/0x120
[  451.376166]  el0_svc_common.constprop.0+0x48/0xf0
[  451.376174]  do_el0_svc+0x24/0x38
[  451.376181]  el0_svc+0x30/0xd0
[  451.376189]  el0t_64_sync_handler+0x100/0x130
[  451.376197]  el0t_64_sync+0x190/0x198

[ 7474.680354] WARNING: CPU: 3 PID: 29825 at drivers/media/common/videobuf2/videobuf2-core.c:2215 __vb2_queue_cancel+0x238/0x2d8 [videobuf2_common]
[ 7474.680393] Modules linked in: xt_REDIRECT xt_tcpudp nf_nat_pptp nf_conntrack_pptp nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables nfnetlink rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep binfmt_misc brcmfmac_wcc hci_uart btbcm bluetooth pl2303 bcm2835_codec(C) rpi_hevc_dec bcm2835_isp(C) usbserial bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) ecdh_generic vc_sm_cma(C) v4l2_mem2mem brcmfmac ecc videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops brcmutil videobuf2_v4l2 videodev libaes cfg80211 rfkill videobuf2_common snd_bcm2835(C) raspberrypi_hwmon mc i2c_brcmstb raspberrypi_gpiomem nvmem_rmem i2c_dev ledtrig_pattern fuse dm_mod ip_tables x_tables ipv6 vc4 snd_soc_hdmi_codec v3d snd_soc_core snd_compress drm_shmem_helper snd_pcm_dmaengine snd_pcm snd_timer snd gpu_sched drm_display_helper drm_dma_helper cec drm_kms_helper drm drm_panel_orientation_quirks backlight uio_pdrv_genirq uio
[ 7474.680684] CPU: 3 UID: 1000 PID: 29825 Comm: ThreadPoolSingl Tainted: G        WC         6.12.20+rpt-rpi-v8 #1  Debian 1:6.12.20-1+rpt1~bpo12+1
[ 7474.680698] Tainted: [W]=WARN, [C]=CRAP
[ 7474.680703] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[ 7474.680708] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 7474.680717] pc : __vb2_queue_cancel+0x238/0x2d8 [videobuf2_common]
[ 7474.680738] lr : __vb2_queue_cancel+0x34/0x2d8 [videobuf2_common]
[ 7474.680757] sp : ffffffc08a2bbb00
[ 7474.680761] x29: ffffffc08a2bbb00 x28: ffffffe52d81ed18 x27: ffffffe52d93d0f8
[ 7474.680777] x26: 0000000000000000 xis:issue state:open [videodev]
[ 7474.681068]  __video_do_ioctl+0x170/0x3e0 [videodev]
[ 7474.681121]  video_usercopy+0x1bc/0x780 [videodev]
[ 7474.681173]  video_ioctl2+0x20/0x38 [videodev]
[ 7474.681225]  v4l2_ioctl+0x48/0x70 [videodev]
[ 7474.681277]  __arm64_sys_ioctl+0xb4/0x100
[ 7474.681292]  invoke_syscall+0x50/0x120
[ 7474.681306]  el0_svc_common.constprop.0+0x48/0xf0
[ 7474.681317]  do_el0_svc+0x24/0x38
[ 7474.681327]  el0_svc+0x30/0xd0
[ 7474.681340]  el0t_64_sync_handler+0x100/0x130
[ 7474.681351]  el0t_64_sync+0x190/0x198
[ 7474.681359] ---[ end trace 0000000000000000 ]---
[ 7474.681367] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 1 in active state
[ 7474.681373] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 3 in active state
[ 7474.681379] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 4 in active state
[ 7474.681383] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 5 in active state
[ 7474.681388] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 6 in active state
[ 7474.681393] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 7 in active state
Additional context

No response

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.