firmware icon indicating copy to clipboard operation
firmware copied to clipboard

[Bug]: t-lora pager and meshpocket hangs for all chat deletion

Open mesb1 opened this issue 5 months ago • 5 comments

Category

Other

Hardware

Other

Is this bug report about any UI (https://meshtastic.org/docs/configuration/device-uis/) component firmware?

  • [ ] Meshtastic UI aka MUI
  • [ ] InkHUD
  • [x] BaseUI

Firmware Version

2.7.26

Description

It seems device hangs while using option from UI Delete Messages - Delete All Chats.

Relevant log output


mesb1 avatar Jul 01 '26 18:07 mesb1

Same here for meshpocket w baseui(

mesb1 avatar Jul 01 '26 20:07 mesb1

Checked on my TLora Pager - backtrace after leaving it for approximately 2 minutes.

E (166206) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (166206) task_wdt: - loopTask (CPU 1) E (166206) task_wdt: Tasks currently running: E (166206) task_wdt: CPU 0: IDLE0 E (166206) task_wdt: CPU 1: IDLE1 E (166206) task_wdt: Aborting.

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

Backtrace: 0x40377eca:0x3fc9cba0 0x40381935:0x3fc9cbc0 0x40388f69:0x3fc9cbe0 0x420cfb20:0x3fc9cc60 0x4037a011:0x3fc9cc80 0x42191e93:0x3fcf6c00 0x420cf8ad:0x3fcf6c20 0x40382fb0:0x3fcf6c40

ELF file SHA256: d83ee2aab46ebfce

Rebooting... ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT) Saved PC:0x40377b00 SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3808,len:0x4bc load:0x403c9700,len:0xbd8 load:0x403cc700,len:0x2a0c entry 0x403c98d0 [ 1328][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled [ 1339][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=3 scl=2 freq=100000

Xaositek avatar Jul 02 '26 21:07 Xaositek

I found the culprit. PR https://github.com/meshtastic/firmware/pull/10728 broke it by adding an outer spiLock in MessageStore::clearAllMessages(), then constructing SafeFile while that lock was still held. SafeFile already takes spiLock internally, so Delete All Messages tried to acquire the same non-recursive lock twice and hung the node.

#10809 fixed it by changing the lock order: it constructs SafeFile first, then only takes spiLock around the actual write. That avoids the nested lock and lets the delete complete normally.

So the fix already exist on Develop branch and hopefully can be released soon. To avoid hang, reverting to 2.7.25 would get rid of the issue for now.

HarukiToreda avatar Jul 03 '26 05:07 HarukiToreda

Same behaviour here with heltec v4

Remolade01 avatar Jul 05 '26 14:07 Remolade01

fixed with https://github.com/meshtastic/firmware/pull/10809

caveman99 avatar Jul 05 '26 21:07 caveman99