-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PANIC: unencrypted block in encrypted object set #16065
Comments
Hi. Looks like I have exactly the same issue, so I decided not to create duplicates.
The kernel log shows this:
I noticed, that this happens only when strace shows copy_file_range() being used. So looks like the fix in #15464 was not enough. |
If you scrub the pool does that fix the issue? Can you rm the file without causing the pool to hang? If this can be fixed just be deleting files it would be nice to have add the filename (if that's possible) to the error message so that it can be deleted manually. |
Scrubbing the pool indeed fixes the issue to some extent: reading the file returns an IO error, but doesn't panic and hang anymore. Cool! Deleting the file + scrubbing seems to fix the pool completely. Great, at least there is no need to recreate my affected pool.
|
System information
ZFS config is a mirrored pool with two nvme drives. I configured ZFS years ago with two pools: rpool and bpool. rpool is the mirrored pool containing my linux root and and an encrypted dataset (compression lz4, encryption aes-256-gcm) for my user directory.
Describe the problem you're observing
TL;DR:
Kernel Panic unencrypted block in encrypted object set
fromzfs send
/zfs scrub
This is likely a duplicate of or similar to #13937, #15275 and possible related to #15465. The note in 15275#issuecomment-1800270695 says this should be fixed in 2.2.2, maybe it's not fixed in 2.2.0 which was the version I was using when it manifested and I still need to clean up the broken state?
I'm hoping that someone has a path forward to fixing the pool (or letting me
zfs send
it's data): Towards that goal I'm not sure how to find which file caused it, how to delete the bad file if I find it (I'm scared to import in anything other than read-only mode), or tozfs send
excluding a set of files.Warning Signs:
One of the drives is end of life [3]. The issue first manifested when I was compiling a graphics.h and any command (e.g. cat, vim) that tried to read the file would lock up. I would reboot, run
zpool scrub
see an error for that file and delete it. This happened again the next day with a different file. See [4] zpool status.Issue:
I took a snapshot USERDATA@20240402 and tried to
zfs send
it to a send it to a remote machine (zfs send ... | pv | ssh four zfs receive
) which sends ~20GB and then a kernel panic (PANIC: unencrypted block in encrypted object set 2760
) happens and the zfs send thread locks (see [2], kill -9 won't kill it). the remote zfs receive does exit gracefully.Now I'm on a live cd with the pool imported readonly and the end of life drive removed from the system.
sudo zpool import -R /mnt/tmp_zfs/ -f -o readonly=on rpool
sudo zfs load-key -a
sudo zfs mount rpool/USERDATA/five_crypt
I succeeded in rsync the data out from the drive but I would prefer to send the snapshot
I have tried
zfs send
with raw mode (-w) and without, I tried an incremental send from a previous snapshot, and a few other variations. I can't figure out how to set zfs_recovery (see below)[1] which might help.Describe how to reproduce the problem
I number of things will cause the same panic [3]
sudo zfs send -w -V -Leb rpool/USERDATA/five_crypt@20240402 | pv | ssh four zfs receive -v ghosts/USERDATAEnter
sudo zpool scrub rpool
I'm not sure this is even valid on a read-only pool.I'm a SWE and comfortable build and helping with debug if there's productive debugging I can do. This is slightly made harder because I'm on a live cd and can't reboot but I can install ubuntu to another drive and get zfs devel version running if it's likely to help.
Attempts to avoid issue with zfs_recovery
[1] I have tried to set
zfs_recovery
after seeing advice in #15544 but don't think the setting is being set. I have triedecho 1 >> sudo /sys/module/zfs/parameters/zfs_recover
and adding "set vfs.zfs.recovery=1" to grub boot but "cat /sys/module/zfs/parameters/zfs_recover" still prints 0.Include any warning/errors/backtraces from the system logs
[2]
I found this at somepoint in my syslog but that device has now been taken offline.
2024-04-03T18:19:30.194255-07:00 five smartd[2225]: Device: /dev/nvme1, Critical Warning (0x04): Reliability
[3] syslog
[4] Zpool status
The text was updated successfully, but these errors were encountered: