Well, I decoded the backtrace. Note this is literally telling us the code that was called when it failed so this probably doesn’t make sense to most people. This is in the FluidNC code so I have a very limited understanding myself. Feel free to ignore most of this.
TL;DR - When trying to access the SD card (not entirely sure what specifically - might have just been listing the files on the SD card), it threw a filesystem error which caused a panic, resetting the ESP32. It’s surprising that this action would cause that but lines up with what was observed.
0x4008535d
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c:408
0x40090019
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/esp_system.c:137
0x40096871
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/abort.c:46
0x401c1ebf
/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47
0x401c1f06
/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57
0x401c2273
/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:95
0x4011b169
/home/runner/work/FluidNC/FluidNC/FluidNC/stdfs/std-ops.cpp:1039
0x401111c6
/home/runner/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/fs_dir.h:260
0x40111762
/home/runner/work/FluidNC/FluidNC/FluidNC/src/WebUI/WebServer.cpp:1088
0x401fe44d
/home/runner/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/std_function.h:297
0x40122c46
/home/runner/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/std_function.h:687
0x401266c5
/home/runner/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/detail/RequestHandlersImpl.h:51
0x40126747
/home/runner/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/WebServer.cpp:641
0x401268cd
/home/runner/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/WebServer.cpp:307
0x4010e2f5
/home/runner/work/FluidNC/FluidNC/FluidNC/src/WebUI/WebServer.cpp:1219
0x400fd18d
/home/runner/work/FluidNC/FluidNC/FluidNC/src/Protocol.cpp:140 (discriminator 3)
Translating code, bottom up, skipping library code:
Protocol.cpp:140: void polling_loop(void*unused) -> module->poll()
WebServer.cpp:1219: void Web_Server::poll() -> _webserver->handleClient()
WebServer.cpp:1088: void Web_Server::handle_direct_SDFileList() -> handleFileOps(sdName)
std-ops.cpp:1039: fs::file_status fs::status(const fs::path& p) -> _GLIBCXX_THROW_OR_ABORT(filesystem_error("status", p, ec));
To add some code context on that last one:
fs::file_status fs::status(const fs::path& p) {
std::error_code ec;
auto result = status(p, ec);
if (result.type() == file_type::none)
_GLIBCXX_THROW_OR_ABORT(filesystem_error("status", p, ec));
return result;
}
So, the result of that status function is file_type::none, here is the status function:
fs::file_status fs::status(const fs::path& p, error_code& ec) noexcept {
file_status status;
stat_type st;
if (::stat(p.c_str(), &st)) {
int err = errno;
ec.assign(err, std::generic_category());
if (is_not_found_errno(err))
status.type(file_type::not_found);
# ifdef EOVERFLOW
else if (err == EOVERFLOW)
status.type(file_type::unknown);
# endif
} else {
status = make_file_status(st);
ec.clear();
}
return status;
}