fix(Telemetry,HealthMonitor): bump task stacks to fix reboot-every-10min crash
TelemetryTask (4096B) overflowed its stack canary because flushRuntimeToSD() nests ArduinoJson serialization + SD write + a LOG_DEBUG call that fans out to Logging::log()'s 512B format buffer and publishToMqtt()'s String + AsyncMqttClient::publish() — all on the same small stack. Bumped to 8192B. HealthMonitor's monitoring task shares the same nested-logging pattern (11 LOG_* calls per health check pass) and was judged next most likely to trip, so bumped 4096B -> 6144B pre-emptively. RAM headroom confirmed fine post-bump (19.2%, 63KB/320KB used). Root cause, other at-risk tasks, and the planned logging-queue redesign are documented in feature-catalog.md F-051. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,10 @@ bool HealthMonitor::begin() {
|
||||
xTaskCreatePinnedToCore(
|
||||
monitoringTask,
|
||||
"HealthMonitor",
|
||||
4096,
|
||||
// 6144: performFullHealthCheck() logs once per subsystem (11 LOG_* calls per
|
||||
// pass) — same LOG_DEBUG -> publishToMqtt() nesting that overflowed
|
||||
// TelemetryTask's 4096B stack. See stack-audit notes.
|
||||
6144,
|
||||
this,
|
||||
3, // Medium priority
|
||||
&_monitoringTaskHandle,
|
||||
|
||||
Reference in New Issue
Block a user