-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some errors (deadlocks/OOMs) do not seem to be reported to Meadow.Cloud #782
Comments
I am not sure that the code above actually represents an error in the OS. Mono does actually generate an exception which the application can catch. Doesn't Core take on responsibility for unhandled exceptions if you have the right configuration settings in |
I'm assuming that it represents an error in the OS given that the |
I think I tried your code in a try/catch block and the device did not reset, it just looped. So I did this: List<byte[]> allocations = new List<byte[]>();
int iteration = 0;
while (true)
{
try
{
byte[] memoryBlock = new byte[3 * 1024 * 1024];
allocations.Add(memoryBlock);
iteration++;
Console.WriteLine($"Iteration: {iteration}, Allocated: {allocations.Count * 3} MB");
Thread.Sleep(100);
}
catch (Exception e)
{
Console.WriteLine($"OutOfMemory failed: {e.Message}");
} This suggests that the application is still running and any reset is due to Core detecting an unhandled exception and rebooting the board. If this is the case then I would be expecting Core to detect the unhandled exception and generating an error report file not the OS. |
I think that my reproduction sample is not the best one, since usually we have OOMs at the OS level, so we can't use try/catches there. I'll find another way to reproduce this issue, by getting an OOM using only OS calls, and I'll think more about it. But, at first glance, if we have an OOM at the OS level, the OS should generate an error report file, right? |
@duduita I have run the code in the sample on a board with the latest build from
I don't have logging to the cloud turned on so not sure if tis is working. I can also confirm that the
|
hmm, I was looking for Anyway, it doesn't seem to be reported to the cloud, so I'll adjust the issue description, and I'll enhance the OOM error message to let it more descriptive. |
Given that I have the following crash files:
And I'm currently sending metrics to |
Describe the bug
Some errors (deadlocks/OOMs) from
crash/mono_error.txt
do not seem to be reported to Meadow.Cloud.To Reproduce
Steps to reproduce an OOM (out-of-memory error):
AllocateMemory()
method during the app initialization:meadow file list
CLI command to see whether there isn't amono_error.txt
or not, and the Meadow.Cloud to see if there are a event containing this error there.Expected behavior
The
mono_error.txt
should have been created, as well as sent to the Meadow.Cloud.Meadow (please complete the following information as best as you can):
Board Information
Model: F7Micro
Hardware version: F7CoreComputeV2
Device name: CellBasics
Hardware Information
Processor type: STM32F777IIK6
ID: 3A-00-21-00-0D-50-4B-55-30-38-31-20
Serial number: 20523874554B
Coprocessor type: ESP32
MAC Address -
WiFi: 4C:75:25:D5:78:A0
Firmware Versions
OS: 1.14.0.0
Mono: 1.14.0.0
Coprocessor: 1.14.0.0
Protocol: 7
The text was updated successfully, but these errors were encountered: