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

Hang in logger frontend

I'm hitting a couple of different logging issues with the latest SDK15. In the most recent case it appears std_n is hanging while calling nrf_log_frontend_dequeue.

Attached a picture of the call stack and the current values of m_log_data.  Any suggestions on what I may be doing wrong or if this is a known issue?  I noticed m_log_data.rd_idx is quite large. Is that an expected value?

Parents
  • Do you have NRF_LOG_DEFERRED set in sdk_config.h? I see that you have m_log_data.autoflush set. It indicates that you are not in deferred mode or you are in panic mode (NRF_LOG_FINAL_FLUSH() has been called and logger switched to blocking operation). In non-deferred mode logs are processed where called without any protection. Sooner of later that will lead to corruption because one will preempt another. rd_idx should always be smaller than wr_idx.

Reply
  • Do you have NRF_LOG_DEFERRED set in sdk_config.h? I see that you have m_log_data.autoflush set. It indicates that you are not in deferred mode or you are in panic mode (NRF_LOG_FINAL_FLUSH() has been called and logger switched to blocking operation). In non-deferred mode logs are processed where called without any protection. Sooner of later that will lead to corruption because one will preempt another. rd_idx should always be smaller than wr_idx.

Children
Related