PX4 Community Q&A: November 08, 2023

Hi everybody!

I have an issue where the logger stopping after a couple of hours.

Sadly we are doing long flight, so it’s a big issue for us since we want to test our system for about the same amount of time as the flights and also need some debugging for those.

I’ve updated our fork to v1.14 and also cherry-picked this PR: logger: restart on file write error by bkueng · Pull Request #21389 · PX4/PX4-Autopilot · GitHub That supposedly mitigate the file size limitation of NuttX.

But alas, it is still present in our testing, where when we leave the system for about 5 hours, we come back and the logger module has stop logging without any error in the dmesg or in the last ULog that was generated.

I ran multiple time tests and 5 hours seems to be the limit which produce a ~900MB ULog file. I’ve just started another test with a freshly formatted SD card, and I’ll see what the outcome is.

Here are a couple of hypotheses of why I think it’s stopping the logging:

  • There’s no more space in the SD card
    • Here’s a screenshot of the freshly formatted SD Card, and I only have, 3324M available. I’ll test this by letting it run as long as I can and see if the ULog match the file size of the available memory left.
      image
      • I’d like to know how can I make this vfat partition bigger?
  • There’s a limit to the size a file can be in NuttX
    • I think that in NuttX it’s supposed to be around 2G from what I’m reading here: .ulg file maximum size? - #2 by bkueng
    • Which would correlate with what I’ve experienced, but with the PR it “should” be fixed?

Anyway, if there’s some idea of what I can do to test to confirm where the problem lies that would be greatly appreciated and also if you have any idea on how to fix it that would be stellar also.

Thanks!

Update #1:

So I left it run all night and it now the log is about 1.7Go. So formatting the SD card was important. So I’d like to know if there’s a way to put something like a 32Go SD card and have a vfat that’s really big for 2-3 days flights.

And also I didn’t see any logs in the dmesg regarding that the logger had stop logging or that it had an issue. Maybe it’s because the dmesg doesn’t give you all the information? Like I was only seeing maybe 30 or so lines of log.