onomondo / nrf-softsim

Manifest repo for integrating SoftSIM and nrf-sdk
31 stars 7 forks source link

Serial LTE Modem application (nRF Connect SDK) crashes during SoftSIM DEINIT #23

Closed MirkoCovizzi closed 10 months ago

MirkoCovizzi commented 1 year ago

Hi,

we are currently encountering a problem where when issuing a CFUN=0 after a CFUN=1 the application core will reboot due to a crash in the DEINIT switch case, in particular while executing the deinit_fs function.

To reproduce the bug, checkout the branch https://github.com/MirkoCovizzi/nrf-softsim/tree/deinit-crash, point the manifest to west.yml and do a west update. This will pull the NCS branch https://github.com/MirkoCovizzi/sdk-nrf/tree/deinit-crash that contains the application (currently WIP) https://github.com/MirkoCovizzi/sdk-nrf/tree/deinit-crash/applications/serial_lte_modem_softsim.

To build the application:

To test the application:

To show that the deinit_fs function is the culprit, checkout https://github.com/MirkoCovizzi/nrf-softsim/tree/deinit-no-crash and repeat the steps above. Observe that after executing the same steps, the application will not reboot due to a crash (will not output the string Ready) after the specific sequence of AT commands.

peterbornerup commented 11 months ago

I believe this is fixed in the newest release v2.2.1

We had an old free not changed to use k_free. It's been changed to use the SS_FREE macro now.

MirkoCovizzi commented 10 months ago

@peterbornerup Thanks Peter, looks like it fixes the issue. Best regards.