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

nrf91_socket_offload_sendto blocks forever

We are developing an IoT device communicating via LTE to AWS IoT Hub using authentication by client certificate. For that, we are powering on the modem, do a mqtt_connect, exchange some MQTT messages, then we disconnect and send the modem to lte_lc_offline. After a while, we are restarting the modem and repeat the whole process.

On the 23rd cycle, mqtt_connect blocks forever. Stopping and checking the callstack reveals that the task spends most (if not all) of its time in some memory allocation functions.

My best guess is a memory leak of some kind. Since the code is closed source, I cannot debug this on my own. Therefore I have some questions.

  1. Where does the nrfxlib does its memory allocation. It does not seem to use the standard Zephyr Heap/k_malloc?
  2. Is there any way to see how much heap memory is left unallocated?
  3. Are you sure that the nrfxlib socket functions exit correctly in out-of-memory scenarios?

We are using nrfxlib 1.3.0.

Best Regards

Martin

Parents Reply Children
Related