onomondo / nrf-softsim

Manifest repo for integrating SoftSIM and nrf-sdk
24 stars 6 forks source link

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

Closed MirkoCovizzi closed 6 months ago

MirkoCovizzi commented 8 months 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 7 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 6 months ago

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