Closed techexo closed 1 year ago
Yeah, see where it says
Jan 24 15:04:50 atuin kernel: [ 3740.917885] VERIFY3(range_tree_space(smla->smla_rt) + sme->sme_run <= smla->smla_sm->sm_size) failed (17179877376 <= 17179869184)
Jan 24 15:04:50 atuin kernel: [ 3740.919910] PANIC at space_map.c:405:space_map_load_callback()
?
At that point, Progress Is Done - the kernel thread has died, it will not be coming back, and all locks that it was holding are forever taken.
Consequently, it's unsurprising that large swathes of things are not responsive once it happens.
(FWIW, I've never found -F/-X useful - I'm not sure how an automated emergency rewind has much worse success at this than manually doing it, but it is, and I've not looked into why. So you might want to experiment with grabbing a list of txgs still visible with e.g. zdb -lu and then trying manually specifying -T. You probably also want to adjust spa_load_verify_metadata if you don't want it to scan every single block for sanity checking before importing. Note that, as with -F and -X, this can be quite destructive, so, you know, last resort, make sure all the data you could get off is off or you have whole disk backups, etc.
It may still panic on a number of the possible -T values, so reboots between attempts may be necessary. I'd start at most recent and go backward. Normally I'd also suggest doing it with -o readonly=on, but it sounds like that works with the latest version too, so importing readonly in the past wouldn't be a strict improvement...could still try importing readonly before readwrite for each version though.)
e: Huh. #11923 looks like a similar case, on a much older Proxmox ZFS version, which got little attention. In #11691, they may have had hardware issues? Story unclear. #10942 was a reproducible bug with, IIUC, inconsistency between mirror legs being handled incorrectly, but seems to have been fixed, in theory, and the fix is in 2.1.0 and newer. (There are others, but that'll do as a starting point...)
Hi @rincebrain and thanks for the quick answer.
I am in the process of doing a readonly import with -T on the latest tgx given by zdb -lu
. It's been almost an hour now (for a 2 TB mirror with around a quarter actually used), but still no kernel panic at the moment, and I see movement on the disks with iostat.
I guess the fact that it's very long would be a consequence of not tinkering with spa_load_verify_metadata? I don' know what you're referring to so I preferred not to touch it. I still have the following messages in syslog, but no PANIC message seen. Should I consider it hanged or should I let it run?
Jan 24 20:52:52 atuin kernel: [ 4834.285614] INFO: task zpool:23312 blocked for more than 1087 seconds.
Jan 24 20:52:52 atuin kernel: [ 4834.286069] Tainted: P IO 5.13.19-1-pve #1
Jan 24 20:52:52 atuin kernel: [ 4834.286507] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan 24 20:52:52 atuin kernel: [ 4834.286954] task:zpool state:D stack: 0 pid:23312 ppid: 11546 flags:0x00000004
Jan 24 20:52:52 atuin kernel: [ 4834.287416] Call Trace:
Jan 24 20:52:52 atuin kernel: [ 4834.287872] __schedule+0x2fa/0x910
Jan 24 20:52:52 atuin kernel: [ 4834.288334] schedule+0x4f/0xc0
Jan 24 20:52:52 atuin kernel: [ 4834.288788] schedule_preempt_disabled+0xe/0x10
Jan 24 20:52:52 atuin kernel: [ 4834.289242] __mutex_lock.constprop.0+0x305/0x4d0
Jan 24 20:52:52 atuin kernel: [ 4834.289769] __mutex_lock_slowpath+0x13/0x20
Jan 24 20:52:52 atuin kernel: [ 4834.290278] mutex_lock+0x34/0x40
Jan 24 20:52:52 atuin kernel: [ 4834.290714] spa_all_configs+0x4a/0x120 [zfs]
Jan 24 20:52:52 atuin kernel: [ 4834.291247] zfs_ioc_pool_configs+0x1c/0x70 [zfs]
Jan 24 20:52:52 atuin kernel: [ 4834.291781] zfsdev_ioctl_common+0x752/0x9b0 [zfs]
Jan 24 20:52:52 atuin kernel: [ 4834.292307] ? __kmalloc_node+0x276/0x300
Jan 24 20:52:52 atuin kernel: [ 4834.292749] ? _copy_from_user+0x2e/0x60
Jan 24 20:52:52 atuin kernel: [ 4834.293184] zfsdev_ioctl+0x57/0xe0 [zfs]
Jan 24 20:52:52 atuin kernel: [ 4834.293738] __x64_sys_ioctl+0x91/0xc0
Jan 24 20:52:52 atuin kernel: [ 4834.294368] do_syscall_64+0x61/0xb0
Jan 24 20:52:52 atuin kernel: [ 4834.294779] ? handle_mm_fault+0xda/0x2c0
Jan 24 20:52:52 atuin kernel: [ 4834.295189] ? exit_to_user_mode_prepare+0x37/0x1b0
Jan 24 20:52:52 atuin kernel: [ 4834.295610] ? irqentry_exit_to_user_mode+0x9/0x20
Jan 24 20:52:52 atuin kernel: [ 4834.296050] ? irqentry_exit+0x19/0x30
Jan 24 20:52:52 atuin kernel: [ 4834.296484] ? exc_page_fault+0x8f/0x170
Jan 24 20:52:52 atuin kernel: [ 4834.296918] ? asm_exc_page_fault+0x8/0x30
Jan 24 20:52:52 atuin kernel: [ 4834.297353] entry_SYSCALL_64_after_hwframe+0x44/0xae
Jan 24 20:52:52 atuin kernel: [ 4834.297823] RIP: 0033:0x7fc77c8d7cc7
Jan 24 20:52:52 atuin kernel: [ 4834.298279] RSP: 002b:00007ffc19a69608 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Jan 24 20:52:52 atuin kernel: [ 4834.298734] RAX: ffffffffffffffda RBX: 000055720bbca570 RCX: 00007fc77c8d7cc7
Jan 24 20:52:52 atuin kernel: [ 4834.299170] RDX: 00007ffc19a69630 RSI: 0000000000005a04 RDI: 0000000000000003
Jan 24 20:52:52 atuin kernel: [ 4834.299609] RBP: 00007ffc19a6cc20 R08: 00007fc77c168010 R09: 0000000000000000
Jan 24 20:52:52 atuin kernel: [ 4834.300045] R10: 0000000000000022 R11: 0000000000000246 R12: 000055720bbca570
Jan 24 20:52:52 atuin kernel: [ 4834.300484] R13: 0000000000000000 R14: 00007ffc19a69630 R15: 0000000000000000
Edit: a few minutes after crying, it eventually mounted the zpool readonly! I followed with a zpool export
and tried to reimport with write access, but it panicked right after. I'm wondering if I should have once again added the -T argument? Or once I accessed it with "readonly" the rollback should've been done?
Without that parameter, it will literally iterate over every metadata and data block referenced in that txg before importing it, which is why I suggested you might not want to wait on it doing that.
On Mon, Jan 24, 2022 at 3:51 PM Eloi Coutant @.***> wrote:
Hi @rincebrain https://github.com/rincebrain and thanks for the quick answer. I am in the process of doing a readonly import with -T on the latest tgx given by zdb -lu. It's been almost an hour now (for a 2 TB mirror with around a quarter actually used), but still no kernel panic at the moment, and I see movement on the disks with iostat.
I guess the fact that it's very long would be a consequence of not tinkering with spa_load_verify_metadata? I don' know what you're referring to so I preferred not to touch it. I still have the following messages in syslog, but no PANIC message seen. Should I consider it hanged or should I let it run?
Jan 24 20:52:52 atuin kernel: [ 4834.285614] INFO: task zpool:23312 blocked for more than 1087 seconds. Jan 24 20:52:52 atuin kernel: [ 4834.286069] Tainted: P IO 5.13.19-1-pve #1 Jan 24 20:52:52 atuin kernel: [ 4834.286507] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Jan 24 20:52:52 atuin kernel: [ 4834.286954] task:zpool state:D stack: 0 pid:23312 ppid: 11546 flags:0x00000004 Jan 24 20:52:52 atuin kernel: [ 4834.287416] Call Trace: Jan 24 20:52:52 atuin kernel: [ 4834.287872] schedule+0x2fa/0x910 Jan 24 20:52:52 atuin kernel: [ 4834.288334] schedule+0x4f/0xc0 Jan 24 20:52:52 atuin kernel: [ 4834.288788] schedule_preempt_disabled+0xe/0x10 Jan 24 20:52:52 atuin kernel: [ 4834.289242] mutex_lock.constprop.0+0x305/0x4d0 Jan 24 20:52:52 atuin kernel: [ 4834.289769] mutex_lock_slowpath+0x13/0x20 Jan 24 20:52:52 atuin kernel: [ 4834.290278] mutex_lock+0x34/0x40 Jan 24 20:52:52 atuin kernel: [ 4834.290714] spa_all_configs+0x4a/0x120 [zfs] Jan 24 20:52:52 atuin kernel: [ 4834.291247] zfs_ioc_pool_configs+0x1c/0x70 [zfs] Jan 24 20:52:52 atuin kernel: [ 4834.291781] zfsdev_ioctl_common+0x752/0x9b0 [zfs] Jan 24 20:52:52 atuin kernel: [ 4834.292307] ? kmalloc_node+0x276/0x300 Jan 24 20:52:52 atuin kernel: [ 4834.292749] ? _copy_from_user+0x2e/0x60 Jan 24 20:52:52 atuin kernel: [ 4834.293184] zfsdev_ioctl+0x57/0xe0 [zfs] Jan 24 20:52:52 atuin kernel: [ 4834.293738] __x64_sys_ioctl+0x91/0xc0 Jan 24 20:52:52 atuin kernel: [ 4834.294368] do_syscall_64+0x61/0xb0 Jan 24 20:52:52 atuin kernel: [ 4834.294779] ? handle_mm_fault+0xda/0x2c0 Jan 24 20:52:52 atuin kernel: [ 4834.295189] ? exit_to_user_mode_prepare+0x37/0x1b0 Jan 24 20:52:52 atuin kernel: [ 4834.295610] ? irqentry_exit_to_user_mode+0x9/0x20 Jan 24 20:52:52 atuin kernel: [ 4834.296050] ? irqentry_exit+0x19/0x30 Jan 24 20:52:52 atuin kernel: [ 4834.296484] ? exc_page_fault+0x8f/0x170 Jan 24 20:52:52 atuin kernel: [ 4834.296918] ? asm_exc_page_fault+0x8/0x30 Jan 24 20:52:52 atuin kernel: [ 4834.297353] entry_SYSCALL_64_after_hwframe+0x44/0xae Jan 24 20:52:52 atuin kernel: [ 4834.297823] RIP: 0033:0x7fc77c8d7cc7 Jan 24 20:52:52 atuin kernel: [ 4834.298279] RSP: 002b:00007ffc19a69608 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 Jan 24 20:52:52 atuin kernel: [ 4834.298734] RAX: ffffffffffffffda RBX: 000055720bbca570 RCX: 00007fc77c8d7cc7 Jan 24 20:52:52 atuin kernel: [ 4834.299170] RDX: 00007ffc19a69630 RSI: 0000000000005a04 RDI: 0000000000000003 Jan 24 20:52:52 atuin kernel: [ 4834.299609] RBP: 00007ffc19a6cc20 R08: 00007fc77c168010 R09: 0000000000000000 Jan 24 20:52:52 atuin kernel: [ 4834.300045] R10: 0000000000000022 R11: 0000000000000246 R12: 000055720bbca570 Jan 24 20:52:52 atuin kernel: [ 4834.300484] R13: 0000000000000000 R14: 00007ffc19a69630 R15: 0000000000000000
— Reply to this email directly, view it on GitHub https://github.com/openzfs/zfs/issues/13003#issuecomment-1020535408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUI7M2QWP4A7U5UA3VUK3UXW3V7ANCNFSM5MVTMJKQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
I read some examples of people using the parameters (spa_load_verify_data & spa_load_verify_metadata), tried it but right now the result is the same: no problem read only, kernel panic with write access. I am currently running the fourth attempt going back in tgx time.
Something I don't explain, is that importing with readonly, I have MB_read/s between 5 and 10, but as soon as I do an import without readonly=on, the speeds go down to < 1 MB/s. I don't know if it's expected but it seems very low for sata3 disks.
I have new disks arriving tomorrow in case the issue is a material one, could you suggest a procedure to transfer data into a new pool? Can I just mount it readonly then do a zfs send to a pool created on the other disk?
MB/s read according to what, and while it's doing what? I'd suggest looking at iostat -x and seeing what it's reporting utilization as on the disks while it's doing anything at all (e.g. not PANIC'd).
It's mostly going to be random IO. SATA 3 can push plenty of bytes, but spinning rust seeking around is going to be your bottleneck there.
Your options are the normal ones for copying files around - cp, rsync, etc, plus you could use zfs send/recv to send from your old pool to the new one, complicated by the fact that you can't take an actual snapshot on the source pool, so you'd have to rely on the ability to do zfs send from readonly things, and the limitations (e.g. no resumable send/recv, I think no -R...) that come with it.
I've got no special advice for avoiding this problem going forward, since the cases that are documented for why it might arise are theoretically fixed...
After adding two new disks on the server, I managed to create a new zpool. I was able afterwards to zfs send from the readonly pool to the new zpool and access my files (yipee). However, I am now with a bit of a conundrum: should I just format the disks with the old zpool and use it for something else/a new zpool? Or do you thin I can send some more logs or debug information that could help understand what's going on?
My off the cuff answer would be to think of that pool like the fifth elephant - only good for mining resources from the body, now. :P
Less pithily, I can't speak for anyone else, but I personally have no brilliant ideas for digging into what went wrong, so if you really wanted to do that, I'd probably take the sparsest disk image I could of one of the drives and only keep that. (Admittedly, using something like zpool initialize or zpool trim for this probably won't fly because I bet that won't run on read-only imports...)
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.
I have this issue with v2.1.12
System information
Describe the problem you're observing
Hello all, I am running a proxmox server on a HP Proliant Microserver Gen8 with the latest kernel 5.13.19-3-pve. Since two days, I am unable to import my
discworld
pool without crashing the server! It is a simple two-disks mirrored configuration.I was able to import the pool readonly (
zfs import -o readonly=on -d /dev/sdxx
) and make a copy of all the data, I don't have however snapshots available. When trying to import the pool with write access, it hangs all zfs-related commands (zpool status
, for example). I also triedzpool import -F -X -a -d /dev/disk/by-id
, without much success either. The zpool import command is irresponsive and doesn't terminate to a SIGTERM or a SIGKILL. Looking at the disk activity with iostat doesn't show tremendous activity on the pool disks (but they are not dead as I have full read-only access).I'll join below the trace seen with dmesg. Any help understanding why I cannot import this pool will be much appreciated. Don't hesitate to ask me for more detailed information as I don't know what command outputs to send and help.
Thanks in advance
Describe how to reproduce the problem
Not sure it is reproducible on another environment than mine. On this server, trying to import the pool with write access is enough to reproduce the issue.
Include any warning/errors/backtraces from the system logs