Disable Reboot on Errors

Hi,
we are facing problems when we are unit testing our code:

If too many errors occur, legato will reboot the system.

Q1: is there a way to disable this functionality?
Q2: how many errors or critical errors need to happen in which time to reboot the system?

thanks!

Did you add faultaction in adef file?
Did you check logread why it would reboot?
Btw, you should also debug those error

There are no faultactions defined in the unit test code, because we are doing negative tests that trigger errors. So the errors are on purpose.

Logread doesn’t tell us why it’s rebooting, therefore the questions.

Is there a way to disable rebooting if too many errors occur?
How many errors need to occur to trigger the faultaction?

You can do printing for counting the error, right?

Are you using sandboxed application?

no, we are running all apps without sandbox

Then you should try sandboxed application

There are several reasons why we can’t move to sandboxed apps.

I can count the errors, but if there is a delay where no errors occur, the next errors might not trigger a reboot.
How is this handled?
Is there any code I can look up to understand the mechanism?

We really need to understand how it works, because we are also facing random reboots in the code that is not for unit testing.

Did you check linux console message in uart2 to see why there is crash?

Unfortunately there is nothing in uart2. The next message after the crash is the first line of the boot.

But how is this mechanism working?
Is it just counting the errors and after x errors it stops the app?
Or is it counting the errors over time and if x errors occur in x seconds it stops the app?

i don’t know how this is happened
it could be out of memory, wrong memory address etc

what kind of error are you generating?

You should be able to debug this as the error is generated on purpose

Its just a lot of LE_ERROR messages. The code itself doesn’t produce any fault which could be related to memory, etc.
If a function is not able to e.g. open a file, it will log it with LE_ERROR. This is where all the messages are comming from.
Also the reboot is absolutely random. It’s never at the same time or state of code.

But still all my question remain:
How does this feature work?

What API did you call to generate the LE_ERROR message?
can you paste you code and test application here?

We are using the basic log API LE_ERROR(..), LE_INFO(..) and so on.

I’m not allowed to paste the code here and it would be way to much, because as I said, this is not happening in a particular case. It’s happening more on a random base.

I’ll figure it out how this mechanism works. Thanks