Currently working on an IOT solution based on the nrf 9160 SIP that supports both firmware and modem firmware updates in combination with Zephyr and the nrf SDK. During the development process, I came across the following issues and have no clue how to solve them without rebooting the device which would be a not wanted solution.
My system runs on
NRF 9160
Zephyr 2.3
NRF SDK 1.3.2
sdk-nrfxlib 1.3.1
The first problem that when I try to push the modem firmware to the device with a version match (device version 1.2.2, update version 1.2.2) the chip rejects the update but the modem will get stuck in the following state after a DFU socket has been created and the firmware version has been checked.
The error message states: "E: send failed, modem errno 8, dfu err -11" followed with an info message that states the following "I: Deleting firmware image, this can take several minutes". This is where the problem starts. The modem will sometimes get stuck in this state and based on observations with multiple devices won't be several minutes but indefinitely(one has been stuck in the state for 24+ hours). An image of the output for reference.

The second problem that occurs is when the update fails and the modem doesn't get stuck, when I then try to update for example the firmware of my device the modem will reject the FOTA call from the nrfSDK and won't start the procedure. This has to do with DFU errors.