mmal: failed ENOSPC


29 posts   Page 1 of 2   1, 2
by peepo » Tue May 21, 2013 11:00 am
stdout: 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

successfully takes and saves say 3 pictures,
then this error on all subsequent grabs.

other processes appear to be running fine

what to do?

NB: after this, $ /opt/vc/bin/raspistill -vf -t 0 -o test.jpg hangs and
needs reboot to get camera back,
ps ax does not reveal any other relevant running processes afaict.

method:
run a small script that takes ~picture/sec
using
/opt/vc/bin/raspistill -vf -t 0 -o timestamp.jpg
Last edited by peepo on Tue May 21, 2013 11:05 am, edited 1 time in total.
User avatar
Posts: 268
Joined: Sun Oct 21, 2012 9:36 am
by jamesh » Tue May 21, 2013 11:51 am
Can you try it with a larger -t value? e.g 2000

James
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by peepo » Tue May 21, 2013 12:31 pm
-t 2000
similar in 1 test, 2 pics then same error

naturally my app requires -t min

is github a better place to file bugs?

ie -n
segfault

when display is not attached ((

anything else let me know

seems to be same issue as:
Rasbpistill fails with ENOSPC
viewtopic.php?t=44209&p=351902
which I had missed.
User avatar
Posts: 268
Joined: Sun Oct 21, 2012 9:36 am
by jamesh » Tue May 21, 2013 1:44 pm
peepo wrote:-t 2000
similar in 1 test, 2 pics then same error

naturally my app requires -t min

is github a better place to file bugs?

ie -n
segfault

when display is not attached ((

anything else let me know

seems to be same issue as:
Rasbpistill fails with ENOSPC
viewtopic.php?t=44209&p=351902
which I had missed.


I don't think you are seeing a bug - since the same code works fine elsewhere. It's weird that it takes some pictures then fails. Does video work?

The other issues (-n, -?) are already fixed.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by gusgriller » Thu May 30, 2013 8:04 pm
I'm getting a lot of these messages...

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

I did an update/upgrade yesterday. The raspivid call is part of a script which gets triggered on motion detected from a separate device over ssh, and it was working fine up until about lunchtime today, and since then I've been getting this error each time.

For information, the full command within the script is:
/usr/bin/raspivid -vf -w $HRES -h $VRES -o ${PATH1}/${FILE1} -t $TIME -fps $FPS >>$LOG 2>>$LOG
where
HRES=1280
VRES=720
PATH1="/home/pi/pics"
YEAR=`date +\%Y`
MONTH=`date +\%m`
DAY=`date +\%d`
TIME=`date +\%H\%M\%S`
FILE1=`echo 02-${YEAR}${MONTH}${DAY}-${TIME}.h264`
TT=20
TIME=`expr $TT \* 1000`
FPS=25
LOG="/home/pi/scripts/camera.log"
Posts: 22
Joined: Thu Nov 24, 2011 1:59 pm
by jamesh » Fri May 31, 2013 8:05 am
gusgriller wrote:I'm getting a lot of these messages...

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

I did an update/upgrade yesterday. The raspivid call is part of a script which gets triggered on motion detected from a separate device over ssh, and it was working fine up until about lunchtime today, and since then I've been getting this error each time.

For information, the full command within the script is:
/usr/bin/raspivid -vf -w $HRES -h $VRES -o ${PATH1}/${FILE1} -t $TIME -fps $FPS >>$LOG 2>>$LOG
where
HRES=1280
VRES=720
PATH1="/home/pi/pics"
YEAR=`date +\%Y`
MONTH=`date +\%m`
DAY=`date +\%d`
TIME=`date +\%H\%M\%S`
FILE1=`echo 02-${YEAR}${MONTH}${DAY}-${TIME}.h264`
TT=20
TIME=`expr $TT \* 1000`
FPS=25
LOG="/home/pi/scripts/camera.log"


I presume you have rebooted the Raspi? And that GPU mem is still set correctly? And you have checked all the connectors?
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by gusgriller » Fri May 31, 2013 8:51 am
jamesh wrote:
gusgriller wrote:I'm getting a lot of these messages...

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

I did an update/upgrade yesterday. The raspivid call is part of a script which gets triggered on motion detected from a separate device over ssh, and it was working fine up until about lunchtime today, and since then I've been getting this error each time.

For information, the full command within the script is:
/usr/bin/raspivid -vf -w $HRES -h $VRES -o ${PATH1}/${FILE1} -t $TIME -fps $FPS >>$LOG 2>>$LOG
where
HRES=1280
VRES=720
PATH1="/home/pi/pics"
YEAR=`date +\%Y`
MONTH=`date +\%m`
DAY=`date +\%d`
TIME=`date +\%H\%M\%S`
FILE1=`echo 02-${YEAR}${MONTH}${DAY}-${TIME}.h264`
TT=20
TIME=`expr $TT \* 1000`
FPS=25
LOG="/home/pi/scripts/camera.log"


I presume you have rebooted the Raspi? And that GPU mem is still set correctly? And you have checked all the connectors?


I didn't reboot after performing the update/upgrade 2 days ago, but I did reboot last night to get it working again (which it currently is).
I haven't touched the GPU mem. I believe it was set to 128 when I checked after initial install. I have the 256MB Pi.
The connections are fine. The camera has been working well for several days and hasn't been touched since.
Posts: 22
Joined: Thu Nov 24, 2011 1:59 pm
by jamesh » Fri May 31, 2013 9:08 am
So its working OK now after the reboot?

If so it apears the camera and/or GPU got itself in a dodgy state that needed a power cycle to fix.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by gusgriller » Fri May 31, 2013 9:45 am
Yes, it is working fine now.
Is there anything you want me to do in case it happens again? Such as turn on verbose information?
I'll report back here if it does re-occur.
Posts: 22
Joined: Thu Nov 24, 2011 1:59 pm
by jamesh » Fri May 31, 2013 10:40 am
gusgriller wrote:Yes, it is working fine now.
Is there anything you want me to do in case it happens again? Such as turn on verbose information?
I'll report back here if it does re-occur.


No this looks like problem on the GPU, so verbose in the app won't help.

You could try this to dump the VC log information which may have useful information.

Code: Select all
sudo vcdbg log msg
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by gusgriller » Fri May 31, 2013 11:32 am
It's happened again within the last hour. Output from vcdbg below

Code: Select all
001155.303: HDMI:Setting property pixel encoding to Default
001155.328: HDMI:Setting property pixel clock type to PAL
001155.351: HDMI:Setting property content type flag to No data
001155.374: HDMI:Setting property fuzzy format match to enabled
001156.284: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001156.304: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
003089.593: vchiq_core: vchiq_init_state: slot_zero = 0x47000000, is_master = 1
003093.885: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
003096.398: cma: cma_hwm is zero - disabling cma service
401311.775: hdmi: HDMI: No lookup table for resolution group 0
401330.488: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
572995.550: hdmi: HDMI: No lookup table for resolution group 0
573349.562: ca_process_frame_frames: metadata_image NULL
921291.974: hdmi: HDMI: No lookup table for resolution group 0
921310.100: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
1472702.536: hdmi: HDMI: No lookup table for resolution group 0
1473056.715: ca_process_frame_frames: metadata_image NULL
2115664.549: hdmi: HDMI: No lookup table for resolution group 0
2115682.764: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2155678.609: hdmi: HDMI: No lookup table for resolution group 0
2155708.363: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2372675.961: hdmi: HDMI: No lookup table for resolution group 0
2373031.130: ca_process_frame_frames: metadata_image NULL
3273262.181: hdmi: HDMI: No lookup table for resolution group 0
3273616.270: ca_process_frame_frames: metadata_image NULL
4172932.005: hdmi: HDMI: No lookup table for resolution group 0
4173285.626: ca_process_frame_frames: metadata_image NULL
778262.688: hdmi: HDMI: No lookup table for resolution group 0
778616.649: ca_process_frame_frames: metadata_image NULL
1475286.001: hdmi: HDMI: No lookup table for resolution group 0
1475303.871: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
1677752.373: hdmi: HDMI: No lookup table for resolution group 0
1678106.241: ca_process_frame_frames: metadata_image NULL
2578083.709: hdmi: HDMI: No lookup table for resolution group 0
2578437.520: ca_process_frame_frames: metadata_image NULL
2747214.681: hdmi: HDMI: No lookup table for resolution group 0
2747232.750: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2854034.095: hdmi: HDMI: No lookup table for resolution group 0
2854052.142: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3071112.671: hdmi: HDMI: No lookup table for resolution group 0
3071130.728: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3092272.208: hdmi: HDMI: No lookup table for resolution group 0
3092290.857: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3477686.020: hdmi: HDMI: No lookup table for resolution group 0
3478042.838: ca_process_frame_frames: metadata_image NULL
083122.279: hdmi: HDMI: No lookup table for resolution group 0
083477.831: ca_process_frame_frames: metadata_image NULL
354505.018: hdmi: HDMI: No lookup table for resolution group 0
354523.439: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
982880.905: hdmi: HDMI: No lookup table for resolution group 0
983235.842: ca_process_frame_frames: metadata_image NULL
1643287.939: hdmi: HDMI: No lookup table for resolution group 0
1643306.201: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
1866496.540: hdmi: HDMI: No lookup table for resolution group 0
1866514.930: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2044561.608: hdmi: HDMI: No lookup table for resolution group 0
2044590.839: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2167619.157: hdmi: HDMI: No lookup table for resolution group 0
2167637.267: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2639516.725: hdmi: HDMI: No lookup table for resolution group 0
2639534.614: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2783716.681: hdmi: HDMI: No lookup table for resolution group 0
2784071.845: ca_process_frame_frames: metadata_image NULL
3239550.550: hdmi: HDMI: No lookup table for resolution group 0
3239569.060: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3267477.321: hdmi: HDMI: No lookup table for resolution group 0
3267516.882: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3576966.542: hdmi: HDMI: No lookup table for resolution group 0
3576985.428: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3650877.925: hdmi: HDMI: No lookup table for resolution group 0
3650895.818: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3682866.425: hdmi: HDMI: No lookup table for resolution group 0
3683224.011: ca_process_frame_frames: metadata_image NULL
3817856.324: hdmi: HDMI: No lookup table for resolution group 0
3817874.367: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3839619.670: hdmi: HDMI: No lookup table for resolution group 0
3839641.256: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
4292847.556: hdmi: HDMI: No lookup table for resolution group 0
4292866.091: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
080969.208: hdmi: HDMI: No lookup table for resolution group 0
080988.681: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
287818.428: hdmi: HDMI: No lookup table for resolution group 0
288174.578: ca_process_frame_frames: metadata_image NULL
528170.822: hdmi: HDMI: No lookup table for resolution group 0
528188.843: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
633153.289: hdmi: HDMI: No lookup table for resolution group 0
633171.634: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
692201.734: hdmi: HDMI: No lookup table for resolution group 0
692219.784: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
734081.903: hdmi: HDMI: No lookup table for resolution group 0
734099.837: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
808954.187: hdmi: HDMI: No lookup table for resolution group 0
808972.394: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
900848.750: hdmi: HDMI: No lookup table for resolution group 0
900866.681: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
1188428.884: hdmi: HDMI: No lookup table for resolution group 0
1188785.023: ca_process_frame_frames: metadata_image NULL
1380609.169: hdmi: HDMI: No lookup table for resolution group 0
1380627.250: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
1472814.359: hdmi: HDMI: No lookup table for resolution group 0
1472832.431: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2088288.565: hdmi: HDMI: No lookup table for resolution group 0
2088644.530: ca_process_frame_frames: metadata_image NULL
2663816.657: hdmi: HDMI: No lookup table for resolution group 0
2663834.609: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
2988449.806: hdmi: HDMI: No lookup table for resolution group 0
2988806.750: ca_process_frame_frames: metadata_image NULL
3141964.125: hdmi: HDMI: No lookup table for resolution group 0
3141982.284: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3240559.833: hdmi: HDMI: No lookup table for resolution group 0
3240577.997: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3279394.996: hdmi: HDMI: No lookup table for resolution group 0
3279413.062: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
3331680.196: hdmi: HDMI: No lookup table for resolution group 0
3331698.912: mmal: mmal_vll_load: could not load VLL 'videnc.vll':
Posts: 22
Joined: Thu Nov 24, 2011 1:59 pm
by jamesh » Fri May 31, 2013 12:04 pm
That's interesting. The encoder code is failing to load - not sure how that can happen. Perhaps a memory leak in the GPU. It's odd no-one else has reported this if it is a memory leak.

What in particular is the sequence of operations that gets you in to this state?
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by gusgriller » Fri May 31, 2013 12:21 pm
:(

Basically, I have motion software running on a different linux device (non Pi), which calls the script below when a motion event is detected. Provided the camera isn't already in use (I capture snapshots occasionally), and hasn't been activated for the last 20 seconds, it calls raspivid for a 20 second video and then uploads it to my web server. Nothing too complex.

Code: Select all
#!/bin/sh

HRES=1280
VRES=720
PATH1="/home/pi/pics"
PATH2="/media/synology"
YEAR=`date +\%Y`
MONTH=`date +\%m`
DAY=`date +\%d`
TIME=`date +\%H\%M\%S`
FILE1=`echo 02-${YEAR}${MONTH}${DAY}-${TIME}.h264`
FILE2=`echo 02-${TIME}.h264`
INUSE="/tmp/camera-in-use"
TT=20
TIME=`expr $TT \* 1000`
FPS=25
LOG="/home/pi/scripts/camera.log"
LASTVIDEOFILE="/home/pi/scripts/last-video-file"

date +"%d/%m/%y %H:%M:%S video.sh started" >>$LOG
if [ -f $LASTVIDEOFILE ] ; then
   then=`cat $LASTVIDEOFILE`
   now=`date +"%s"`
   diff=`expr $now - $then`
   if [ $diff -le $TT ] ; then
      echo "Video already started within last $TT seconds, exiting" >>$LOG
      exit;
   fi
fi

# Check that camera is not already in use
if [ ! -f $INUSE ] ; then
   /usr/bin/touch $INUSE
   date +"%s" >$LASTVIDEOFILE
   /usr/bin/raspivid -vf -w $HRES -h $VRES -o ${PATH1}/${FILE1} -t $TIME -fps $FPS >>$LOG 2>>$LOG
   /bin/rm $INUSE
   /bin/mkdir ${PATH2}/$YEAR 2>/dev/null
   /bin/mkdir ${PATH2}/$YEAR/$MONTH 2>/dev/null
   /bin/mkdir ${PATH2}/$YEAR/$MONTH/$DAY 2>/dev/null
   scp ${PATH1}/${FILE1} root@192.168.0.153:/volume1/web/$YEAR/$MONTH/$DAY/${FILE2} >>$LOG 2>>$LOG
   /bin/rm ${PATH1}/${FILE1}
   date +"%d/%m/%y %H:%M:%S video.sh finished" >>$LOG
else
   echo "Camera in use, exiting" >>$LOG
fi
Posts: 22
Joined: Thu Nov 24, 2011 1:59 pm
by jamesh » Fri May 31, 2013 1:54 pm
We did have a report that if a camera app is running and you start another camera app, then this kills the camera and needs a reboot. Are you sure you are completing one run before starting the next?
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by gusgriller » Fri May 31, 2013 2:22 pm
Fairly sure - you can see in my script that I touch a $INUSE file before raspivid and remove it afterwards, and the whole thing is wrapped in a conditional statement which doesn't enter if the file exists.
I suppose there is an edge case whereby two instances of the script could arrive at the if statement at exactly the same time and both pass through, but that does seem a very remote possibility given how the script is being called. But I will change that and make that impossible, maybe by writing the PID into the $INUSE file or something similar.
Posts: 22
Joined: Thu Nov 24, 2011 1:59 pm
by jamesh » Fri May 31, 2013 2:46 pm
I think you might be getting a race since you have assumed that the raspivid run time is exactly 20s, and it's certainly going to be longer than that (startup time, then 20s, then shutdown time). I may of course be reading your script wrongly, but may be worth adding a second time - the raspivid -t time plus a bit more for overheads.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by gusgriller » Fri May 31, 2013 2:52 pm
Ok, I'll tighten that up and let you know.
Are there any plans to prevent the need for a reboot when the camera is inadvertently accessed by more than one process?
Posts: 22
Joined: Thu Nov 24, 2011 1:59 pm
by jamesh » Fri May 31, 2013 4:41 pm
gusgriller wrote:Ok, I'll tighten that up and let you know.
Are there any plans to prevent the need for a reboot when the camera is inadvertently accessed by more than one process?


It's in the bug list, but I'm rather busy at the moment to investigate, and there are quite a few other issues that are higher priority. Yyou can blame this one on user error to some extent - at least, that's what I do ;-)
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by zachrybaker » Sat Jul 27, 2013 4:23 pm
I am having the same error message.

Interestingly mine got to this place via a different set of actions.
I call raspistill via a script, which was still in development (ssh session). When my script wasn't working, I tried calling raspistill directly, no dice. So I turned on a monitor the pi is connected to and saw a preview pic on the screen from raspistill, although it wasn't running anymore.

Since there doesn't seem to be a good way to deal with this, I tried rebooting. the reboot command shut down all the services but didn't actually power cycle, so I pulled power, and plugged back in. When I did, the camera's red LED came on during boot and stayed on.

Furthermore, when I called raspistill after ssh login, the LED went off and I got this error message again.

I can attempt to reboot, with same results. 100% of the time.
Posts: 1
Joined: Sat Jul 27, 2013 3:57 pm
by javahaxxor » Sat Oct 12, 2013 3:59 pm
same error here. Interesting that running raspistill from the commandline, it's running without a glitch until it fills the partition, but running it from the script causes the camera to die. concurrency issue maybe ?

Code: Select all
raspistill Camera App v1.3

Width 2592, Height 1944, quality 85, filename /run/shm/image%d.jpg
Time delay 50000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No

Preview No, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
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



my code:
Code: Select all
   TIMELAPSE = "raspistill -v -tl 1000 -t 5000 -vf -n -o " + IMGPATH + "image%d.jpg -e jpg" + LO_RES
   while (True):
      step = 0;
      if pTimelapse.poll() is not None:
         print "restarting raspistill"
         pTimelapse=subprocess.Popen(TIMELAPSE,shell=True)
            
      files = filter(os.path.isfile, glob.glob(IMGPATH + "image*jpg"))
      files.sort(key=lambda x: os.path.getmtime(x))
      print("Files to work on: " + repr(len(files)))
      
      if len(files) == 0:
         break
         
      firstImage = Image.open(files[0])
      for i in files:
         lastImage = Image.open(i)
         diff = img_rms(firstImage,lastImage)
         print(i + "   " + repr(diff))
         if diff > 600:
            pTimelapse=subprocess.Popen(CAPTURE,shell=True)
            print ("diff > 600")
      


strace of raspistill:
Code: Select all
adyhasch@jenna:~$ cat raspi.txt
execve("/usr/bin/raspistill", ["raspistill", "-v", "-tl", "1000", "-t", "5000", "-n", "-o", "/run/shm/image%d.jpg"], [/* 18 vars */]) = 0
brk(0)                                  = 0x1815000
uname({sys="Linux", node="raspberrypi", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f56000
access("/etc/ld.so.preload", R_OK)      = 0
open("/etc/ld.so.preload", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=44, ...}) = 0
mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0xb6f55000
close(3)                                = 0
open("/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\270\4\0\0004\0\0\0"..., 512) = 512
lseek(3, 7276, SEEK_SET)                = 7276
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1080) = 1080
lseek(3, 7001, SEEK_SET)                = 7001
read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47
fstat64(3, {st_mode=S_IFREG|0755, st_size=10170, ...}) = 0
mmap2(NULL, 39740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f29000
mprotect(0xb6f2b000, 28672, PROT_NONE)  = 0
mmap2(0xb6f32000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb6f32000
close(3)                                = 0
munmap(0xb6f55000, 44)                  = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=53956, ...}) = 0
mmap2(NULL, 53956, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f1b000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/opt/vc/lib/libmmal_core.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\10*\0\0004\0\0\0"..., 512) = 512
lseek(3, 52576, SEEK_SET)               = 52576
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160
lseek(3, 52023, SEEK_SET)               = 52023
read(3, "A?\0\0\0aeabi\0\0015\0\0\0\5ARM1176JZF-S\0\6\7"..., 64) = 64
fstat64(3, {st_mode=S_IFREG|0644, st_size=68683, ...}) = 0
mmap2(NULL, 84768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f06000
mprotect(0xb6f13000, 28672, PROT_NONE)  = 0
mmap2(0xb6f1a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc) = 0xb6f1a000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/opt/vc/lib/libmmal_util.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0H-\0\0004\0\0\0"..., 512) = 512
lseek(3, 51768, SEEK_SET)               = 51768
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1200) = 1200
lseek(3, 51171, SEEK_SET)               = 51171
read(3, "A?\0\0\0aeabi\0\0015\0\0\0\5ARM1176JZF-S\0\6\7"..., 64) = 64
fstat64(3, {st_mode=S_IFREG|0644, st_size=69290, ...}) = 0
mmap2(NULL, 83852, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ef1000
mprotect(0xb6efe000, 28672, PROT_NONE)  = 0
mmap2(0xb6f05000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc) = 0xb6f05000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/opt/vc/lib/libmmal_vc_client.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0H\33\0\0004\0\0\0"..., 512) = 512
lseek(3, 34036, SEEK_SET)               = 34036
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1120) = 1120
lseek(3, 33727, SEEK_SET)               = 33727
read(3, "A?\0\0\0aeabi\0\0015\0\0\0\5ARM1176JZF-S\0\6\7"..., 64) = 64
fstat64(3, {st_mode=S_IFREG|0644, st_size=43918, ...}) = 0
mmap2(NULL, 44480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ee6000
mmap2(0xb6eee000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0xb6eee000
mmap2(0xb6eef000, 7616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6eef000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/opt/vc/lib/libvcos.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\250*\0\0004\0\0\0"..., 512) = 512
lseek(3, 161436, SEEK_SET)              = 161436
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1400) = 1400
lseek(3, 37803, SEEK_SET)               = 37803
read(3, "A?\0\0\0aeabi\0\0015\0\0\0\5ARM1176JZF-S\0\6\7"..., 64) = 64
fstat64(3, {st_mode=S_IFREG|0644, st_size=177322, ...}) = 0
mmap2(NULL, 72848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ed4000
mprotect(0xb6edd000, 32768, PROT_NONE)  = 0
mmap2(0xb6ee5000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0xb6ee5000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/opt/vc/lib/libbcm_host.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\200B\0\0004\0\0\0"..., 512) = 512
lseek(3, 58492, SEEK_SET)               = 58492
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1080) = 1080
lseek(3, 58199, SEEK_SET)               = 58199
read(3, "A?\0\0\0aeabi\0\0015\0\0\0\5ARM1176JZF-S\0\6\7"..., 64) = 64
fstat64(3, {st_mode=S_IFREG|0644, st_size=77192, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f55000
mmap2(NULL, 103240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6eba000
mprotect(0xb6ec8000, 32768, PROT_NONE)  = 0
mmap2(0xb6ed0000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe) = 0xb6ed0000
mmap2(0xb6ed1000, 9032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6ed1000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\274V\0\0004\0\0\0"..., 512) = 512
lseek(3, 82712, SEEK_SET)               = 82712
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1400) = 1400
lseek(3, 82308, SEEK_SET)               = 82308
read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49
fstat64(3, {st_mode=S_IFREG|0755, st_size=116462, ...}) = 0
mmap2(NULL, 123412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e9b000
mprotect(0xb6eaf000, 28672, PROT_NONE)  = 0
mmap2(0xb6eb6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb6eb6000
mmap2(0xb6eb8000, 4628, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6eb8000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0(\t\0\0004\0\0\0"..., 512) = 512
lseek(3, 8652, SEEK_SET)                = 8652
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160
lseek(3, 8320, SEEK_SET)                = 8320
read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49
fstat64(3, {st_mode=S_IFREG|0644, st_size=9812, ...}) = 0
mmap2(NULL, 41136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e90000
mprotect(0xb6e92000, 28672, PROT_NONE)  = 0
mmap2(0xb6e99000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb6e99000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\300\26\0\0004\0\0\0"..., 512) = 512
lseek(3, 25312, SEEK_SET)               = 25312
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1320) = 1320
lseek(3, 24924, SEEK_SET)               = 24924
read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49
fstat64(3, {st_mode=S_IFREG|0644, st_size=26632, ...}) = 0
mmap2(NULL, 57876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e81000
mprotect(0xb6e87000, 28672, PROT_NONE)  = 0
mmap2(0xb6e8e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0xb6e8e000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/opt/vc/lib/libvchiq_arm.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0008\26\0\0004\0\0\0"..., 512) = 512
lseek(3, 21308, SEEK_SET)               = 21308
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1080) = 1080
lseek(3, 21015, SEEK_SET)               = 21015
read(3, "A?\0\0\0aeabi\0\0015\0\0\0\5ARM1176JZF-S\0\6\7"..., 64) = 64
fstat64(3, {st_mode=S_IFREG|0644, st_size=29707, ...}) = 0
mmap2(NULL, 55448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e73000
mprotect(0xb6e78000, 32768, PROT_NONE)  = 0
mmap2(0xb6e80000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0xb6e80000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libgcc_s.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0`\364\0\0004\0\0\0"..., 512) = 512
lseek(3, 130212, SEEK_SET)              = 130212
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160
lseek(3, 129880, SEEK_SET)              = 129880
read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 51) = 51
fstat64(3, {st_mode=S_IFREG|0644, st_size=131372, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f54000
mmap2(NULL, 162704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e4b000
mprotect(0xb6e6b000, 28672, PROT_NONE)  = 0
mmap2(0xb6e72000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f) = 0xb6e72000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\214y\1\0004\0\0\0"..., 512) = 512
lseek(3, 1194784, SEEK_SET)             = 1194784
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1360) = 1360
lseek(3, 1194348, SEEK_SET)             = 1194348
read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47
fstat64(3, {st_mode=S_IFREG|0755, st_size=1196144, ...}) = 0
mmap2(NULL, 1238312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6d1c000
mprotect(0xb6e3e000, 28672, PROT_NONE)  = 0
mmap2(0xb6e45000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x121) = 0xb6e45000
mmap2(0xb6e48000, 9512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6e48000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f53000
set_tls(0xb6f534c0, 0xb6f53b98, 0xb6f59048, 0xb6f534c0, 0xb6f59048) = 0
mprotect(0xb6e45000, 8192, PROT_READ)   = 0
mprotect(0xb6e8e000, 4096, PROT_READ)   = 0
mprotect(0xb6e99000, 4096, PROT_READ)   = 0
mprotect(0xb6eb6000, 4096, PROT_READ)   = 0
mprotect(0xb6eba000, 57344, PROT_READ|PROT_WRITE) = 0
mprotect(0xb6eba000, 57344, PROT_READ|PROT_EXEC) = 0
cacheflush(0xb6eba000, 0xb6ec8000, 0, 0x15, 0xb6f55000) = -1 EFAULT (Bad address)
mprotect(0xb6f58000, 4096, PROT_READ)   = 0
munmap(0xb6f1b000, 53956)               = 0
set_tid_address(0xb6f53068)             = 7732
set_robust_list(0xb6f53070, 0xc)        = 0
futex(0xbe9c6748, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, b6eb7000) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb6ea020c, [], SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb6ea00b4, [], SA_RESTART|SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
futex(0xb6ee5450, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0)                                  = 0x1815000
brk(0x1836000)                          = 0x1836000
open("/dev/vchiq", O_RDWR)              = 3
ioctl(3, 0xc008c40a, 0xbe9c62c8)        = 0
ioctl(3, 0xc400, 0)                     = 0
mmap2(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb651c000
mprotect(0xb651c000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb6d1afa8, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb6d1b4d8, tls=0xb6d1b930, child_tidptr=0xb6d1b4d8) = 7733
ioctl(3, 0xc01cc402, 0xbe9c6254)        = 0
ioctl(3, 0xc40d, 0x1914009)             = 0
ioctl(3, 0xc01cc402, 0xbe9c620c)        = 0
ioctl(3, 0xc01cc402, 0xbe9c620c)        = 0
mmap2(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb5d1c000
mprotect(0xb5d1c000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb651afa8, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb651b4d8, tls=0xb651b930, child_tidptr=0xb651b4d8) = 7734
ioctl(3, 0xc40d, 0x191500a)             = 0
ioctl(3, 0xc40d, 0x191600b)             = 0
ioctl(3, 0xc01cc402, 0xbe9c6214)        = 0
ioctl(3, 0xc01cc402, 0xbe9c6214)        = 0
ioctl(3, 0xc40d, 0x191700c)             = 0
ioctl(3, 0xc40d, 0x191800d)             = 0
mmap2(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb551c000
mprotect(0xb551c000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb5d1afa8, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb5d1b4d8, tls=0xb5d1b930, child_tidptr=0xb5d1b4d8) = 7735
ioctl(3, 0xc01cc402, 0xbe9c621c)        = 0
ioctl(3, 0xc01cc402, 0xbe9c621c)        = 0
ioctl(3, 0xc40d, 0x191900e)             = 0
ioctl(3, 0xc40d, 0x191a00f)             = 0
mmap2(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb4d1c000
mprotect(0xb4d1c000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb551afa8, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb551b4d8, tls=0xb551b930, child_tidptr=0xb551b4d8) = 7736
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0x400cc404, 0xbe9c629c)        = 0
ioctl(3, 0xc40d, 0x1914009)             = 0
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0xc010c408, 0xbe9c6298)        = 13
ioctl(3, 0xc40d, 0x1914009)             = 0
ioctl(3, 0xc40d, 0x1914009)             = 0
rt_sigaction(SIGINT, {0xe0f8, [INT], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0
write(2, "\nraspistill Camera App v1.3\n\n", 29) = 29
write(2, "Width 2592, Height 1944, quality"..., 67) = 67
write(2, "Time delay 5000, Raw no\n", 24) = 24
write(2, "Thumbnail enabled Yes, width 64,"..., 55) = 55
write(2, "Link to latest frame enabled ", 29) = 29
write(2, " no\n", 4)                    = 4
write(2, "Full resolution preview No\n\n", 28) = 28
write(2, "Preview No, Full screen Yes\n", 28) = 28
write(2, "Preview window 0,0,1024,768\nOpac"..., 40) = 40
write(2, "Sharpness 0, Contrast 0, Brightn"..., 39) = 39
write(2, "Saturation 0, ISO 0, Video Stabi"..., 69) = 69
write(2, "Exposure Mode 'auto', AWB Mode '"..., 59) = 59
write(2, "Metering Mode 'average', Colour "..., 72) = 72
write(2, "Rotation 0, hflip No, vflip No\n", 31) = 31
write(2, "ROI x 0.000000, y 0.000000, w 1."..., 50) = 50
futex(0xb6f1ab00, FUTEX_WAKE_PRIVATE, 2147483647) = 0
sched_get_priority_max(SCHED_OTHER)     = 0
sched_get_priority_min(SCHED_OTHER)     = 0
futex(0xb6eee598, FUTEX_WAKE_PRIVATE, 2147483647) = 0
ioctl(3, 0xc01cc402, 0xbe9c615c)        = 0
ioctl(3, 0xc40d, 0x191b010)             = 0
ioctl(3, 0xc40c, 0x191b010)             = 0
ioctl(3, 0x400cc404, 0xbe9c61a4)        = 0
futex(0xb6eee38c, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
mmap2(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb451c000
mprotect(0xb451c000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb4d1afa8, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb4d1b4d8, tls=0xb4d1b930, child_tidptr=0xb4d1b4d8) = 7737
ioctl(3, 0x400cc404, 0xbe9c6004)        = 0
ioctl(3, 0x400cc404, 0xbe9c6004)        = 0
ioctl(3, 0x400cc404, 0xbe9c6004)        = 0
ioctl(3, 0x400cc404, 0xbe9c6004)        = 0
ioctl(3, 0x400cc404, 0xbe9c6004)        = 0
ioctl(3, 0x400cc404, 0xbe9c619c)        = 0
ioctl(3, 0x400cc404, 0xbe9c6134)        = 0
ioctl(3, 0x400cc404, 0xbe9c605c)        = 0
ioctl(3, 0x400cc404, 0xbe9c605c)        = 0
ioctl(3, 0x400cc404, 0xbe9c605c)        = 0
ioctl(3, 0x400cc404, 0xbe9c605c)        = 0
ioctl(3, 0x400cc404, 0xbe9c6064)        = 0
ioctl(3, 0x400cc404, 0xbe9c6064)        = 0
ioctl(3, 0x400cc404, 0xbe9c6064)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c6064)        = 0
ioctl(3, 0x400cc404, 0xbe9c6064)        = 0
ioctl(3, 0x400cc404, 0xbe9c6064)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c607c)        = 0
ioctl(3, 0x400cc404, 0xbe9c604c)        = 0
ioctl(3, 0x400cc404, 0xbe9c6154)        = 0
ioctl(3, 0x400cc404, 0xbe9c604c)        = 0
ioctl(3, 0x400cc404, 0xbe9c6154)        = 0
ioctl(3, 0x400cc404, 0xbe9c604c)        = 0
ioctl(3, 0x400cc404, 0xbe9c6154)        = 0
ioctl(3, 0x400cc404, 0xbe9c62d4)        = 0
futex(0xb6eee38c, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f52000
write(1, "mmal: mmal_vc_component_enable: "..., 67) = 67
write(1, "mmal: camera component couldn't "..., 43) = 43
ioctl(3, 0x400cc404, 0xbe9c622c)        = 0
futex(0x181d4b0, FUTEX_WAKE_PRIVATE, 1) = 1
ioctl(3, 0x400cc404, 0xbe9c62dc)        = 0
futex(0xb6eee38c, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
ioctl(3, 0xc40d, 0x191b010)             = 0
ioctl(3, 0xc40b, 0x191b010)             = 0
write(1, "mmal: main: Failed to create cam"..., 46) = 46
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0x400cc404, 0xbe9c62c4)        = 0
ioctl(3, 0xc40d, 0x1914009)             = 0
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0xc010c408, 0xbe9c62c0)        = 13
ioctl(3, 0xc40d, 0x1914009)             = 0
ioctl(3, 0xc40d, 0x1914009)             = 0
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0x400cc404, 0xbe9c62c4)        = 0
ioctl(3, 0xc40d, 0x1914009)             = 0
ioctl(3, 0xc40c, 0x1914009)             = 0
ioctl(3, 0xc010c408, 0xbe9c62c0)        = 27
ioctl(3, 0xc40d, 0x1914009)             = 0
ioctl(3, 0xc40d, 0x1914009)             = 0
write(1, "mmal: Failed to run camera app. "..., 66) = 66
write(1, "\n", 1)                       = 1
exit_group(0)                           = ?

Posts: 7
Joined: Fri Sep 20, 2013 8:38 am
by jamesh » Sat Oct 12, 2013 4:24 pm
Certainly a problem in your code. I'm no Python expert (it is Python?) but how are you ensuring the previous run has stopped before you might start the next one?
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm
by javahaxxor » Sun Oct 13, 2013 12:08 am
Sorry to bother You, guys .. It was a code error, of course. The process was not dying properly, so the new process was causing a hang. And yes, it is Python. And I'm new at it, so I'm kindof trying out a bunch of things at the same time ;)
Posts: 7
Joined: Fri Sep 20, 2013 8:38 am
by enl8enmentnow » Sat Feb 08, 2014 5:19 am
It most likely means the camera is still running. It can only run one instance at a time. Check "ps aux".
Posts: 1
Joined: Sat Feb 08, 2014 5:17 am
by DougieLawson » Sat Feb 08, 2014 1:28 pm
I'm still puzzled why the code sets ENOSPC "error no space left on device". That's simply 100% WRONG!

EWOULDBLOCK or EAGAIN would be more sensible.
EBUSY would be simplest.
Hacker on ZX80, Microtan65, Raspberry Pis and Arduinos
Unemployed mainframe database troubleshooter
RPi owner since 2012.
Twitter: @DougieLawson


Please post technical questions on the forum, not by personal message. Thanks!
User avatar
Posts: 8485
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by jamesh » Sat Feb 08, 2014 1:54 pm
Feel free to submit a patch to change the error messages. I just slapped some in.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September, October, November 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12375
Joined: Sat Jul 30, 2011 7:41 pm