esp-matter
esp-matter copied to clipboard
Running out of space in nvs partition corrupts flash. (CON-1255)
I had a bug in my code which caused me to write too many keys into the NVS partition. That should have just failed with an out-of-space error, but it didn't. It corrupted my partition instead.
I accidentally made an infinite loop making bridged endpoints. Each time I made an endpoint it made the corresponding keys in NVS. When it ran out of space in NVS it didn't fail gracefully, instead it corrupted the partition.
@jonsmirl , an infinite lopp writing keys to the nvs_partition did not cause any corruption of the partition on my end.
I tested the light app as well as the ble_mesh_bridge app with bridged endpoint with infinite loop writing too many keys to nvs with esp32c3. My idf version for this test is v5.2.1.
It gave the following error 4157 which stands for ESP_ERR_NVS_NOT_ENOUGH_SPACE which stands for no enough space in the underlying storage to save the value.
Did you try to keep adding after it was full? I was not properly checking the error so I just kept adding until I rebooted.
Yes, I added the keys in a loop even after it was full and I kept getting the same error i.e 4157.