Andrew Zonenberg on Nostr: So the actual bug here, I think, was that when I got an ECC uncorrectable error ...
So the actual bug here, I think, was that when I got an ECC uncorrectable error during the compact operation, I'd discard the wrong block of data. I think it's fixed, time to fuzz more and see...
I'm definitely making progress squishing bugs, early on I was getting instant failures after only a few seconds of fuzzing and they're now far less common with fairly long time intervals between breakage.
Every so often, glancing at the console, I see uncorrectable ECC errors getting logged but it's successfully recovered in every case with this latest code and the object store remained consistent.
Also found and fixed a bug causing excessive padding to bloat log entries by 8-16 bytes depending on flash write block size. This will break compatibility with existing flash images on STM32L431 but I can live with that given that I only have one project using it on STM32L431 at the moment and the only usage of the KVS is for bootloader firmware revision data.
I'm definitely making progress squishing bugs, early on I was getting instant failures after only a few seconds of fuzzing and they're now far less common with fairly long time intervals between breakage.
Every so often, glancing at the console, I see uncorrectable ECC errors getting logged but it's successfully recovered in every case with this latest code and the object store remained consistent.
Also found and fixed a bug causing excessive padding to bloat log entries by 8-16 bytes depending on flash write block size. This will break compatibility with existing flash images on STM32L431 but I can live with that given that I only have one project using it on STM32L431 at the moment and the only usage of the KVS is for bootloader firmware revision data.