Hello,
i'm interfacing with the nrf_modem_lib using posix socket API with offloading. The send is called separately from a dedicated thread to avoid any hanging of the rest of the application.
However, i have seen some anomalies during operation of the application. Which is most likely cause by nrf_modem_library actively waiting for buffer flushing.
I wanted to ask what are condition for the Asynchronous send to block other thread than the calling one ?
The issue happened during low quality signal and in connection stage of the modem on NB-IoT network. The blocking it self would not be an issue if it blocked only the calling thread.
How is it possible that the call to the nrf_modem_library hangs the entire application including other threads ? This may cause to trip the hardware watchdog or other issues. In my case the modem hanged for 10s. How can i prevent such state ?
[14:03:16.292,000] <dbg> dt_coap_client: Id: 41617, T0: 280029, T: 2827, Tries: 5, Ack: 0, pending: 0x200105f0
[14:03:16.292,000] <wrn> dt_coap_client: Retransmittion Next Try: 5654ms
[14:03:16.293,000] <dbg> dt_coap_client: Retransmittion schedule: 4188ms
[14:03:16.293,000] <dbg> dt_socket_manager: Send handler: 1
[14:03:16.293,000] <dbg> dt_socket_manager: Msg fifo: 1
[14:03:16.293,000] <dbg> dt_socket_manager: Sending data: 64 - (Call to send)
[14:03:27.096,000] <dbg> dt_socket_manager: Resend issue detected. 500 (Log after send fails due to network not connected and internal buffers of the modem are full)
[14:03:27.108,000] <inf> dt_app_flight: Processing Location Data: Alt: 345
[14:03:27.108,000] <inf> dt_app_flight: Time: 15.08.2022 12:01:58.841, timestamp: 1660564918841
[14:03:27.145,000] <inf> dt_mgmt: System heap Alloc: 292, Free: 3708
The issue is not trivially reproducible therefore i cannot provide modem traces. Modem version: nrf9160_1.3.1. NCS 2.0.0