firmware icon indicating copy to clipboard operation
firmware copied to clipboard

[Bug]: Shutdown fails when Tx queue is not empty

Open cracky22 opened this issue 11 months ago • 3 comments

Category

Other

Hardware

Seeed Card Tracker T1000-E

Firmware Version

v2.5.18.89ebafc

Description

meshtastic-log-2025-01-11T11-27-01.114Z.log

Relevant log output

DEBUG | 12:26:52 192 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:52 192 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:52 192 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:52 192 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:52 192 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:52 192 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:52 193 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:52 193 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:52 193 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:53 193 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:53 193 [Button] Radio wait to sleep, txEmpty=0

DEBUG | 12:26:53 193 [Button] Radio wait to sleep, txEmpty=0

ERROR | 12:26:53 193 [Button] NOTE! Record critical error 2 at src/sleep.cpp:176

ERROR | 12:26:53 193 [Button] assert failed src/sleep.cpp: 177, void waitEnterSleep(bool), te

cracky22 avatar Jan 11 '25 11:01 cracky22

I believe this is because of this:

https://github.com/meshtastic/firmware/blob/e7802d960fac813e58e6b0e8ed085d91801e5dd8/src/sleep.cpp#L171-L172

This will not work because during delay(), ArduinoThread will not call the NotifiedWorkerThread of RadioLibInterface and thus it won't reach TRANSMIT_DELAY_COMPLETED, keeping the Tx queue non-empty. We'd need to find a way to fix this.

GUVWAF avatar Jan 11 '25 12:01 GUVWAF

log from t1000e with testbuild 2.5.19.6f0ab0f60 meshtastic-log-2025-01-11T14-39-41.525Z.log

cracky22 avatar Jan 11 '25 14:01 cracky22

fixed by #7792

mverch67 avatar Sep 01 '25 13:09 mverch67