SYSCALL: sys_exit called by core 0 with 0x0

I’m working with parallel programming, using Core 0 and Core 1 at the same time the improve speed of the process.
The process has two steps :
P1) Capture a Picture, Run a KMODEL , modify the Picture with the results of the model.
P2) Create a JPEG of the picture created in P1, Send the JPEG to an HTTP Server.

If I execute the two process en sequence using CORE 0 (First P1 , then P2), every thing works for many hours.
But if I execute the next sequence :

while( 1 ):
execute P1.
if ( execute P2 is not running )
{
execute P2
release memory
}
else
{
release memory P2 is busy
}

The programm runs for 15 minutos or 1 hour, but randomly generate the next errors in sequence:
SYSCALL: sys_exit called by core 0 with 0x0
SYSCALL: sys_exit called by core 1 with 0x0

¿What are the reasons the sys_exit function is called?
I need a clue, to know where to find, but I can’t find low level documentation to understand why this function iscalled.

I forgot to say that I’m working with Kendryte Standalone SDK.