[wifi] DEBUG: closing | freezes on alpha.63+
# help
r
Hello, I've noticed how the esp32 can freeze and never recover, after getting the
[wifi] DEBUG: closing
. I've seen this issue when the esp32 goes completely out of memory, and now after not being able to read from sd-card.
Copy code
******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.64>
******************************************************************************
EXCEPTION error. 
FILE_NOT_FOUND
  0: stat                      <pkg:pkg-host>/file.toit:197:3
  1: is_directory              <pkg:pkg-host>/file.toit:178:11
  2: get_file_names            ../src/sd_card/sd_card_driver.toit:68:6
  3: delete_old_files          ../src/persistance.toit:182:22
  4: handle_data_message.<lambda> ../src/persistance.toit:39:21
******************************************************************************

[wifi] DEBUG: closing
Nothing happens after this, when it is supposed to print out something 1-5 times every second. I'm unsure how to provide more useful information right now, but I didn't notice this on alpha-47 and I saw this problem when out of memory on alpha-60
k
One thing that might have changed fairly recently is that your apps may need to be run with the --critical flag.
Do you use
tools/firmware
to build up the bits for your devices?
r
Yes, compile with
sdk/bin/toit.compile
, and install with
sdk/tools/firmware
k
Without giving it too much consideration, I think we've ended up flipping the default for the
--critical
flag which makes the system restart if the apps terminates with an error.
When you use
tools/firmware container install
you can pass
--critical
to it.
With that flag, the system process will try to recover through a restart in case an app fails due to unforeseen issues.
That used to be the default.
r
Ooh I can try that quickly, the esp would normally restart in these situations
Oh and thats actually nice for our tests on hardware, I had a problem with esp restarting when a test failed, and kept rerunning the tests 😄
k
Let me know if adding back
--critical
improves things for you, @Rikke.
r
It looks like it is working now again 🙂 ty. I added the critial flag to our building server
4 Views