-
Notifications
You must be signed in to change notification settings - Fork 135
Closed
Labels
Description
Erased device - flashing release img for S3, and booting that (eg NOT flashing own app avm) stack overflows repeatedly:
AtomVM init.
�[0;32mI (5918) sys: Loaded BEAM partition main.avm at address 0x210000 (size=1048576 bytes)�[0m
Failed app start: invalid_avm.
Starting network...
�[0;32mI (6068) network_driver: AP ssid: AtomVM-ESP32�[0m
�[0;32mI (6068) network_driver: AP authmode: 4�[0m
�[0;32mI (6068) network_driver: AP ssid_hidden: 0�[0m
�[0;32mI (6068) network_driver: AP max_connection: 4�[0m
�[0;32mI (6078) pp: pp rom version: e7ae62f�[0m
�[0;32mI (6078) net80211: net80211 rom version: e7ae62f�[0m
***ERROR*** A stack overflow in task pthread has been detected.
Backtrace: 0x40375836:0x3fcb2450 0x4037e9d9:0x3fcb2470 0x4038125a:0x3fcb2490 0x403800f6:0x3fcb2510 0x4038135c:0x3fcb2530 0x40381352:0xa5a5a5a5 |<-CORRUPTED
replicate on device:
erase and flash S3 device - say on https://petermm.github.io/atomvm-web-tools/ - connect to console and see crashing..
replicate on wokwi:
download s3 release image - go to a wokwi S3 board eg https://wokwi.com/projects/390468884528509953 - press F1 - use "Upload Firmware and Start simulation" and upload S3 image - see it crash.. (stop the sim, as it will crash loop)
Local build replication:
crash only shows up if one copies the release-defaults in and build with that
https://github.com/atomvm/AtomVM/blob/main/src/platforms/esp32/sdkconfig.release-defaults (they are copied in only on release GH builds).
CONFIG_COMPILER_OPTIMIZATION_PERF=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
Guess:
Some bug in code path for invalid_avm - that only surfaces on -O2.