今日已更新 212 条资讯 | 累计 24871 条内容
关于我们

标签:#blackbox

找到 1 篇相关文章

AI 资讯

How FaultBox helped me solve a storage corruption bug I couldn't reproduce

I was testing NodeDB-Lite and PageDB through a real memory-layer application built on top of them. NodeDB-Lite is the embedded form of NodeDB for local-first and in-process workloads, while PageDB is the encrypted page store underneath it. That application was part of the test strategy. I did not want to validate the storage stack only through unit tests, fixtures, and controlled benchmarks. I wanted a real workload to keep using it, stress it, restart it, grow its data, and exercise the boundaries that isolated tests usually miss. Then the store became corrupted. The visible symptom was an authenticated-page read failure around an FTS path. A page that should have passed its AEAD authentication check did not. The application restarted, opened the same damaged store, hit the failure again, and fell into a restart loop. The hard part was not proving that the store was corrupt. The hard part was reproducing how it became corrupt. I could not reproduce it inside PageDB . I could not reproduce it through NodeDB-Lite . I could not even make the application produce it on demand. I could use the application normally for a while and eventually see the failure, but I did not have a deterministic sequence that caused it. By the way, I still found bugs along the way. Some were real. Some looked close enough to the corruption path that I thought I had finally found the root cause. I fixed them, rebuilt, ran the tests, and went back to dogfooding. The corruption still came back. At that point, I stopped asking: Which storage bug looks plausible? The real question was: Where does it actually go wrong? I kept testing the wrong shape of failure My strongest theory was freed-page reuse, or something close to a use-after-free inside the store. It was a reasonable theory. If a page had been released and then reused while another structure still referenced it, a later authenticated read could land on bytes that were valid somewhere else but invalid for the page the reader expected. So

2026-07-28 原文 →