Skip to content

Conversation

@h2zero
Copy link
Owner

@h2zero h2zero commented Feb 15, 2022

Removes looping on recursive calls to retrieve(attribute) when the attribute UUID is not found and conversions attempted.

@h2zero h2zero mentioned this pull request Feb 15, 2022
@DTTerastar
Copy link

This has massively fixed my uptimes so far!

@h2zero
Copy link
Owner Author

h2zero commented Feb 15, 2022

Great, I'll issue a release tomorrow if there are no further issues.

@DTTerastar
Copy link

At 1:19a I got this:

E (2927762) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (2927762) task_wdt:  - IDLE0 (CPU 0)
E (2927762) task_wdt: Tasks currently running:
E (2927762) task_wdt: CPU 0: BLE Scan
E (2927762) task_wdt: CPU 1: IDLE1
E (2927762) task_wdt: Aborting.
abort() was called at PC 0x4018ae2c on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x4008f658:0x3ffbfee0 0x4008f8d5:0x3ffbff00 0x4018ae2c:0x3ffbff20 0x4008dd01:0x3ffbff40 0x4008d6dd:0x3ffde0a0 0x40091a59:0x3ffde0b0 0x40093c4f:0x3ffde0d0 0x400943b6:0x3ffde0f0 0x40081dd1:0x3ffde110 0x40081e02:0x3ffde130 0x40086bc9:0x3ffde150 0x4000beaf:0x3ffde170 0x401a9a4f:0x3ffde190 0x400f6aeb:0x3ffde1b0 0x400d7299:0x3ffde1d0 0x400908e6:0x3ffde250
  #0  0x4008f658:0x3ffbfee0 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #1  0x4008f8d5:0x3ffbff00 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #2  0x4018ae2c:0x3ffbff20 in task_wdt_isr at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c:252
  #3  0x4008dd01:0x3ffbff40 in _xt_lowint1 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154
  #4  0x4008d6dd:0x3ffde0a0 in r_rwbtdm_isr_wrapper at intc.c:?
  #5  0x40091a59:0x3ffde0b0 in vTaskExitCritical at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:4813
  #6  0x40093c4f:0x3ffde0d0 in multi_heap_internal_unlock at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap.c:380
  #7  0x400943b6:0x3ffde0f0 in multi_heap_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
  #8  0x40081dd1:0x3ffde110 in heap_caps_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:232
  #9  0x40081e02:0x3ffde130 in heap_caps_malloc_default at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:232
  #10 0x40086bc9:0x3ffde150 in _malloc_r at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:37
  #11 0x4000beaf:0x3ffde170 in ?? ??:0
  #12 0x401a9a4f:0x3ffde190 in operator new(unsigned int) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/new_op.cc:50
  #13 0x400f6aeb:0x3ffde1b0 in __gnu_cxx::new_allocator<std::_List_node<BleFingerprint*> >::allocate(unsigned int, void const*) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/ext/new_allocator.h:104
      (inlined by) std::__cxx11::_List_base<BleFingerprint*, std::allocator<BleFingerprint*> >::_M_get_node() at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:392
      (inlined by) std::_List_node<BleFingerprint*>* std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::_M_create_node<BleFingerprint* const&>(BleFingerprint* const&) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:571
      (inlined by) void std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::_M_insert<BleFingerprint* const&>(std::_List_iterator<BleFingerprint*>, BleFingerprint* const&) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:1763
      (inlined by) void std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::emplace_back<BleFingerprint* const&>(BleFingerprint* const&) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:1099
      (inlined by) void std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::_M_initialize_dispatch<std::_List_const_iterator<BleFingerprint*> >(std::_List_const_iterator<BleFingerprint*>, std::_List_const_iterator<BleFingerprint*>, std::__false_type) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:1692
      (inlined by) std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::list(std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> > const&) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:657
      (inlined by) BleFingerprintCollection::getCopy[abi:cxx11]() at lib/BleFingerprint/BleFingerprintCollection.cpp:63
  #14 0x400d7299:0x3ffde1d0 in scanForDevices(void*) at .pio/libdeps/esp32/ArduinoJson/src/ArduinoJson/Misc/SafeBoolIdiom.hpp:15
  #15 0x400908e6:0x3ffde250 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

2:30

abort() was called at PC 0x4018ae2c on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x4008f658:0x3ffbfee0 0x4008f8d5:0x3ffbff00 0x4018ae2c:0x3ffbff20 0x4008dd01:0x3ffbff40 0x4000bfed:0x3ffde090 0x40091a59:0x3ffde0a0 0x40093c4f:0x3ffde0c0 0x400943b6:0x3ffde0e0 0x40081dd1:0x3ffde100 0x40081e02:0x3ffde120 0x40086bc9:0x3ffde140 0x4000beaf:0x3ffde160 0x401a9a4f:0x3ffde180 0x400f6aeb:0x3ffde1a0 0x400d7299:0x3ffde1c0 0x400908e6:0x3ffde240
  #0  0x4008f658:0x3ffbfee0 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #1  0x4008f8d5:0x3ffbff00 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #2  0x4018ae2c:0x3ffbff20 in task_wdt_isr at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c:252
  #3  0x4008dd01:0x3ffbff40 in _xt_lowint1 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154
  #4  0x4000bfed:0x3ffde090 in ?? ??:0
  #5  0x40091a59:0x3ffde0a0 in vTaskExitCritical at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:4813
  #6  0x40093c4f:0x3ffde0c0 in multi_heap_internal_unlock at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap.c:380
  #7  0x400943b6:0x3ffde0e0 in multi_heap_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
  #8  0x40081dd1:0x3ffde100 in heap_caps_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:232
  #9  0x40081e02:0x3ffde120 in heap_caps_malloc_default at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:232
  #10 0x40086bc9:0x3ffde140 in _malloc_r at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:37
  #11 0x4000beaf:0x3ffde160 in ?? ??:0
  #12 0x401a9a4f:0x3ffde180 in operator new(unsigned int) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/new_op.cc:50
  #13 0x400f6aeb:0x3ffde1a0 in __gnu_cxx::new_allocator<std::_List_node<BleFingerprint*> >::allocate(unsigned int, void const*) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/ext/new_allocator.h:104
      (inlined by) std::__cxx11::_List_base<BleFingerprint*, std::allocator<BleFingerprint*> >::_M_get_node() at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:392
      (inlined by) std::_List_node<BleFingerprint*>* std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::_M_create_node<BleFingerprint* const&>(BleFingerprint* const&) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:571
      (inlined by) void std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::_M_insert<BleFingerprint* const&>(std::_List_iterator<BleFingerprint*>, BleFingerprint* const&) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:1763
      (inlined by) void std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::emplace_back<BleFingerprint* const&>(BleFingerprint* const&) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:1099
      (inlined by) void std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::_M_initialize_dispatch<std::_List_const_iterator<BleFingerprint*> >(std::_List_const_iterator<BleFingerprint*>, std::_List_const_iterator<BleFingerprint*>, std::__false_type) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:1692
      (inlined by) std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> >::list(std::__cxx11::list<BleFingerprint*, std::allocator<BleFingerprint*> > const&) at /Users/dturner/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_list.h:657
      (inlined by) BleFingerprintCollection::getCopy[abi:cxx11]() at lib/BleFingerprint/BleFingerprintCollection.cpp:63
  #14 0x400d7299:0x3ffde1c0 in scanForDevices(void*) at .pio/libdeps/esp32/ArduinoJson/src/ArduinoJson/Misc/SafeBoolIdiom.hpp:15
  #15 0x400908e6:0x3ffde240 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...

3am:

E (11295) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (11295) task_wdt:  - IDLE0 (CPU 0)
E (11295) task_wdt: Tasks currently running:
E (11295) task_wdt: CPU 0: btController
E (11295) task_wdt: CPU 1: IDLE1
E (11295) task_wdt: Aborting.
abort() was called at PC 0x4018ae2c on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x4008f658:0x3ffbfee0 0x4008f8d5:0x3ffbff00 0x4018ae2c:0x3ffbff20 0x4008dd01:0x3ffbff40 0x4000bfed:0x3ffb5f20 0x40091a59:0x3ffb5f30 0x40084223:0x3ffb5f50 0x401872a9:0x3ffb5f70 0x4018738c:0x3ffb5f90 0x4018c199:0x3ffb5fc0 0x4018c259:0x3ffb5ff0 0x4013e7c7:0x3ffb6020 0x40191a0e:0x3ffb6040 0x400908e6:0x3ffb6070
  #0  0x4008f658:0x3ffbfee0 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #1  0x4008f8d5:0x3ffbff00 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #2  0x4018ae2c:0x3ffbff20 in task_wdt_isr at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c:252
  #3  0x4008dd01:0x3ffbff40 in _xt_lowint1 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154
  #4  0x4000bfed:0x3ffb5f20 in ?? ??:0
  #5  0x40091a59:0x3ffb5f30 in vTaskExitCritical at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:4813
  #6  0x40084223:0x3ffb5f50 in phy_exit_critical at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/phy_init.c:524
  #7  0x401872a9:0x3ffb5f70 in phy_wakeup_init at /home/cff/gittree/chip7.1_phy/chip_7.1/board_code/app_test/pp/phy/phy_chip_v7.c:4173
  #8  0x4018738c:0x3ffb5f90 in register_chipv7_phy at /home/cff/gittree/chip7.1_phy/chip_7.1/board_code/app_test/pp/phy/phy_chip_v7.c:4173
  #9  0x4018c199:0x3ffb5fc0 in esp_phy_rf_init at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/phy_init.c:524
  #10 0x4018c259:0x3ffb5ff0 in esp_modem_sleep_exit at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/phy_init.c:524
  #11 0x4013e7c7:0x3ffb6020 in btdm_sleep_exit_phase3_wrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bt.c:1707
  #12 0x40191a0e:0x3ffb6040 in btdm_controller_task at ??:?
  #13 0x400908e6:0x3ffb6070 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...

4a:

E (8111) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (8111) task_wdt:  - IDLE0 (CPU 0)
E (8111) task_wdt: Tasks currently running:
E (8111) task_wdt: CPU 0: wifi
E (8111) task_wdt: CPU 1: IDLE1
E (8111) task_wdt: Aborting.
abort() was called at PC 0x4018ae2c on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x4008f658:0x3ffbfee0 0x4008f8d5:0x3ffbff00 0x4018ae2c:0x3ffbff20 0x4008dd01:0x3ffbff40 0x4013d407:0x3ffd3e40 0x4013918a:0x3ffd3ec0 0x400908e6:0x3ffd3ef0
  #0  0x4008f658:0x3ffbfee0 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #1  0x4008f8d5:0x3ffbff00 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #2  0x4018ae2c:0x3ffbff20 in task_wdt_isr at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c:252
  #3  0x4008dd01:0x3ffbff40 in _xt_lowint1 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154
  #4  0x4013d407:0x3ffd3e40 in wdevProcessRxSucDataAll at ??:?
  #5  0x4013918a:0x3ffd3ec0 in ppTask at ??:?
  #6  0x400908e6:0x3ffd3ef0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...

So it does fix this issue, but there are still other issues

@DTTerastar
Copy link

Great, I'll issue a release tomorrow if there are no further issues.

Are you going to do this still?

@h2zero
Copy link
Owner Author

h2zero commented Feb 16, 2022

Yes, it should be done in about an hour.

@h2zero
Copy link
Owner Author

h2zero commented Feb 16, 2022

The watchdog issues I'm unsure of, maybe you need to add a short delay or yield somewhere in your "BLE scan" task.

@h2zero h2zero merged commit 658339b into master Feb 16, 2022
@h2zero h2zero deleted the remove-att-fetch-recursion branch February 16, 2022 01:49
DTTerastar pushed a commit to ESPresense/NimBLE-Arduino that referenced this pull request Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants