From e9c1c83e358fecdc13d5f4dff204f51ae2395b83 Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Mon, 10 Aug 2026 12:31:46 -0600 Subject: [PATCH] fix(dataman): increase task stack size (#28202) * fix(dataman): increase task stack size Enabling CONFIG_FS_LARGEFILE widened off_t and fsblkcnt_t to 64-bit through the VFS, FAT and mmcsd layers that the dataman file backend calls into, which pushed the task past the load_mon warning threshold: WARN [load_mon] dataman low on stack! (252 bytes left) The task only ever had 1420 bytes, since PX4_STACK_ADJUSTED is a no-op on 32-bit NuttX targets. That left roughly 1168 bytes of peak usage against a 300 byte warning threshold, so it was already running close to the limit beforehand. Bump to 1800 to restore headroom. * Update src/modules/dataman/dataman.cpp * fix(dataman): use a single task stack size The littlefs and non-littlefs sizes were within 200 bytes of each other, which is not worth a conditional. Use 2000 everywhere so no target loses headroom. --- src/modules/dataman/dataman.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/modules/dataman/dataman.cpp b/src/modules/dataman/dataman.cpp index b99f4bb106c..9af22935abb 100644 --- a/src/modules/dataman/dataman.cpp +++ b/src/modules/dataman/dataman.cpp @@ -65,11 +65,7 @@ __BEGIN_DECLS __EXPORT int dataman_main(int argc, char *argv[]); __END_DECLS -#ifdef CONFIG_FS_LITTLEFS -static constexpr int TASK_STACK_SIZE = 2000; /* littlefs needs more stack */ -#else -static constexpr int TASK_STACK_SIZE = 1420; -#endif +static constexpr int TASK_STACK_SIZE = 2000; #ifdef CONFIG_DATAMAN_PERSISTENT_STORAGE /* Private File based Operations */