Found cause of regular Hub lock-up after migrating to Built-in Webcore

I moved from the WebCore app to the built-in WebCore

One of the things to resolve is that Global Variables are not defined when you move the pistons over, and yu have to add them manually.

I thought I had created them all, however, it turned out I had missed just one.

The hub was suffering high utilisation and was locking up at least once a day.

The error showed up in the logs as a red Error flag with the missing variable name (before it froze! :slight_smile: ).

Since adding the missing Global @variable the hub has remained up and is much more stable.

As the variable was showing up as valid when viewing the code and editing it, this was not apparent but was essentially undefined, I assume this was causing some form of memory leak, or overwriting other memory causing it to hang after a while.

This may prompt others migrating to check all their global variables are in place, and/or be prepared to make a note and add them when they make the move from app to built-in Webcore.

4 Likes

Might also have something to do with people getting high usage markers on the new firmwares? It looks exactly like that behaviour - so a corrupted variable as a result of a firmware update causing a high utilisation error trying to find where it's disappeared to.

If so, then turning on debug logs on the variables might show up when one or more of them have thrown a wobbly, undefined themselves, and help identify the specific issue. Course it'll be fun if you have a lot of variables..

Thinking of that, is there a method to switch on or off batch debug on variables or other things.. Like an app or a rule etc. Manual switching 100 sockets to run debug logging would be a tedious task..

@martin7 Maybe @nh.schottfam can arrest that kind of error in future releases.

was there anything in the HE logs or IDE logs when the piston was executing?

So there is an update to webcore (HPM repair to get it today), that will log errors for missing variables (for reading a variable, medium or higher logging; for set a variable will always log if variable does not exist).

  • This is set this way because some apps deal with themselves a variable is missing for read.
  • writing a variable that does not exist is an error.