Bluestang
Posts: 69
Joined: Sat May 30, 2020 8:43 pm

Gstreamer1.0 Error

Sun May 09, 2021 5:22 am

Hello,

I am getting this error in dmesg, and I am experiencing a loading delay in an app that uses gstreamer1.0. The app is called RetroFE and it is a frontend that is used to navigate an emulation collection. It is similar to RetroPie's EmulationStation but uses gstreamer to play videos.

The delay is in the loading of the video and artwork. Any clues would be extremely useful. This is on a fully updated 64-bit RPiOS with the latest kernel from rpi-update - 5.10.35.

Update - This error also happens on the stable kernel as well - 5.11.17.

Code: Select all

[  303.742194] ------------[ cut here ]------------
[  303.742214] WARNING: CPU: 2 PID: 1003 at drivers/media/common/videobuf2/videobuf2-core.c:1945 __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  303.742217] Modules linked in: xpad ff_memless joydev sg bnep hci_uart btbcm bluetooth ecdh_generic ecc 8021q garp stp llc brcmfmac brcmutil v3d gpu_sched bcm2835_codec(C) bcm2835_v4l2(C) bcm2835_isp(C) vc4 cfg80211 v4l2_mem2mem bcm2835_mmal_vchiq(C) cec videobuf2_dma_contig videobuf2_vmalloc rfkill videobuf2_memops videobuf2_v4l2 drm_kms_helper videobuf2_common drm raspberrypi_hwmon i2c_brcmstb vc_sm_cma(C) drm_panel_orientation_quirks videodev mc snd_soc_core snd_compress snd_bcm2835(C) snd_pcm_dmaengine snd_pcm snd_timer snd rpivid_mem syscopyarea sysfillrect sysimgblt fb_sys_fops backlight nvmem_rmem uio_pdrv_genirq uio i2c_dev aes_neon_bs sha256_generic aes_neon_blk crypto_simd cryptd ip_tables x_tables ipv6
[  303.742325] CPU: 2 PID: 1003 Comm: retrofe64 Tainted: G         C        5.10.35-v8+ #1417
[  303.742328] Hardware name: Raspberry Pi 4 Model B Rev 1.2 (DT)
[  303.742332] pstate: 20000005 (nzCv daif -PAN -UAO -TCO BTYPE=--)
[  303.742338] pc : __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  303.742344] lr : __vb2_queue_cancel+0x3c/0x220 [videobuf2_common]
[  303.742346] sp : ffffffc0125bbb10
[  303.742348] x29: ffffffc0125bbb10 x28: ffffffc008db1ed0 
[  303.742353] x27: ffffff8046e79500 x26: 0000000000000000 
[  303.742358] x25: ffffff8045e03e28 x24: 0000000040045613 
[  303.742362] x23: 0000000000000000 x22: ffffffc011258948 
[  303.742366] x21: ffffff8044c8e028 x20: ffffff8044c8e028 
[  303.742371] x19: ffffff8044c8e028 x18: 0000000000000004 
[  303.742376] x17: 0000000000000000 x16: 0000000000000000 
[  303.742380] x15: ffffff8047280030 x14: ffffff8048f36ba0 
[  303.742384] x13: 0000000000000000 x12: 0000000000000000 
[  303.742388] x11: ffffff8048f36b58 x10: ffffff8047280038 
[  303.742393] x9 : ffffffc008d025c4 x8 : ffffff8048f36b80 
[  303.742397] x7 : 0000000000000000 x6 : 0000000000000000 
[  303.742402] x5 : ffffff8045e0401c x4 : ffffff8044db5ac0 
[  303.742406] x3 : ffffff8047280008 x2 : 0000000000000002 
[  303.742411] x1 : 0000000000000000 x0 : 0000000000000002 
[  303.742415] Call trace:
[  303.742421]  __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  303.742427]  vb2_core_streamoff+0x2c/0xc8 [videobuf2_common]
[  303.742435]  vb2_streamoff+0x24/0x78 [videobuf2_v4l2]
[  303.742445]  v4l2_m2m_streamoff+0x44/0x130 [v4l2_mem2mem]
[  303.742450]  v4l2_m2m_ioctl_streamoff+0x20/0x30 [v4l2_mem2mem]
[  303.742496]  v4l_streamoff+0x2c/0x38 [videodev]
[  303.742509]  __video_do_ioctl+0x18c/0x3f0 [videodev]
[  303.742521]  video_usercopy+0x154/0x618 [videodev]
[  303.742534]  video_ioctl2+0x20/0x68 [videodev]
[  303.742546]  v4l2_ioctl+0x48/0x68 [videodev]
[  303.742557]  __arm64_sys_ioctl+0xb0/0xf0
[  303.742564]  el0_svc_common.constprop.2+0xac/0x1d0
[  303.742567]  do_el0_svc+0x2c/0x98
[  303.742571]  el0_svc+0x20/0x30
[  303.742575]  el0_sync_handler+0x90/0xb8
[  303.742578]  el0_sync+0x178/0x180
[  303.742581] ---[ end trace adc576eccc087145 ]---
Last edited by Bluestang on Sun May 09, 2021 4:03 pm, edited 1 time in total.

fruitoftheloom
Posts: 26840
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Gstreamer1.0 Error

Sun May 09, 2021 5:32 am

Bluestang wrote:
Sun May 09, 2021 5:22 am
Hello,

I am getting this error in dmesg, and I am experiencing a loading delay in an app that uses gstreamer1.0. The app is called RetroFE and it is a frontend that is used to navigate an emulation collection. It is similar to RetroPie's EmulationStation but uses gstreamer to play videos.

The delay is in the loading of the video and artwork. Any clues would be extremely useful. This is on a fully updated 64-bit RPiOS with the latest kernel from rpi-update - 5.10.35.

Code: Select all

[  303.742194] ------------[ cut here ]------------
[  303.742214] WARNING: CPU: 2 PID: 1003 at drivers/media/common/videobuf2/videobuf2-core.c:1945 __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  303.742217] Modules linked in: xpad ff_memless joydev sg bnep hci_uart btbcm bluetooth ecdh_generic ecc 8021q garp stp llc brcmfmac brcmutil v3d gpu_sched bcm2835_codec(C) bcm2835_v4l2(C) bcm2835_isp(C) vc4 cfg80211 v4l2_mem2mem bcm2835_mmal_vchiq(C) cec videobuf2_dma_contig videobuf2_vmalloc rfkill videobuf2_memops videobuf2_v4l2 drm_kms_helper videobuf2_common drm raspberrypi_hwmon i2c_brcmstb vc_sm_cma(C) drm_panel_orientation_quirks videodev mc snd_soc_core snd_compress snd_bcm2835(C) snd_pcm_dmaengine snd_pcm snd_timer snd rpivid_mem syscopyarea sysfillrect sysimgblt fb_sys_fops backlight nvmem_rmem uio_pdrv_genirq uio i2c_dev aes_neon_bs sha256_generic aes_neon_blk crypto_simd cryptd ip_tables x_tables ipv6
[  303.742325] CPU: 2 PID: 1003 Comm: retrofe64 Tainted: G         C        5.10.35-v8+ #1417
[  303.742328] Hardware name: Raspberry Pi 4 Model B Rev 1.2 (DT)
[  303.742332] pstate: 20000005 (nzCv daif -PAN -UAO -TCO BTYPE=--)
[  303.742338] pc : __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  303.742344] lr : __vb2_queue_cancel+0x3c/0x220 [videobuf2_common]
[  303.742346] sp : ffffffc0125bbb10
[  303.742348] x29: ffffffc0125bbb10 x28: ffffffc008db1ed0 
[  303.742353] x27: ffffff8046e79500 x26: 0000000000000000 
[  303.742358] x25: ffffff8045e03e28 x24: 0000000040045613 
[  303.742362] x23: 0000000000000000 x22: ffffffc011258948 
[  303.742366] x21: ffffff8044c8e028 x20: ffffff8044c8e028 
[  303.742371] x19: ffffff8044c8e028 x18: 0000000000000004 
[  303.742376] x17: 0000000000000000 x16: 0000000000000000 
[  303.742380] x15: ffffff8047280030 x14: ffffff8048f36ba0 
[  303.742384] x13: 0000000000000000 x12: 0000000000000000 
[  303.742388] x11: ffffff8048f36b58 x10: ffffff8047280038 
[  303.742393] x9 : ffffffc008d025c4 x8 : ffffff8048f36b80 
[  303.742397] x7 : 0000000000000000 x6 : 0000000000000000 
[  303.742402] x5 : ffffff8045e0401c x4 : ffffff8044db5ac0 
[  303.742406] x3 : ffffff8047280008 x2 : 0000000000000002 
[  303.742411] x1 : 0000000000000000 x0 : 0000000000000002 
[  303.742415] Call trace:
[  303.742421]  __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  303.742427]  vb2_core_streamoff+0x2c/0xc8 [videobuf2_common]
[  303.742435]  vb2_streamoff+0x24/0x78 [videobuf2_v4l2]
[  303.742445]  v4l2_m2m_streamoff+0x44/0x130 [v4l2_mem2mem]
[  303.742450]  v4l2_m2m_ioctl_streamoff+0x20/0x30 [v4l2_mem2mem]
[  303.742496]  v4l_streamoff+0x2c/0x38 [videodev]
[  303.742509]  __video_do_ioctl+0x18c/0x3f0 [videodev]
[  303.742521]  video_usercopy+0x154/0x618 [videodev]
[  303.742534]  video_ioctl2+0x20/0x68 [videodev]
[  303.742546]  v4l2_ioctl+0x48/0x68 [videodev]
[  303.742557]  __arm64_sys_ioctl+0xb0/0xf0
[  303.742564]  el0_svc_common.constprop.2+0xac/0x1d0
[  303.742567]  do_el0_svc+0x2c/0x98
[  303.742571]  el0_svc+0x20/0x30
[  303.742575]  el0_sync_handler+0x90/0xb8
[  303.742578]  el0_sync+0x178/0x180
[  303.742581] ---[ end trace adc576eccc087145 ]---

FYI rpi-update is not recommended because it installs pre-release kernel / firmware:

https://www.raspberrypi.org/documentati ... -update.md
The information is out there....you just have to let it in.

My other Linux machines: ChromeBox
https://www.aliexpress.com/item/32966393971.html
& Stone Desktop Intel CoreDuo circa 2010

User avatar
DougieLawson
Posts: 41309
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Gstreamer1.0 Error

Sun May 09, 2021 10:30 am

Bluestang wrote:
Sun May 09, 2021 5:22 am
This is on a fully updated 64-bit RPiOS with the latest kernel from rpi-update - 5.10.35.
Open an issue at https://github.com/raspberrypi/linux/issues
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Bluestang
Posts: 69
Joined: Sat May 30, 2020 8:43 pm

Re: Gstreamer1.0 Error

Sun May 09, 2021 4:02 pm

fruitoftheloom wrote:
Sun May 09, 2021 5:32 am

FYI rpi-update is not recommended because it installs pre-release kernel / firmware:

https://www.raspberrypi.org/documentati ... -update.md
I forgot to mention that this happens on the stable release kernel 5.11.17 too.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11247
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Gstreamer1.0 Error

Sun May 09, 2021 5:28 pm

It's only a warning, not a fatal error, and you haven't quoted the actual useful bit immediately afterwards which would be

Code: Select all

videobuf2_common: driver bug: stop_streaming operation is leaving buf 0b70dd47 in active state
The codec driver hasn't returned some buffers to videobuf2 on streamoff. videobuf2 cleans up on behalf of the driver anyway.
It's on the list of things to investigate, but so are lots of other things.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Bluestang
Posts: 69
Joined: Sat May 30, 2020 8:43 pm

Re: Gstreamer1.0 Error

Sun May 09, 2021 5:49 pm

6by9 wrote:
Sun May 09, 2021 5:28 pm
It's only a warning, not a fatal error, and you haven't quoted the actual useful bit immediately afterwards which would be

Code: Select all

videobuf2_common: driver bug: stop_streaming operation is leaving buf 0b70dd47 in active state

Oh, sorry about that but here is the info a requested:

Code: Select all

[44052.480978] videobuf2_common: driver bug: stop_streaming operation is leaving buf 000000000d3a47b1 in active state
[44052.480996] videobuf2_common: driver bug: stop_streaming operation is leaving buf 00000000d9357f3a in active state
[44055.871732] bcm2835-codec bcm2835-codec: bcm2835_codec_stop_streaming: Timeout waiting for buffers to be returned - 2 outstanding
[44059.455803] bcm2835-codec bcm2835-codec: bcm2835_codec_stop_streaming: Timeout waiting for buffers to be returned - 2 outstanding
[44063.583814] bcm2835-codec bcm2835-codec: bcm2835_codec_stop_streaming: Timeout waiting for buffers to be returned - 2 outstanding
The codec driver hasn't returned some buffers to videobuf2 on streamoff. videobuf2 cleans up on behalf of the driver anyway.
It's on the list of things to investigate, but so are lots of other things.

So this bit makes sense, as the delay/hesitation behavior is happening when scrolling through the collection library. The RetroFE GUI is playing a video preview of the current selection, ends the video stream if the user scrolls to the next one, and loads the video preview of the new selection.

The issue though is once the delay/hesitation happens once, it is constantly persistent until a full reboot is executed. It also happens only during scrolling through certain items in the collection (the videos are all encoded the same) but those items do load a different image.

I can go into more detail, but it sounds like this is a known bug that is on the TODO list to address?

Return to “General discussion”