You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grub options: nospectre_v2 split_lock_mitigate=0 zfs.spa_slop_shift=6 zfs.zfs_dmu_offset_next_sync=0 zfs.zfs_txg_timeout=20 zfs.zio_taskq_batch_pct=42 zfs.zfs_arc_max=1610612736 nvme.max_host_mem_size_mb=256 scsi_mod.use_blk_mq=1(I read somewhere zfs_dmu_offset_next_sync=0 supposedly decreases the chance of corruption; txg_timeout is because the constant noise of my Seagate Skyhawk HDD was unbearable; zio_taskq_batch_pct is to avoid my PC becoming unresponsive during heavy writing to datasets with compression=zstd-19; I limited ARC size to 1.5GiB to save RAM)
I've been using this config (I mean an RT kernel) since 2024-12-15, i.e. for 23 days. It worked until today, except that waking up didn't succeed in most cases (complete lock-up). Probably nvidia's driver at fault (since they don't support RT officially)?... no idea. Lock-ups occurred also in random times but after many hours of uptime. A few times, immediately after some of successful wake-ups, I saw ZFS-related traces mentioning something txg, unlock; but I ignored them......
My pools:
NVMe SSD: one pool named zroot;
HDD: three pools.
all have ashift 12, and properly aligned partitions.
So, 2 days ago I was seeding torrents (using files on the HDD), and then I decided to load up an LLM (8 GB .gguf file on an unencrypted partition on the SSD; llama.cpp), and during the loading, my PC suddenly became fully unresponsive (even no SSH and alt+print+b). At that moment what was happening:
many random reads on an HDD (many encrypted datasets with compression) by qBittorrent
one sequential read of a big file (with mmaping) on an SSD (pool zroot, unencrypted dataset zroot/data/m/c/rseq without compression) by llama.cpp
small writes on an SSD (pool zroot, encrypted dataset zroot/data/home) by qBittorrent (metadata), Firefox.
all while also using a non-stock RT kernel.
I found the timing of the lock-up suspicious, so today I decided to repeat the same scenario. This time the LLM did get fully loaded (in ~28 secs), but... 5 seconds later my PC became unresponsive again (it's like there is some connection to zfs.zfs_txg_timeout=20).
I rebooted my PC, selected the stock LTS kernel, then I saw:
Arch Linux 6.6.68-1-lts (tty1)
arzeth-old pc login: arzeth (automatic login)
Last login Wed Jan 8 10:37:02 on tty1
[ 65.596542] VERIFY3(0 == zap_add_int(zfsvfs->z_os, zfsvfs->z_unlinkedobj, zp->z_id, tx)) failed (0 == 5)
[ 65.596573] PANIC at zfs_dir.c:464:zfs_unlinked_add()
Afterwards, I booted from a LiveCD (even earlier kernel: Linux sysrescue 6.1.53-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 09:32:00 +0000 x86_64 GNU/Linux), installed ZFS 2.2.7 (same latest version), mounted all pools, ran zpool scrub zroot, then zpool status zroot:
pool: zroot
state: ONLINE
scan: scrub repaired 0B in 00:12:38 with 0 errors on Wed Jan 8 15:19:16 2025
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
nvme0n1p4 ONLINE 0 0 0
errors: No known data errors
[root@sysrescue /tmp]# smartctl -a /dev/nvme0
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.1.53-1-lts] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: m.2 Smartbuy PS5013-2280T 1024GB
Serial Number: 296E079B18FC00010017
Firmware Version: EDFM00E3
PCI Vendor/Subsystem ID: 0x1987
IEEE OUI Identifier: 0x6479a7
Total NVM Capacity: 1,024,209,543,168 [1.02 TB]
Unallocated NVM Capacity: 0
Controller ID: 1
NVMe Version: 1.3
Number of Namespaces: 1
Namespace 1 Size/Capacity: 1,024,209,543,168 [1.02 TB]
Namespace 1 Formatted LBA Size: 4096
Namespace 1 IEEE EUI-64: 6479a7 2ae2673137
Local Time is: Wed Jan 8 20:16:53 2025 UTC
Firmware Updates (0x12): 1 Slot, no Reset required
Optional Admin Commands (0x001f): Security Format Frmw_DL NS_Mngmt Self_Test
Optional NVM Commands (0x005e): Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Log Page Attributes (0x0e): Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg
Maximum Data Transfer Size: 64 Pages
Warning Comp. Temp. Threshold: 68 Celsius
Critical Comp. Temp. Threshold: 70 Celsius
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 4.50W - - 0 0 0 0 0 0
1 + 2.70W - - 1 1 1 1 0 0
2 + 2.16W - - 2 2 2 2 0 0
3 - 0.0700W - - 3 3 3 3 1000 1000
4 - 0.0020W - - 4 4 4 4 5000 60000
Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 - 512 0 1
1 + 4096 0 0
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 25 Celsius
Available Spare: 100%
Available Spare Threshold: 5%
Percentage Used: 11%
Data Units Read: 351,607,959 [180 TB]
Data Units Written: 157,926,176 [80.8 TB]
Host Read Commands: 3,239,887,842
Host Write Commands: 5,191,310,103
Controller Busy Time: 92,845
Power Cycles: 1,910
Power On Hours: 27,620
Unsafe Shutdowns: 201
Media and Data Integrity Errors: 0
Error Information Log Entries: 351,361
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Error Information (NVMe Log 0x01, 16 of 16 entries)
Num ErrCount SQId CmdId Status PELoc LBA NSID VS Message
0 351361 0 0x0014 0x4005 0x028 0 0 - Invalid Field in Command
Self-test Log (NVMe Log 0x06)
Self-test status: No self-test in progress
No Self-tests Logged
The bad dataset:
[root@sysrescue /tmp/x]# zfs get all zroot/data/home
NAME PROPERTY VALUE SOURCE
zroot/data/home type filesystem -
zroot/data/home creation Sun Nov 28 16:27 2021 -
zroot/data/home used 76.0G -
zroot/data/home available 16.9G -
zroot/data/home referenced 75.0G -
zroot/data/home compressratio 1.47x -
zroot/data/home mounted yes -
zroot/data/home quota none default
zroot/data/home reservation none default
zroot/data/home recordsize 256K local
zroot/data/home mountpoint /home local
zroot/data/home sharenfs off default
zroot/data/home checksum on default
zroot/data/home compression zstd-17 local
zroot/data/home atime off inherited from zroot/data
zroot/data/home devices off inherited from zroot
zroot/data/home exec on default
zroot/data/home setuid on default
zroot/data/home readonly off default
zroot/data/home zoned off default
zroot/data/home snapdir hidden default
zroot/data/home aclmode discard default
zroot/data/home aclinherit restricted default
zroot/data/home createtxg 13 -
zroot/data/home canmount on default
zroot/data/home xattr sa inherited from zroot
zroot/data/home copies 1 default
zroot/data/home version 5 -
zroot/data/home utf8only on -
zroot/data/home normalization formD -
zroot/data/home casesensitivity sensitive -
zroot/data/home vscan off default
zroot/data/home nbmand off default
zroot/data/home sharesmb off default
zroot/data/home refquota none default
zroot/data/home refreservation none default
zroot/data/home guid 6560759384699375364 -
zroot/data/home primarycache all default
zroot/data/home secondarycache all default
zroot/data/home usedbysnapshots 0B -
zroot/data/home usedbydataset 75.0G -
zroot/data/home usedbychildren 933M -
zroot/data/home usedbyrefreservation 0B -
zroot/data/home logbias latency default
zroot/data/home objsetid 77 -
zroot/data/home dedup off local
zroot/data/home mlslabel none default
zroot/data/home sync standard default
zroot/data/home dnodesize legacy inherited from zroot
zroot/data/home refcompressratio 1.47x -
zroot/data/home written 75.0G -
zroot/data/home logicalused 108G -
zroot/data/home logicalreferenced 107G -
zroot/data/home volmode default default
zroot/data/home filesystem_limit none default
zroot/data/home snapshot_limit none default
zroot/data/home filesystem_count none default
zroot/data/home snapshot_count none default
zroot/data/home snapdev hidden default
zroot/data/home acltype posix inherited from zroot
zroot/data/home context none default
zroot/data/home fscontext none default
zroot/data/home defcontext none default
zroot/data/home rootcontext none default
zroot/data/home relatime on inherited from zroot
zroot/data/home redundant_metadata all default
zroot/data/home overlay on default
zroot/data/home encryption aes-256-gcm -
zroot/data/home keylocation none default
zroot/data/home keyformat passphrase -
zroot/data/home pbkdf2iters 350000 -
zroot/data/home encryptionroot zroot -
zroot/data/home keystatus available -
zroot/data/home special_small_blocks 0 default
zroot/data/home prefetch all default
Its pool:
[root@sysrescue /tmp/x]# zpool get all zroot
NAME PROPERTY VALUE SOURCE
zroot size 887G -
zroot capacity 94% -
zroot altroot - default
zroot health ONLINE -
zroot guid 5900436512089678044 -
zroot version - default
zroot bootfs zroot/ROOT/default local
zroot delegation on default
zroot autoreplace off default
zroot cachefile - default
zroot failmode wait default
zroot listsnapshots off default
zroot autoexpand off default
zroot dedupratio 1.00x -
zroot free 44.5G -
zroot allocated 842G -
zroot readonly off -
zroot ashift 12 local
zroot comment - default
zroot expandsize - -
zroot freeing 0 -
zroot fragmentation 58% -
zroot leaked 0 -
zroot multihost off default
zroot checkpoint - -
zroot load_guid 18281612753199259114 -
zroot autotrim off default
zroot compatibility off default
zroot bcloneused 2.24M -
zroot bclonesaved 2.24M -
zroot bcloneratio 2.00x -
zroot feature@async_destroy enabled local
zroot feature@empty_bpobj active local
zroot feature@lz4_compress active local
zroot feature@multi_vdev_crash_dump enabled local
zroot feature@spacemap_histogram active local
zroot feature@enabled_txg active local
zroot feature@hole_birth active local
zroot feature@extensible_dataset active local
zroot feature@embedded_data active local
zroot feature@bookmarks enabled local
zroot feature@filesystem_limits enabled local
zroot feature@large_blocks active local
zroot feature@large_dnode enabled local
zroot feature@sha512 enabled local
zroot feature@skein enabled local
zroot feature@edonr enabled local
zroot feature@userobj_accounting active local
zroot feature@encryption active local
zroot feature@project_quota active local
zroot feature@device_removal enabled local
zroot feature@obsolete_counts enabled local
zroot feature@zpool_checkpoint enabled local
zroot feature@spacemap_v2 active local
zroot feature@allocation_classes enabled local
zroot feature@resilver_defer enabled local
zroot feature@bookmark_v2 enabled local
zroot feature@redaction_bookmarks enabled local
zroot feature@redacted_datasets enabled local
zroot feature@bookmark_written enabled local
zroot feature@log_spacemap active local
zroot feature@livelist enabled local
zroot feature@device_rebuild enabled local
zroot feature@zstd_compress active local
zroot feature@draid enabled local
zroot feature@zilsaxattr active local
zroot feature@head_errlog active local
zroot feature@blake3 enabled local
zroot feature@block_cloning active local
zroot feature@vdev_zaps_v2 active local
Then I backed up this dataset into another dataset... on the same pool... (tar -I 'zstd -15 --long -T12' /m/el/r/home.tar.zst /home) successfully.
Then I tried to use zsh under my user, but zsh tried to overwrite a file using mv, the result is bad: ps aux: 1000 40360 0.0 0.0 26600 764 pts/7 D+ 15:34 0:00 mv -f /home/arzeth/.zcompdump-sysrescue-5.9.0.1-dev.sysrescue.59 /home/arzeth/.zcompdump-sysrescue-5.9.0.1-dev
BTW, even after a panic occurs, I can still use other datasets in this pool (without rebooting).
I had 2 datasets inside this dataset, so I made another experiment: despite ZFS already having had a panic, I tried to move it out of ..../home/ (I am not talking about mountpoint): zfs rename zroot/data/home{/,_}arzeth_dev, and got a very similar message in dmesg. After the panic, I didn't reboot, and I ran zfs list which showed that the dataset renaming succeeded (even though zfs rename .... became a zombie process).
Then I tried to rename another inner (child) dataset (without rebooting), but this time I saw no changes in zfs list, so I've rebooted, ran zfs list again just in case (the first renaming did indeed succeed). I haven't tried yet to zfs rename this remaining inner dataset again.
Panic does not occur when creating folders and moving files into them (in this corrupted dataset).
So what should I do?
Try zfs destroy zroot/data/home, but what if this irreversibly corrupts the pool due to a panic in the middle of the process?
Recreate the pool (back up everything, zpool destroy zroot, zpool create, zfs create, cp, cp, cp)
Something else?
Maybe also ban PREEMPT_RT in configure.ac, just like recent 410287f banned unsupported kernel versions?
The text was updated successfully, but these errors were encountered:
I would start from memory check, considering it is non-ECC, to not cause more damage if it is the cause. Then make sure you have a backup, which is on your second option already. Then I would guess you should have a good chance to destroy only the specific dataset, since the ZAP it crashed on is dataset-specific, but it is difficult to be sure without knowing what's wrong about it exactly.
System information
grub options:
nospectre_v2 split_lock_mitigate=0 zfs.spa_slop_shift=6 zfs.zfs_dmu_offset_next_sync=0 zfs.zfs_txg_timeout=20 zfs.zio_taskq_batch_pct=42 zfs.zfs_arc_max=1610612736 nvme.max_host_mem_size_mb=256 scsi_mod.use_blk_mq=1
(I read somewherezfs_dmu_offset_next_sync=0
supposedly decreases the chance of corruption;txg_timeout
is because the constant noise of my Seagate Skyhawk HDD was unbearable;zio_taskq_batch_pct
is to avoid my PC becoming unresponsive during heavy writing to datasets withcompression=zstd-19
; I limited ARC size to 1.5GiB to save RAM)I've been using this config (I mean an RT kernel) since 2024-12-15, i.e. for 23 days. It worked until today, except that waking up didn't succeed in most cases (complete lock-up). Probably nvidia's driver at fault (since they don't support RT officially)?... no idea. Lock-ups occurred also in random times but after many hours of uptime. A few times, immediately after some of successful wake-ups, I saw ZFS-related traces mentioning something
txg
,unlock
; but I ignored them......My pools:
zroot
;all have
ashift 12
, and properly aligned partitions.So, 2 days ago I was seeding torrents (using files on the HDD), and then I decided to load up an LLM (8 GB .gguf file on an unencrypted partition on the SSD; llama.cpp), and during the loading, my PC suddenly became fully unresponsive (even no SSH and alt+print+b). At that moment what was happening:
mmap
ing) on an SSD (poolzroot
, unencrypted datasetzroot/data/m/c/rseq
without compression) by llama.cppzroot
, encrypted datasetzroot/data/home
) by qBittorrent (metadata), Firefox.I found the timing of the lock-up suspicious, so today I decided to repeat the same scenario. This time the LLM did get fully loaded (in ~28 secs), but... 5 seconds later my PC became unresponsive again (it's like there is some connection to
zfs.zfs_txg_timeout=20
).I rebooted my PC, selected the stock LTS kernel, then I saw:
Afterwards, I booted from a LiveCD (even earlier kernel:
Linux sysrescue 6.1.53-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 09:32:00 +0000 x86_64 GNU/Linux
), installed ZFS 2.2.7 (same latest version), mounted all pools, ranzpool scrub zroot
, thenzpool status zroot
:The bad dataset:
Its pool:
Then I backed up this dataset into another dataset... on the same pool... (
tar -I 'zstd -15 --long -T12' /m/el/r/home.tar.zst /home
) successfully.Then I tried to use
zsh
under my user, butzsh
tried to overwrite a file usingmv
, the result is bad:ps aux
:1000 40360 0.0 0.0 26600 764 pts/7 D+ 15:34 0:00 mv -f /home/arzeth/.zcompdump-sysrescue-5.9.0.1-dev.sysrescue.59 /home/arzeth/.zcompdump-sysrescue-5.9.0.1-dev
This panic causes any process (even
ls
) trying to use this dataset to become a zombie process.Then I decided to reboot (still using the livecd), because I wanted to know whether a panic would occur when deleting an old file.
So I tried
rm
a 3-year-old file (12 bytes) on this dataset. The error indmesg
is similar:BTW, even after a panic occurs, I can still use other datasets in this pool (without rebooting).
I had 2 datasets inside this dataset, so I made another experiment: despite ZFS already having had a panic, I tried to move it out of
..../home/
(I am not talking aboutmountpoint
):zfs rename zroot/data/home{/,_}arzeth_dev
, and got a very similar message indmesg
. After the panic, I didn't reboot, and I ranzfs list
which showed that the dataset renaming succeeded (even thoughzfs rename ....
became a zombie process).Then I tried to rename another inner (child) dataset (without rebooting), but this time I saw no changes in
zfs list
, so I've rebooted, ranzfs list
again just in case (the first renaming did indeed succeed). I haven't tried yet tozfs rename
this remaining inner dataset again.Panic does not occur when creating folders and moving files into them (in this corrupted dataset).
So what should I do?
zfs destroy zroot/data/home
, but what if this irreversibly corrupts the pool due to a panic in the middle of the process?zpool destroy zroot
,zpool create
,zfs create
,cp
,cp
,cp
)Maybe also ban PREEMPT_RT in
configure.ac
, just like recent 410287f banned unsupported kernel versions?The text was updated successfully, but these errors were encountered: