This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 15.3.0 logging, hitting warning "Backends flushed"

I'm migrating a project from SDK 14.2.0 to SDK 15.3.0. I use gcc. I just got it to link and flash and I'm seeing RTT logging OK, to a point. I also have the flashlog in use, but haven't yet proved that it's working.

Part way through enabling the SD, the logging breaks. Here's what I see on the RTT output:

D nrf_sdh_ble RAM starts at 0x20002BD8

D nrf_sdh_ble RAM starts at 0x20002BD8

E error 0,  line 0

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

W app Backends flushed

This warning is coming from components/libraries/log/src/nrf_log_frontend.c L882. (As mentioned in another post, doing yet more logging at this point when the backends are struggling seems bonkers to me, but nevermind that for now.)

The pertinent comment is this one from that SDK source:

//Could not allocate memobj - backends are not freeing them on time.
Why would the backend not be freeing the memobj in time? Is it actually doing a flash write on every single NRF_LOG_*() call? Surely it buffers them?
I'm only logging at level WARNING to the flashlog and at level INFO to the crashlog.
Here's my app_config.h. Other than these defines, we use /config/nrf52832/config/sdk_config.h.

Parents Reply
  • No, I wasn't calling NRF_LOG_PROCESS() anywhere. By this point, I'm not yet in the main loop.

    If I try using NRF_LOG_DEFERRED as 1, it makes no difference. If I revert to NRF_LOG_DEFERRED as 0 but make a few calls to NRF_LOG_PROCESS() in various places leading up to the point at which the buffer presumably overflows, I can get a bit further in execution but no matter how liberally I add NRF_LOG_PROCESS() calls, I still get this "Backends flushed" warning ad infinitum.

Children
Related