daveyg_71
Posts: 16
Joined: Mon Apr 11, 2016 6:09 pm

Camera Module V2 ENOSPC Error

Mon May 09, 2016 2:43 am

I am running a time-lapse script on a pi3 with the new camera module. It will run for about 2-3 hours then crash with the error below. I am running the same script on a pi2 with the original camera module with no problem. The pi2 has been running for about 2 months with no errors.

This is the error:
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
This is the script:

Code: Select all

#!/bin/bash

DATE=$(date +"%Y-%m-%d_%H%M_%S")

raspistill -o /home/pi/camera_2/$DATE.jpg -t 2000 -vf -w 1920 -h 1080

exec $0

daveyg_71
Posts: 16
Joined: Mon Apr 11, 2016 6:09 pm

Re: Camera Module V2 ENOSPC Error

Wed May 11, 2016 9:07 pm

No help?? :(

I tried changing the time from 2 seconds to 20 seconds and still get the error.

texy
Forum Moderator
Forum Moderator
Posts: 5173
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Camera Module V2 ENOSPC Error

Fri May 13, 2016 7:20 am

Moved to the camera forum, where it may get more appropriate attention.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Koepi
Posts: 68
Joined: Fri Apr 29, 2016 7:18 am

Re: Camera Module V2 ENOSPC Error

Fri May 13, 2016 7:34 am

Sounds similar to the problem I reported as well:
viewtopic.php?f=43&t=147744

Which distribution and kernel are you using? Did you do

Code: Select all

-> sudo rpi-update
and is you distribution up-to-date?

Code: Select all

-> sudo apt-get update
-> sudo apt-get upgrade
Some debug output would help. As soon as the error occurs, type these commands on the console and copy the output into "code"-Tags:

Code: Select all

-> uname -a
-> sudo vcdbg malloc
-> sudo vcdbg reloc
-> sudo vcdbg log msg
Add the line

Code: Select all

start_debug=1
to your /boot/config.txt, force a sync on the command line:

Code: Select all

-> sudo sync
and reboot.

Now, when the cam crashes, you can also get a log of asserts:

Code: Select all

-> sudo vcdbg log assert
Maybe also useful:

Code: Select all

sudo raspi-gpio get
This is the summary of all the debug data I collected on my Pi A+. Maybe there are some similarities.

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

Re: Camera Module V2 ENOSPC Error

Fri May 13, 2016 9:13 am

texy wrote:Moved to the camera forum, where it may get more appropriate attention.
Texy
Thank you - I hadn't seen this one wherever it had originally been posted.

It does sound the same as Koepi's issue and is being investigated - please watch the other thread.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
Gavinmc42
Posts: 7079
Joined: Wed Aug 28, 2013 3:31 am

Re: Camera Module V2 ENOSPC Error

Sat May 14, 2016 4:54 am

Was reading the manual.
https://www.raspberrypi.org/wp-content/ ... tation.pdf
Page 4 has ENOSPC error, running out of GPU memory.
GPU code memory leak?
Increase gpu_mem, see if it takes longer to crash?
V2 needs more bytes because it is nearly double the size of the 5Mp.
10bit ADC - 2bytes x 3284 x 2164 x BGGR = 56MB, to do demosaic maths x 3?
168MB? 128MB not enough?
Got Pi2 or 3, make gpu_mem=256?
Got Pi B+ gpu_mem=192
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Camera Module V2 ENOSPC Error

Sat May 14, 2016 7:15 am

No, there's no memory leak. We're fairly certain we know where it fails in the code from Koepi's issue, but need to work out why the hardware is misbehaving.

Will request mods lock this thread in the absence of any other data.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

texy
Forum Moderator
Forum Moderator
Posts: 5173
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Camera Module V2 ENOSPC Error

Sat May 14, 2016 8:55 am

Locking as requested.
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Return to “Camera board”