Skip to content
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

[SparkleMotionMini] Having too many classes of things enabled as board comes online causes reboot #687

Open
tyeth opened this issue Jan 26, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tyeth
Copy link
Contributor

tyeth commented Jan 26, 2025

Seems like there is some conflict, but think it worked as a NeoPixel while board was already online. Needs retesting

Testing:

Not found to affect a second board with no external components plugged in, but external neopixel pins active and onboard neopixel active, and rebooted.

Second device has 256 pixels on D32, the onboard pixel set to white (and other onboard components added), plus a SEN66 I2C sensor which has a lot of subcomponents (9).

Summary

It looks like there is too deeper stack or too many unfinished MQTT transactions, via the exception decoder (using the release elf file which is included for littleFS builds):

https://gist.github.com/tyeth/cb44cd253df74d6beb92def689cb58e2

Just looking at the publish and decodes, we're clearly still waiting for the publish acknowldegement from the initial pinSetupComplete, but instead of waiting for that we have processed subscriptions for the next stages (component init/add)

Details

Output:

  • 0x40150f44: mbedtls_ssl_write_record at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:3040
  • 0x40150f57: mbedtls_ssl_write_record at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:3048
  • 0x40092812: vPortExitCriticalSafe at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:596
  • 0x40092812: multi_heap_internal_unlock at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap.c:171
  • 0x400929b8: multi_heap_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:265
  • 0x400929b8: multi_heap_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:243
  • 0x40083c7c: aligned_or_unaligned_alloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps_base.c:77
  • 0x40083c7c: heap_caps_aligned_alloc_base at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps_base.c:150
  • 0x40083c9d: heap_caps_malloc_base at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps_base.c:170
  • 0x40083925: heap_caps_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:84
  • 0x40083953: heap_caps_malloc_default at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:110
  • 0x40093c55: malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/heap.c:24
  • 0x4011d224: mem_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/mem.c:209
  • 0x4011e549: pbuf_alloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/pbuf.c:284
  • 0x40122a0a: tcp_pbuf_prealloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/tcp_out.c:263
  • 0x40122a0a: tcp_write at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/tcp_out.c:610
  • 0x4012efa9: lwip_netconn_do_writemore at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_msg.c:1794
  • 0x4012fcd0: lwip_netconn_do_write at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_msg.c:1913
  • 0x4011c158: tcpip_send_msg_wait_sem at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/tcpip.c:442
  • 0x4012e565: netconn_apimsg at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_lib.c:134
  • 0x4012e84d: netconn_write_vectors_partly at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_lib.c:1067
  • 0x4012e89d: netconn_write_partly at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_lib.c:983
  • 0x4011aff8: lwip_send at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/sockets.c:1418
  • 0x4011b0ce: lwip_write at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/sockets.c:1754
  • 0x4011921d: esp_vfs_write at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/vfs/vfs.c:502
  • 0x401575c9: mbedtls_net_send at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mbedtls/port/net_sockets.c:424
  • 0x40150c35: mbedtls_ssl_flush_output at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:2372
  • 0x40150f8e: mbedtls_ssl_write_record at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:3075
  • 0x4015180a: ssl_write_real at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:6037
  • 0x4015180a: mbedtls_ssl_write at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:6073
  • 0x400fe834: send_ssl_data(sslclient_context*, unsigned char const*, unsigned int) at /home/runner/Arduino/hardware/espressif/esp32/libraries/NetworkClientSecure/src/ssl_client.cpp:415
  • 0x400fdaf5: NetworkClientSecure::write(unsigned char const*, unsigned int) at /home/runner/Arduino/hardware/espressif/esp32/libraries/NetworkClientSecure/src/NetworkClientSecure.cpp:242
  • 0x400fdaf5: NetworkClientSecure::write(unsigned char const*, unsigned int) at /home/runner/Arduino/hardware/espressif/esp32/libraries/NetworkClientSecure/src/NetworkClientSecure.cpp:225
  • 0x401aea6e: Adafruit_MQTT_Client::sendPacket(unsigned char*, unsigned short) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT_Client.cpp:93
  • 0x400e0b85: Adafruit_MQTT::publish(char const*, unsigned char*, unsigned short, unsigned char, bool) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:377
  • 0x400d43b2: publishI2CResponse(_wippersnapper_signal_v1_I2CResponse*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:561
  • 0x400d557e: cbDecodeI2CDeviceInitRequestList(pb_istream_s*, pb_field_iter_s const*, void**) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:649
  • 0x401ae73f: pb_default_field_callback at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_common.c:315
  • 0x400ddff5: decode_callback_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:767
  • 0x400ddff5: decode_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:818
  • 0x400de3b0: pb_decode_inner at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1109
  • 0x400de416: pb_decode at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1185
  • 0x400dec0e: ws_pb_decode(pb_istream_s*, pb_msgdesc_s const*, void*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/ws_pb_helpers.cpp:33
  • 0x400d56e8: cbDecodeSignalRequestI2C(pb_istream_s*, pb_field_iter_s const*, void**) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:754
  • 0x400dddcb: pb_dec_submessage at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1607
  • 0x400dddcb: decode_basic_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:453
  • 0x400ddea1: decode_static_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:549
  • 0x400ddea1: decode_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:812
  • 0x400de3b0: pb_decode_inner at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1109
  • 0x400de416: pb_decode at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1185
  • 0x400dec0e: ws_pb_decode(pb_istream_s*, pb_msgdesc_s const*, void*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/ws_pb_helpers.cpp:33
  • 0x400d37a6: cbSignalI2CReq(char*, unsigned short) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:912
  • 0x400e06b9: Adafruit_MQTT::processSubscriptionPacket(Adafruit_MQTT_Subscribe*) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:236
  • 0x400e08a6: Adafruit_MQTT::processPacketsUntil(unsigned char*, unsigned char, unsigned short) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:268
  • 0x400e0ba1: Adafruit_MQTT::publish(char const*, unsigned char*, unsigned short, unsigned char, bool) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:382
  • 0x400dc6aa: ws_pixels::publishAddStrandResponse(bool, char*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/components/pixels/ws_pixels.cpp:185
  • 0x400dc816: ws_pixels::addStrand(_wippersnapper_pixels_v1_PixelsCreateRequest*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/components/pixels/ws_pixels.cpp:317
  • 0x400d3eac: cbDecodePixelsMsg(pb_istream_s*, pb_field_iter_s const*, void**) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:1433
  • 0x400dddcb: pb_dec_submessage at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1607
  • 0x400dddcb: decode_basic_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:453
  • 0x400ddea1: decode_static_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:549
  • 0x400ddea1: decode_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:812
  • 0x400de3b0: pb_decode_inner at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1109
  • 0x400de416: pb_decode at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1185
  • 0x400dec0e: ws_pb_decode(pb_istream_s*, pb_msgdesc_s const*, void*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/ws_pb_helpers.cpp:33
  • 0x400d3976: cbPixelsMsg(char*, unsigned short) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:1504
  • 0x400e06b9: Adafruit_MQTT::processSubscriptionPacket(Adafruit_MQTT_Subscribe*) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:236
  • 0x400e08a6: Adafruit_MQTT::processPacketsUntil(unsigned char*, unsigned char, unsigned short) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:268
  • 0x400e0ba1: Adafruit_MQTT::publish(char const*, unsigned char*, unsigned short, unsigned char, bool) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:382
  • 0x400dc6aa: ws_pixels::publishAddStrandResponse(bool, char*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/components/pixels/ws_pixels.cpp:185
  • 0x400dc816: ws_pixels::addStrand(_wippersnapper_pixels_v1_PixelsCreateRequest*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/components/pixels/ws_pixels.cpp:317
  • 0x400d3eac: cbDecodePixelsMsg(pb_istream_s*, pb_field_iter_s const*, void**) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:1433
  • 0x400dddcb: pb_dec_submessage at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1607
  • 0x400dddcb: decode_basic_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:453
  • 0x400ddea1: decode_static_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:549
  • 0x400ddea1: decode_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:812
  • 0x400de3b0: pb_decode_inner at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1109
  • 0x400de416: pb_decode at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1185
  • 0x400dec0e: ws_pb_decode(pb_istream_s*, pb_msgdesc_s const*, void*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/ws_pb_helpers.cpp:33
  • 0x400d3976: cbPixelsMsg(char*, unsigned short) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:1504
  • 0x400e06b9: Adafruit_MQTT::processSubscriptionPacket(Adafruit_MQTT_Subscribe*) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:236
  • 0x400e08a6: Adafruit_MQTT::processPacketsUntil(unsigned char*, unsigned char, unsigned short) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:268
  • 0x400e0ba1: Adafruit_MQTT::publish(char const*, unsigned char*, unsigned short, unsigned char, bool) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:382
  • 0x400dc6aa: ws_pixels::publishAddStrandResponse(bool, char*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/components/pixels/ws_pixels.cpp:185
  • 0x400dc816: ws_pixels::addStrand(_wippersnapper_pixels_v1_PixelsCreateRequest*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/components/pixels/ws_pixels.cpp:317
  • 0x400d3eac: cbDecodePixelsMsg(pb_istream_s*, pb_field_iter_s const*, void**) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:1433
  • 0x400dddcb: pb_dec_submessage at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1607
  • 0x400dddcb: decode_basic_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:453
  • 0x400ddea1: decode_static_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:549
  • 0x400ddea1: decode_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:812
  • 0x400de3b0: pb_decode_inner at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1109
  • 0x400de416: pb_decode at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1185
  • 0x400dec0e: ws_pb_decode(pb_istream_s*, pb_msgdesc_s const*, void*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/ws_pb_helpers.cpp:33
  • 0x400d3976: cbPixelsMsg(char*, unsigned short) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:1504
  • 0x400e06b9: Adafruit_MQTT::processSubscriptionPacket(Adafruit_MQTT_Subscribe*) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:236
  • 0x400e08a6: Adafruit_MQTT::processPacketsUntil(unsigned char*, unsigned char, unsigned short) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:268
  • 0x400e0ba1: Adafruit_MQTT::publish(char const*, unsigned char*, unsigned short, unsigned char, bool) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:382
  • 0x400d3cbc: cbPWMDecodeMsg(pb_istream_s*, pb_field_iter_s const*, void**) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:1164
  • 0x400dddcb: pb_dec_submessage at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1607
  • 0x400dddcb: decode_basic_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:453
  • 0x400ddea1: decode_static_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:549
  • 0x400ddea1: decode_field at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:812
  • 0x400de3b0: pb_decode_inner at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1109
  • 0x400de416: pb_decode at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/pb_decode.c:1185
  • 0x400dec0e: ws_pb_decode(pb_istream_s*, pb_msgdesc_s const*, void*) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/nanopb/ws_pb_helpers.cpp:33
  • 0x400d388e: cbPWMMsg(char*, unsigned short) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:1301
  • 0x400e06b9: Adafruit_MQTT::processSubscriptionPacket(Adafruit_MQTT_Subscribe*) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:236
  • 0x400e08a6: Adafruit_MQTT::processPacketsUntil(unsigned char*, unsigned char, unsigned short) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:268
  • 0x400e0ba1: Adafruit_MQTT::publish(char const*, unsigned char*, unsigned short, unsigned char, bool) at /home/runner/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp:382
  • 0x400d4fa4: Wippersnapper::publish(char const*, unsigned char*, unsigned short, unsigned char) at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:2661
  • 0x400d51c5: Wippersnapper::publishPinConfigComplete() at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:2864
  • 0x400d5deb: Wippersnapper::connect() at /home/runner/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper.cpp:2826
  • 0x400d355a: setup() at /home/runner/work/Adafruit_Wippersnapper_Arduino/Adafruit_Wippersnapper_Arduino/examples/Wippersnapper_demo/Wippersnapper_demo.ino:29
  • 0x40103feb: loopTask(void*) at /home/runner/Arduino/hardware/espressif/esp32/cores/esp32/main.cpp:59
  • 0x4008e3ae: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:139

@tyeth tyeth changed the title [SparkleMotionMini] Onboard Neopixel being enabled as board comes online causes reboot [SparkleMotionMini] Having too many classes of things enabled as board comes online causes reboot Jan 27, 2025
@tyeth
Copy link
Contributor Author

tyeth commented Jan 27, 2025

Been seeing a lot of publish failed messages recently so added logging on all of them, along with migrating to use the wipper publish function, and printing stack/heap info. On this branch: https://github.com/tyeth/Adafruit_Wippersnapper_Arduino/tree/publish-returns-bool

Suddenly drops off in stack size towards the end:

Log With Stack/Heap info:

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4688
load:0x40078000,len:15460
ho 0 tail 12 room 4
load:0x40080400,len:4
load:0x40080404,len:3196
entry 0x400805a4
Adafruit.io WipperSnapper
-------Device Information-------
Firmware Version: 1.0.0-beta.97
Board ID: sparklemotionmini-esp32
Adafruit.io User: tyeth_staging_admin
WiFi Network: free4all
MAC Address: 30:C9:22:7A:46:28

ESP32 CPU0 RESET REASON: NO_MEAN
ESP32 CPU1 RESET REASON: POWERON_RESET
Generating device's MQTT topics...
Running Network FSM...
E (54) task_wdt: esp_task_wdt_reset(705): task not found
Establishing network connection...
Performing a WiFi scan for SSID...WipperSnapper found these WiFi networks:
free4all (28:F5:D1:EF:10:12) -65dB (ch11)
free4all (6C:63:9C:23:A3:AB) -75dB (ch1)
free4all (10:7C:61:82:50:F0) -82dB (ch7)
Tenda_60C06C (4:95:E6:60:C0:6F) -86dB (ch7)
Shaun (48:D3:43:A2:44:81) -88dB (ch6)
TALKTALKB8C4F9 (10:D7:B0:B8:C4:F6) -89dB (ch1)
E (3858) task_wdt: esp_task_wdt_reset(705): task not found
Connecting to WiFi (attempt #0)
E (3866) task_wdt: esp_task_wdt_reset(705): task not found
E (4487) task_wdt: esp_task_wdt_reset(705): task not found
E (9487) task_wdt: esp_task_wdt_reset(705): task not found
E (9487) task_wdt: esp_task_wdt_reset(705): task not found
Connected to WiFi!
Connecting to AIO MQTT (attempt #0)
WiFi Status: 20
E (9503) task_wdt: esp_task_wdt_reset(705): task not found
E (10104) task_wdt: esp_task_wdt_reset(705): task not found
E (13522) task_wdt: esp_task_wdt_reset(705): task not found
E (13522) task_wdt: delete_entry(236): task not found
Registering hardware with WipperSnapper...
Registering hardware with IO...
Encoding registration request...Encoding registration msg...
Free Heap: 175676
Min Free Heap: 163116
Max Alloc Heap: 110580
Heap Size: 320672
Free Stack: 4304
Published! (Registration)
Polling for registration message response...2
GOT Registration Response Message:
Hardware Response Msg:
GPIO Pins: 12
Analog Pins: 7
Reference voltage: 3.30v

Free Heap: 173388
Min Free Heap: 163116
Max Alloc Heap: 110580
Heap Size: 320672
Free Stack: 4304
Completed registration process, configuration next!
Polling for message containing hardware configuration...
Polling for message containing hardware configuration...
Polling for message containing hardware configuration...
cbSignalTopic: New Msg on Signal Topic
16 bytes.
decodeSignalMsg
cbSignalMsg
Sub-messages found: 1
Signal Msg Tag: Pin Configuration
cbDecodePinConfigMsg
Configuring digital input pin on D0with internal pull-up enabled
Interval (ms):0
Initial Pin Configuration Complete!
Publishing to pin config complete...

Free Heap: 173128
Min Free Heap: 163116
Max Alloc Heap: 110580
Heap Size: 320672
Free Stack: 4304

  • NEW MESSAGE [Topic: PWM]:
    12 bytes.
    Decoding PWM Message...
    GOT: PWM Pin Attach
    PUBLISHING: PWM Attach Response...
    Free Heap: 169768
    Min Free Heap: 163116
    Max Alloc Heap: 110580
    Heap Size: 320672
    Free Stack: 4304
  • NEW MESSAGE [Topic: PWM]:
    7 bytes.
    Decoding PWM Message...
    GOT: PWM Write Duty Cycle
  • NEW MESSAGE [Topic: Pixels]:
    16 bytes.
    [Message Type]: wippersnapper_signal_v1_PixelsRequest_req_pixels_create_tag
    Created NeoPixel strand of length 256 on GPIO #D32
    -> wippersnapper_signal_v1_PixelsResponse...
    Free Heap: 139712
    Min Free Heap: 135200
    Max Alloc Heap: 86004
    Heap Size: 320672
    Free Stack: 4304
  • NEW MESSAGE [Topic: Pixels]:
    13 bytes.
    [Message Type]: wippersnapper_signal_v1_PixelsRequest_req_pixels_write_tag
    Filling color: 30464
  • NEW MESSAGE [Topic: Pixels]:
    16 bytes.
    [Message Type]: wippersnapper_signal_v1_PixelsRequest_req_pixels_create_tag
    Created NeoPixel strand of length 256 on GPIO #D33
    -> wippersnapper_signal_v1_PixelsResponse...
    Free Heap: 138588
    Min Free Heap: 130568
    Max Alloc Heap: 86004
    Heap Size: 320672
    Free Stack: 4304
  • NEW MESSAGE [Topic: Pixels]:
    9 bytes.
    [Message Type]: wippersnapper_signal_v1_PixelsRequest_req_pixels_write_tag
    Filling color: 0
  • NEW MESSAGE [Topic: Pixels]:
    16 bytes.
    [Message Type]: wippersnapper_signal_v1_PixelsRequest_req_pixels_create_tag
    Created NeoPixel strand of length 1 on GPIO #D18
    -> wippersnapper_signal_v1_PixelsResponse...
    Free Heap: 138760
    Min Free Heap: 130568
    Max Alloc Heap: 86004
    Heap Size: 320672
    Free Stack: 3516
  • NEW MESSAGE [Topic: Signal-I2C]:
    78 bytes.
    cbDecodeSignalRequestI2C
    I2C Device LIST Init Request Found!
    EXEC: cbDecodeI2CDeviceInitRequestList
    EXEC: New I2C Port
    Port #: 0
    SDA Pin: 19
    SCL Pin: 22
    Frequency (Hz): 100000
    Attempting to initialize I2C device: sen66
    SEN6X Initialized Successfully!
    Publishing Message: I2CResponse...
    Free Heap: 146024
    Min Free Heap: 130568
    Max Alloc Heap: 86004
    Heap Size: 320672
    Free Stack: 300
    Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception).
    Debug exception reason: Stack canary watchpoint triggered (loopTask)
    Core 1 register dump:
    PC : 0x400958a7 PS : 0x00060836 A0 : 0x4009592e A1 : 0x3ffb02b0
    A2 : 0x3ffb0320 A3 : 0x3ff6ceb4 A4 : 0x00001800 A5 : 0x00060820
    A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80083c7f A9 : 0x3ffb0350
    A10 : 0x00000000 A11 : 0x000005f8 A12 : 0x00000004 A13 : 0x00000004
    A14 : 0x000005f8 A15 : 0x3ffb8000 SAR : 0x00000019 EXCCAUSE: 0x00000001
    EXCVADDR: 0x0006083c LBEG : 0x40151134 LEND : 0x40151147 LCOUNT : 0x00000006

Backtrace: 0x400958a4:0x3ffb02b0 0x4009592b:0x3ffb03a0 0x40083925:0x3ffb03c0 0x40083953:0x3ffb03e0 0x40093c7d:0x3ffb0400 0x4011d414:0x3ffb0420 0x4011e739:0x3ffb0440 0x40122bfa:0x3ffb0460 0x4012f199:0x3ffb04a0 0x4012fec0:0x3ffb04d0 0x4011c348:0x3ffb04f0 0x4012e755:0x3ffb0510 0x4012ea3d:0x3ffb0530 0x4012ea8d:0x3ffb0580 0x4011b1e8:0x3ffb05b0 0x4011b2be:0x3ffb05e0 0x4011940d:0x3ffb0600 0x4000bd83:0x3ffb0620 0x4000182a:0x3ffb0640 0x401577b9:0x3ffb0660 0x40150e25:0x3ffb0680 0x4015117e:0x3ffb06a0 0x401519fa:0x3ffb06e0 0x400fe98c:0x3ffb0700 0x400fdc4d:0x3ffb0720 0x401aec72:0x3ffb0750 0x400e0cdd:0x3ffb0770 0x400d4aeb:0x3ffb07a0 0x400d4b86:0x3ffb07c0 0x400d56b6:0x3ffb07f0 0x401ae943:0x3ffb0ab0 0x400de14d:0x3ffb0ad0 0x400de508:0x3ffb0b30 0x400de56e:0x3ffb0be0 0x400ded66:0x3ffb0c00 0x400d5824:0x3ffb0c20 0x400ddf23:0x3ffb12d0 0x400ddff9:0x3ffb1310 0x400de508:0x3ffb1370 0x400de56e:0x3ffb1420 0x400ded66:0x3ffb1440 0x400d3806:0x3ffb1460 0x400e0811:0x3ffb1490 0x400e09fe:0x3ffb14b0 0x400e0cf9:0x3ffb14d0 0x400d4aeb:0x3ffb1500 0x400dc7f1:0x3ffb1520 0x400dc962:0x3ffb1570 0x400d3b3c:0x3ffb15a0 0x400ddf23:0x3ffb15f0 0x400ddff9:0x3ffb1630 0x400de508:0x3ffb1690 0x400de56e:0x3ffb1740 0x400ded66:0x3ffb1760 0x400d39d6:0x3ffb1780 0x400e0811:0x3ffb17b0 0x400e09fe:0x3ffb17d0 0x400e0cf9:0x3ffb17f0 0x400d4aeb:0x3ffb1820 0x400dc7f1:0x3ffb1840 0x400dc962:0x3ffb1890 0x400d3b3c:0x3ffb18c0 0x400ddf23:0x3ffb1910 0x400ddff9:0x3ffb1950 0x400de508:0x3ffb19b0 0x400de56e:0x3ffb1a60 0x400ded66:0x3ffb1a80 0x400d39d6:0x3ffb1aa0 0x400e0811:0x3ffb1ad0 0x400e09fe:0x3ffb1af0 0x400e0cf9:0x3ffb1b10 0x400d4aeb:0x3ffb1b40 0x400dc7f1:0x3ffb1b60 0x400dc962:0x3ffb1bb0 0x400d3b3c:0x3ffb1be0 0x400ddf23:0x3ffb1c30 0x400ddff9:0x3ffb1c70 0x400de508:0x3ffb1cd0 0x400de56e:0x3ffb1d80 0x400ded66:0x3ffb1da0 0x400d39d6:0x3ffb1dc0 0x400e0811:0x3ffb1df0 0x400e09fe:0x3ffb1e10 0x400e0cf9:0x3ffb1e30 0x400d4aeb:0x3ffb1e60 0x400d4e55:0x3ffb1e80 0x400ddf23:0x3ffb1ee0 0x400ddff9:0x3ffb1f20 0x400de508:0x3ffb1f80 0x400de56e:0x3ffb2030 0x400ded66:0x3ffb2050 0x400d38ee:0x3ffb2070 0x400e0811:0x3ffb20a0 0x400e09fe:0x3ffb20c0 0x400e0cf9:0x3ffb20e0 0x400d4aeb:0x3ffb2110 0x400d52ea:0x3ffb2130 0x400d5f27:0x3ffb2200 0x400d35ba:0x3ffb2240 0x401041af:0x3ffb2270 0x4008e3ae:0x3ffb2290

ELF file SHA256: b14ecb1ec

@tyeth
Copy link
Contributor Author

tyeth commented Jan 27, 2025

@brentru not much further, the stack does get exhausted, but doesn't get consumed with regularity (or as I'd expect).
My only other thought was to actually wrap all the callbacks for mqtt subscriptions in some callback wrapping helper, and the wrapper has a mutex we can lock on when waiting for a specific message and not desiring to process other packets (just drop/ignore/don't-ack).

@brentru brentru self-assigned this Jan 27, 2025
@brentru brentru added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants