NVS allocation for namespace sometimes doesn't allocate appropriately [IDFGH-3067]

elad30300
Posts: 1
Joined: Thu May 09, 2019 3:17 pm

NVS allocation for namespace sometimes doesn't allocate appropriately [IDFGH-3067]

Postby elad30300 » Wed Apr 08, 2020 1:43 pm

I use the stable version of esp-idf (v3.3.1) with ESP32-WROOM-32 chip, and I use OTA via classic bluetooth to update my chips.
I've seen that sometimes my app gets only about 500 entries in my NVS namespace, instead of almost 29000 entries like it should have and does almost all the time, it makes my app crash when it happens. Here is my partition table:

otadata, data, ota, 0x9000, 0x2000,
phy_init, data, phy, 0xb000, 0x1000,
nvs, data, nvs, 0xc000, 0xe4000,
factory, 0, 0, 0xf0000, 1M,
ota_0, 0, ota_0, 0x1f0000, 1M,
ota_1, 0, ota_1, 0x2f0000, 1M,

I don't know if it happens when I use "make erase_flash flash" to install or after OTA since it really doesn't happen a lot.
Last time I've seen it - when I re-installed my app using "make erase_flash flash" then I got the amount of NVS entries I need.

Does anyone know why this problem might happen?
It doesn't happen a lot but I can't allow it to happen at all (especially after OTA updated when I'm not the one who update the chip).

Thanks.

ESP_Alvin
Posts: 115
Joined: Thu May 17, 2018 2:26 am

Re: NVS allocation for namespace sometimes doesn't allocate appropriately [IDFGH-3067]

Postby ESP_Alvin » Thu Apr 09, 2020 3:13 am

Moderator's note: edit the topic title for issue tracking, thanks.

BTW, thanks for reporting. Would you please help provide more details, information like elf, sdk configuration, backtrace, log outputs, commit ID, and etc. would help us debug further. Thanks.

Alvin

ESP_igrr
Posts: 1654
Joined: Tue Dec 01, 2015 8:37 am

Re: NVS allocation for namespace sometimes doesn't allocate appropriately [IDFGH-3067]

Postby ESP_igrr » Tue Apr 14, 2020 1:40 pm

Hi elad30300,
can you explain a bit more, how the application writes to NVS and how it reads back the items? Is there some code snippet you can share that reproduces the issue?

Who is online

Users browsing this forum: No registered users and 57 guests