[Bug]: heltec-v4-tft boot-loops on internal heap exhaustion with a full NodeDB (2.8.3.f584291 develop)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #12457 by @thebentern — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp
- Domain
- embedded-iot, performance
Research direction
Start from the boot log's MemAudit line and the NodeDB load path that reports 250 nodes, then compare the memory budget against the crash sites: ESP32CryptoEngine.cpp:33 under CryptoEngine::decrypt, and include/util/Packet.h:41 in PacketAPI::runOnce. The test fixture test/fixtures/nodedb/seed_v25_0250.jsonl, built with bin/seed-json-to-proto.py, reproduces the full NodeDB. Done means the Heltec V4 TFT stays up through boot with that NodeDB. This needs firmware memory knowledge, so it is not a starter task.
Written by the indexing model from the issue text.
Description
Category
Other
Hardware
Other: Heltec V4 with TFT (heltec-v4-tft, ESP32-S3, 2 MB PSRAM)
UI
- Meshtastic UI aka MUI
Firmware Version
2.8.3.f584291 (develop CI build, run 44996413662, artifact firmware-esp32s3-heltec-v4-tft-2.8.3.f584291; device-ui fb3c069)
Description
With a full NodeDB (250 nodes), the device boot-loops 8–15 s after every boot because the internal heap is exhausted. The NodeDB was the 250-node test fixture (test/fixtures/nodedb/seed_v25_0250.jsonl, compiled with bin/seed-json-to-proto.py) uploaded to /prefs/nodes.proto. The device is a CLIENT on US/MEDIUM_FAST with 6 channels and Bluetooth disabled.
Boot log, the same on every boot:
Free heap: 201740
Loaded saved nodedatabase v25: 250 nodes, 217 pos, 165 tel, 57 env, 102 status
[DeviceUI] LVGL: allocating 57600 bytes PSRAM for draw buffer (max free PSRAM: 499700)
Free heap : 102544 bytes
Free PSRAM : 157652 bytes
MemAudit[boot]: msgstore=4400 warm=80000 nodedb=25000 satmaps=48045 pkthist=12048 tmm=20480 tmm_ni=248000 total=437973
Three consecutive crashes, decoded against firmware-heltec-v4-tft-2.8.3.f584291.elf from the same artifact. Each is an allocation failure:
abort()inlock_init_generic(mutex creation failed) ←esp_crypto_sha_aes_lock_acquire←esp_aes_crypt_ctr←ESP32CryptoEngine::encryptAESCtr(ESP32CryptoEngine.cpp:33) ←CryptoEngine::decrypt, while decrypting a received packet. The previous boot also loggedE esp-aes: Failed to allocate memory.LoadProhibitedinpthread_mutex_unlock←_Unwind_RaiseException←__cxa_throw←operator new←PacketAPI::runOnce(device-uiinclude/util/Packet.h:41). This isstd::bad_allocthrown while unwinding.abort()inlock_init_generic←_lock_acquire_recursive←uart_write← consolewrite← … ←esp_aes_crypt_ctr←ESP32CryptoEngine::encryptAESCtr←CryptoEngine::decrypt. esp-aes's own allocation-failure log could not create the console lock.
For comparison, the same device on 2.8.2.d5f1619 (device-ui 57c7bc6) ran for days with a full real 250-node NodeDB. It later hit a separate device-ui map-marker issue (meshtastic/device-ui#505). Rolling back to 2.8.2.d5f1619 and clearing the NodeDB restored normal operation.
Relevant log output
Backtraces as printed:
abort() was called at PC 0x40376acb on core 1
Backtrace: 0x4038181d:0x3fceb750 0x403817d9:0x3fceb770 0x40385c0a:0x3fceb790 0x40376acb:0x3fceb800 0x40376afa:0x3fceb820 0x40376c05:0x3fceb850 0x421be48d:0x3fceb870 0x421d7e73:0x3fceb890 0x421d8233:0x3fceb8b0 0x42132c32:0x3fceb8e0 0x420dc2c9:0x3fceb940 0x420dbe23:0x3fceb990 0x420f47ab:0x3fceb9b0 0x420f4ae2:0x3fcebbb0 0x420f7182:0x3fcebf50 0x420e1636:0x3fcebf90 0x420b28cf:0x3fcebfb0 0x420e2cad:0x3fcebfd0 0x4213acb0:0x3fcec050
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
EXCVADDR: 0x00000003
Backtrace: 0x421690c2:0x3fcebde0 0x4222ee52:0x3fcebe00 0x4222e24f:0x3fcebe30 0x4222e591:0x3fcebe60 0x42210aad:0x3fcebf10 0x42210b4e:0x3fcebf30 0x420faee7:0x3fcebf50 0x420fb069:0x3fcebf90 0x420b28cf:0x3fcebfb0 0x420e2cad:0x3fcebfd0 0x4213acb0:0x3fcec050
abort() was called at PC 0x40376acb on core 1
Backtrace: 0x4038181d:0x3fceb360 0x403817d9:0x3fceb380 0x40385c0a:0x3fceb3a0 0x40376acb:0x3fceb410 0x40376afa:0x3fceb430 0x40376c15:0x3fceb460 0x4216c41a:0x3fceb480 0x421710b9:0x3fceb4b0 0x4223d292:0x3fceb4d0 0x4217077d:0x3fceb4f0 0x421710b9:0x3fceb510 0x42239862:0x3fceb530 0x42238add:0x3fceb550 0x42238b2f:0x3fceb570 0x422399e2:0x3fceb590 0x4223fb5b:0x3fceb5b0 0x4223fb7a:0x3fceb5d0 0x4223fc4a:0x3fceb5f0 0x422398d9:0x3fceb6a0 0x40385a22:0x3fceb6d0 0x42251a06:0x3fceb730 0x421dd057:0x3fceb790 0x421dd0bd:0x3fceb7b0 0x421dd1e1:0x3fceb810 0x421dd201:0x3fceb840 0x421dcf7a:0x3fceb860 0x421d8264:0x3fceb8b0 0x42132c32:0x3fceb8e0 0x420dc2c9:0x3fceb940 0x420dbe23:0x3fceb990 0x420f47ab:0x3fceb9b0 0x420f4ae2:0x3fcebbb0 0x420f7182:0x3fcebf50 0x420e1636:0x3fcebf90 0x420b28cf:0x3fcebfb0 0x420e2cad:0x3fcebfd0 0x4213acb0:0x3fcec050
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 2.8k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 119
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from meshtastic/firmware
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshtastic/firmware#12519 ·
Maintainers usually reply within 1 day
-
first-contribution
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
meshtastic/firmware#12433 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: device-installer.sh closes terminal after completion so results cannot be seenPossibly taken @piyush295 claimed this 27 days ago. Openbug first-contribution triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
meshtastic/firmware#11954 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug]: Heltec Capsule Sensor v3 GPS not workingMay be free again A pull request for this issue was closed without being merged. Openbug first-contribution triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
meshtastic/firmware#9854 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
meshtastic/firmware#12520 ·
Maintainers usually reply within 1 day
All issues in meshtastic/firmware
Similar issues
-
arch-based bug niri
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
noctalia-dev/noctalia#5552 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yugabyte/yugabyte-db#39462 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days