FluidNC Error message

Before you reformat it, can you connect FluidTerm over USB, and get a log of the startup?
Very strange that an SD card would have that effect on the system.
That’s a new one for me as well.

Edit:failing that, at least tell us the brand, size, and formatting of the card…

Wow, that is surprising. How could that cause an issue…

It’s a PNY 32GB Elite. My card reader broke so I have to order a new one. Before I get it in, I’ll try to run fluid term tomorrow.

Just because they’re not in the picture you uploaded - the stepper drivers need to have heat sinks placed on them or they will overheat in use.

1 Like

Per earlier request I got fluidterm running and this is what I received after doing a reboot via cntrl r

FluidTerm v1.2.1 (1cf9483) using COM4
Exit: Ctrl-C, Ctrl-Q or Ctrl-], Clear screen: CTRL-W
Upload: Ctrl-U, Reset ESP32: Ctrl-R, Send Override: Ctrl-O
Resetting MCU
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
[MSG:INFO: uart_channel0 created]
[MSG:RST]
[MSG:INFO: FluidNC v3.9.1 https://github.com/bdring/FluidNC]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.7-dirty]
[MSG:INFO: Local filesystem type is littlefs]
[MSG:INFO: Configuration file:config.yaml]
[MSG:INFO: Machine LowRider]
[MSG:INFO: Board Jackpot TMC2209]
[MSG:INFO: UART1 Tx:gpio.0 Rx:gpio.4 RTS:NO_PIN Baud:115200]
[MSG:INFO: I2SO BCK:gpio.22 WS:gpio.17 DATA:gpio.21]
[MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19]
[MSG:INFO: SD Card cs_pin:gpio.5 detect:NO_PIN freq:20000000]
[MSG:INFO: Stepping:I2S_STATIC Pulse:2us Dsbl Delay:0us Dir Delay:1us Idle Delay:255ms]
[MSG:INFO: User Digital Output: 0 on Pin:gpio.26]
[MSG:INFO: User Digital Output: 1 on Pin:gpio.27]
[MSG:INFO: Axis count 3]
[MSG:INFO: Axis X (3.000,1263.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2209 UART1 Addr:0 CS:NO_PIN Step:I2SO.2 Dir:I2SO.1 Disable:I2SO.0 R:0.110]
[MSG:INFO:  X Neg Limit gpio.25]
[MSG:INFO: Axis Y (3.000,2483.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2209 UART1 Addr:1 CS:NO_PIN Step:I2SO.5 Dir:I2SO.4 Disable:I2SO.7 R:0.110]
[MSG:INFO:  Y Neg Limit gpio.33]
[MSG:INFO:   Motor1]
[MSG:INFO:     tmc_2209 UART1 Addr:3 CS:I2SO.14 Step:I2SO.13 Dir:I2SO.12 Disable:I2SO.15 R:0.110]
[MSG:INFO:  Y2 Neg Limit gpio.35]
[MSG:INFO: Axis Z (-297.000,3.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2209 UART1 Addr:2 CS:NO_PIN Step:I2SO.10 Dir:I2SO.9 Disable:I2SO.8 R:0.110]
[MSG:INFO:  Z Pos Limit gpio.32]
[MSG:INFO:   Motor1]
[MSG:INFO:     tmc_2209 UART1 Addr:3 CS:I2SO.19 Step:I2SO.18 Dir:I2SO.17 Disable:I2SO.16 R:0.110]
[MSG:INFO:  Z2 Pos Limit gpio.34]
[MSG:INFO: X Axis driver test passed]
[MSG:INFO: Y Axis driver test passed]
[MSG:INFO: Y2 Axis driver test passed]
[MSG:INFO: Z Axis driver test passed]
[MSG:INFO: Z2 Axis driver test passed]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: STA SSID is not set]
[MSG:INFO: AP SSID FluidNC IP 192.168.0.1 mask 255.255.255.0 channel 1]
[MSG:INFO: AP started]
[MSG:INFO: WiFi on]
[MSG:INFO: Captive Portal Started]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]
[MSG:INFO: Flood coolant gpio.2]
[MSG:INFO: Mist coolant gpio.16]
[MSG:INFO: Probe gpio.36:low]

Grbl 3.9 [FluidNC v3.9.1 (wifi) '$' for help]
[MSG:INFO: WebUI: Request from 192.168.0.2]
[MSG:INFO: WebUI: Request from 192.168.0.2]
[MSG:INFO: WebUI: Request from 192.168.0.2]
[MSG:INFO: WebUI: Request from 192.168.0.2]

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


Backtrace: 0x4008535d:0x3ffe2670 0x40090019:0x3ffe2690 0x40096871:0x3ffe26b0 0x401c1ebf:0x3ffe2730 0x401c1f06:0x3ffe2750 0x401c2273:0x3ffe2770 0x4011b169:0x3ffe2790 0x401111c6:0x3ffe27f0 0x40111762:0x3ffe2a30 0x401fe44d:0x3ffe2a50 0x40122c46:0x3ffe2a70 0x401266c5:0x3ffe2a90 0x40126747:0x3ffe2ad0 0x401268cd:0x3ffe2b30 0x4010e2f5:0x3ffe2b80 0x400fd18d:0x3ffe2ba0




ELF file SHA256: 047d7aaf3c524523

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
[MSG:INFO: uart_channel0 created]
[MSG:RST]
[MSG:INFO: FluidNC v3.9.1 https://github.com/bdring/FluidNC]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.7-dirty]
[MSG:INFO: Local filesystem type is littlefs]
[MSG:ERR: Skipping configuration file due to panic]
[MSG:INFO: Using default configuration]
[MSG:INFO: Axes: using defaults]
[MSG:INFO: Machine Default (Test Drive)]
[MSG:INFO: Board None]
[MSG:INFO: Stepping:RMT Pulse:4us Dsbl Delay:0us Dir Delay:0us Idle Delay:255ms]
[MSG:INFO: Axis count 3]
[MSG:INFO: Axis X (-1000.000,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO: Axis Y (-1000.000,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO: Axis Z (-1000.000,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: STA SSID is not set]
[MSG:INFO: AP SSID FluidNC IP 192.168.0.1 mask 255.255.255.0 channel 1]
[MSG:INFO: AP started]
[MSG:INFO: WiFi on]
[MSG:INFO: Captive Portal Started]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]

Grbl 3.9 [FluidNC v3.9.1 (wifi) '$' for help]
[MSG:ERR: Configuration is invalid. Check boot messages for ERR's.]
[MSG:INFO: WebUI: Request from 192.168.0.2]

I haven’t done this before but here are instructions on decoding the backtrace. This will show the code that errored.

Thank you for this comment. I had indeed overlooked this need. I’ve looked through everything and don;t seem to have heatsinks. Guess it’s another 2 days while I wait on amazon.

Getting fluidterm to run was at the edge of my comfort zone… do I really need to do this, or is the end result going to be get a new and correctly formatted sd card regardless?

No, this is a rather advanced part of FluidNC debugging. The information you provided is exactly what we need. I can probably do it tomorrow if no one else gets to it.

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;
}

That lines up nicely with the user’s observations. Something on the sdcard is strange. It could be corrupt or a file type that this implementation isn’t capable of handling. Either way, using a different sdcard or reformatting this one may avoid the issue.

FluidNC shouldn’t really be able to handle this bug. But it could be improved by catching the exception, refusing to open the sdcard, and continuing to run.

I would guess either the unknown status is file_type::none or that gets set in make_file_status. Either way, it is perturbed by something in the sdcard or reader.

1 Like

It would be interesting to get a disk image of the problem SD card.

Unfortunately I did wipe the card after my last post by reformatting it. It still could not be read. But I found another one around the house, and it works great. So whatever the problem is seems to be specific to this SD card. Thanks to all for your efforts.

2 Likes