Hi @vdsilva what device type are you trying that on and what sizes are the images? From the error it seems like there isn’t enough RAM to be able to compute the delta
The balenalib image is not necessary. My local_image_main is built off my private registry image. My private registry image is a ‘clone’ of the balena lib image on the device.
I could try removing the debian-python image and try the command again.
hmm. I don’t think removing images will help as that only frees up disk space. I think the core problem is shortage of RAM. The BBG only has 512MB and probably about 200MB of that is running the OS services. From what I now about the delta command, it will create a stream of the image in memory, so I guess it could be that it can’t fit the whole 643MB image in active memory. But this is just me guessing at this point. We would have to get the experts on balena-engine ( @petrosagg and @robertgzr ) to give us more insight.
Hi @vdsilva. I think the problem is that the engine tries to fork itself into a helper process (the untar process) but because when this happens the parent process has already allocated a fair amount of memory for computing the delta fingerprint, it fails. However this is soft of an artifact from how linux forks processes and CoW memory. I think you can workaround this issue with sysctl vm.overcommit_memory=1 which tells the kernel to never deny memory allocations but I wouldn’t leave this setting on for production devices
@petrosagg Can you give me details on how would I apply this change? I’m just try to play around with balena-engine and will remember to not leave this in on in production.