| Summary: | 11.1-RELEASE kernel panics while importing ZFS pool | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Erwan Legrand <freebsd> |
| Component: | kern | Assignee: | freebsd-fs (Nobody) <fs> |
| Status: | Closed Not A Bug | ||
| Severity: | Affects Only Me | CC: | ben.rubson |
| Priority: | --- | ||
| Version: | 11.1-RELEASE | ||
| Hardware: | amd64 | ||
| OS: | Any | ||
|
Description
Erwan Legrand
2017-10-02 09:11:59 UTC
Could you please try to obtain a crash dump with 11.1 ? You can set dumpdev parameter in /boot/loader.conf to a suitable value if you have a dedicated dump partition or a swap partition. E.g.: dumpdev="gpt/7660D.swap" dumpdev="ada0p2" etc. Then you can boot back to 11.0 to get the crash dump extracted and saved. As to the issue itself... It's possible that you have some bad data with correct checksum on disk (no guesses on how it came to be). The older ZFS code is not as thorough in validating the data. The scrub does not detect it because the checksum is correct. Additional debugging confirmed the bad on-disk data theory. "The older ZFS code is not as thorough in validating the data." Andriy, this is interesting (and quite scary ?). What are the differences between 11.0 and 11.1 in terms of ZFS data strength ? Many thanks ! Ben (In reply to Ben RUBSON from comment #3) Not sure what's scary... (at least, scarier than before). But let me try to clarify the problem first. A bit flip happened in RAM (non-ECC) and some corrupted (meta-)data got written to disk. It happened to be a block pointer within an indirect block. For ZFS the indirect block looked totally valid as its checksum was calculated after the bit flip. So, ZFS had no reason to distrust the block pointers in the block. Still, the newer ZFS does some additional validation (sanity checking) of those block pointers while the older ZFS fully trusted them to be correct. A corrupt block pointer would typically result in a crash later on. And such a crash is hard(-er) to debug, that's why the extra checks were added. In some cases the corruption would be almost benign, so things would appear to be okay. In this case, the block pointer was actually a hole block pointer and the corruption was of the almost benign variety. So, really, the culprit here was faulty RAM. If your data gets corrupted in memory, you have corrupted data and there is no way ZFS can help with that. If your metadata gets corrupted in memory, then ZFS might be able to detect that and bail out early, or it can fail to detect the problem and crash later on, or it can even try to read a wrong block, but then the checksum error is the most likely outcome. The usual advice applies, use ECC memory and have backups. Even on a system with ECC memory some hardware can corrupt memory by writing to wrong location via DMA, even on a system with reliable hardware there still can be a kernel (driver) bug that would corrupt memory contents, etc. |