Coder Social home page Coder Social logo

Comments (12)

ayufan avatar ayufan commented on September 15, 2024

@charredchar

Do you have anything in dmesg where it happens? This appears to be zombie process, that holds v4l2 devices. This could happen when it runs out of memory on v4l2 m2m processing, where the app deadlocks and cannot do anything with it.

Also, what kernel version do you use?

from camera-streamer.

charredchar avatar charredchar commented on September 15, 2024

Sadly, I don't know the exact time it happens because I usually come back to my PC and see it isn't loading the stream. But this is the first error I see in dmesg;

[50463.263871] bcm2835-codec bcm2835-codec: bcm2835_codec_stop_streaming: Failed disabling i/p port, ret -62
[50465.343870] bcm2835-codec bcm2835-codec: bcm2835_codec_flush_buffers: Timeout waiting for buffers to be returned - 2 outstanding
[50468.383910] bcm2835_mmal_vchiq: timed out waiting for sync completion
[50468.383935] bcm2835-codec bcm2835-codec: bcm2835_codec_stop_streaming: Failed enabling component, ret -62
[50468.383961] ------------[ cut here ]------------
[50468.383975] WARNING: CPU: 1 PID: 4047 at drivers/media/common/videobuf2/videobuf2-core.c:1995 __vb2_queue_cancel+0x1e0/0x258 [videobuf2_common]
[50468.384061] Modules linked in: cdc_acm nft_counter xt_DSCP xt_tcpudp nft_compat nf_tables nfnetlink cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg bnep hci_uart btbcm bluetooth ecdh_generic ecc imx219 8021q garp stp llc brcmfmac brcmutil vc4 cfg80211 v3d gpu_sched snd_soc_hdmi_codec cec raspberrypi_hwmon rfkill i2c_mux_pinctrl i2c_mux bcm2835_unicam drm_kms_helper v4l2_dv_timings v4l2_fwnode v4l2_async bcm2835_codec(C) bcm2835_isp(C) bcm2835_v4l2(C) i2c_bcm2835 bcm2835_mmal_vchiq(C) snd_soc_core vc_sm_cma(C) videobuf2_vmalloc rpivid_hevc(C) v4l2_mem2mem videobuf2_dma_contig snd_bcm2835(C) videobuf2_memops videobuf2_v4l2 videobuf2_common snd_compress snd_pcm_dmaengine videodev snd_pcm mc snd_timer snd syscopyarea sysfillrect sysimgblt uio_pdrv_genirq fb_sys_fops nvmem_rmem uio drm fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6
[50468.385075] CPU: 1 PID: 4047 Comm: camera-streamer Tainted: G         C        5.15.84-v7l+ #1613

Is there anything I can do to release it so I don't need to reboot every time?

from camera-streamer.

ayufan avatar ayufan commented on September 15, 2024

What device it is?

from camera-streamer.

charredchar avatar charredchar commented on September 15, 2024

An imx219 module installed on a PiCam V2 board.

from camera-streamer.

ayufan avatar ayufan commented on September 15, 2024

Camera I don't think is a problem. I ask about RPI device and if you could also tell me gpu and cma memory settings. I remember that this was pretty fragile if run on the limit for available memory. The v4l2 does not like at all memory fragmentation and in some cases it might take a long time to output frame that locks kernel driver.

from camera-streamer.

charredchar avatar charredchar commented on September 15, 2024

My apologies. It is a Pi 4 1GB with the GPU memory set to 256 in the boot/config.txt. I do not know where to find the CMA memory setting.

from camera-streamer.

ayufan avatar ayufan commented on September 15, 2024

dmesg | grep -i cma should do the trick.

You could also try to change: set GPU mem to 160, but CMA to 256MB.

from camera-streamer.

charredchar avatar charredchar commented on September 15, 2024

It looks like CMA might already be set to 256MB, but to be sure where can I set this? I'll change GPU to 160 and reboot the Pi.

[    0.000000] Reserved memory: created CMA memory pool at 0x000000001ec00000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Memory: 627136K/917504K available (10240K kernel code, 1386K rwdata, 3308K rodata, 2048K init, 591K bss, 28224K reserved, 262144K cma-reserved, 131072K highmem)
[    5.285381] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    5.303933] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    5.334509] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    5.340434] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    5.344284] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[50468.384061] Modules linked in: cdc_acm nft_counter xt_DSCP xt_tcpudp nft_compat nf_tables nfnetlink cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg bnep hci_uart btbcm bluetooth ecdh_generic ecc imx219 8021q garp stp llc brcmfmac brcmutil vc4 cfg80211 v3d gpu_sched snd_soc_hdmi_codec cec raspberrypi_hwmon rfkill i2c_mux_pinctrl i2c_mux bcm2835_unicam drm_kms_helper v4l2_dv_timings v4l2_fwnode v4l2_async bcm2835_codec(C) bcm2835_isp(C) bcm2835_v4l2(C) i2c_bcm2835 bcm2835_mmal_vchiq(C) snd_soc_core vc_sm_cma(C) videobuf2_vmalloc rpivid_hevc(C) v4l2_mem2mem videobuf2_dma_contig snd_bcm2835(C) videobuf2_memops videobuf2_v4l2 videobuf2_common snd_compress snd_pcm_dmaengine videodev snd_pcm mc snd_timer snd syscopyarea sysfillrect sysimgblt uio_pdrv_genirq fb_sys_fops nvmem_rmem uio drm fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6

from camera-streamer.

ayufan avatar ayufan commented on September 15, 2024

Then - I would not change it.

What other settings you have for camera-streamer? How you run it, with what res?

from camera-streamer.

charredchar avatar charredchar commented on September 15, 2024

I used the default camera-streamer/service/camera-streamer-pi219-8MP.service file.
I cloned the repo yesterday so it should be the newest version.

from camera-streamer.

ayufan avatar ayufan commented on September 15, 2024

OK.

@charredchar People say that this is due some throttling happening on device: raspberrypi/firmware#1627. So, it appears that in some cases those timeouts configured might be too low. Can you validate if you observe anything out of this issue linked?

from camera-streamer.

charredchar avatar charredchar commented on September 15, 2024

I don't think I am having any of those issues as Fluidd would have alerted me of any overheating, throttling or under-volting (I've seen the under-volt warning before changing wiring) but I can try over_voltage=2 and see what happens.

from camera-streamer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.