DF-3111 / fix_run_stage1.log
+ umount /mnt
+ true
+ vnconfig -u vn0
+ true
+ rm -f /root/h1.img
+ dd 'of=/root/h1.img' 'bs=1m' 'count=0' 'seek=4096' 'status=none'
+ vnconfig -c vn0 /root/h1.img
+ newfs_hammer -f -L poison /dev/vn0
Volume 0 DEVICE /dev/vn0 size 4.00GB
initialize freemap volume 0
initializing the undo map (512 MB)
---------------------------------------------
HAMMER version 7
1 volume total size 4.00GB
root-volume: /dev/vn0
boot-area-size: 32.00KB
memory-log-size: 256.00KB
undo-buffer-size: 0.50GB
total-pre-allocated: 0.52GB
fsid: f374cf4c-a9ec-11f1-b526-010000000000
NOTE: Please remember that you may have to manually set up a
cron(8) job to prune and reblock the filesystem regularly.
By default, the system automatically runs 'hammer cleanup'
on a nightly basis. The periodic.conf(5) variable
'daily_clean_hammer_enable' can be unset to disable this.
Also see 'man hammer' and 'man HAMMER' for more information.
WARNING: The minimum UNDO/REDO FIFO is 0.50GB, you really should not
try to format a HAMMER filesystem this small.
WARNING: HAMMER filesystems less than 50GB are not recommended!
You may have to run 'hammer prune-everything' and 'hammer reblock'
quite often, even if using a nohistory mount.
+ mount_hammer /dev/vn0 /mnt
+ hammer version /mnt
min=1 wip=none max=7 current=7 description="Use ISCSI CRC (faster than original crc32)"
available versions:
1 NORM First HAMMER release (DragonFly 2.0+)
2 NORM New directory entry layout (DragonFly 2.3+)
3 NORM New snapshot management (DragonFly 2.5+)
4 NORM New undo/flush, faster flush/sync (DragonFly 2.5+)
5 NORM Adjustments for dedup support (DragonFly 2.9+)
6 NORM Directory Hash ALG1 (tmp/rename resistance)
7 NORM Use ISCSI CRC (faster than original crc32)
+ mkdir -p /mnt/t
+ chmod 1777 /mnt/t
+ sync
+ echo '===== STAGE 1: unprivileged trigger (create pair, attempt unlink) ====='
+ /root/trig /mnt/t
===== STAGE 1: unprivileged trigger (create pair, attempt unlink) =====
[running as uid=65534 gid=65534 in /mnt/t]
[solver: 1722 wrap-zone names; identical-key pair selected]
nameA(created 1st, keeps K) key=7fffffffff180000 len=11 bytes=6161616146712e0702dfbf
nameB(created 2nd, K+1) key=7fffffffff180000 len=11 bytes=61616c6a33712e0a09aabf
key_end (K+max_iterations) = 800000000017ffff wrapped=YES(negative)
create nameA : OK
create nameB : OK (create-time collision bump -> K+1)
stat nameB : OK (positive namecache may mask; see recheck)
unlink nameB : OK
readdir nameB cnt : 0
RESULT: NOT-REPRODUCED
NEXT: remount the fs, then run recheck for the durable proof
TRIG_RC=1
===== STAGE 2: flush + unmount + remount (cold namecache, on-disk state) =====
+ echo 'TRIG_RC=1'
+ echo '===== STAGE 2: flush + unmount + remount (cold namecache, on-disk state) ====='
+ sync
+ sleep 8
+ sync
+ umount /mnt
+ mount_hammer /dev/vn0 /mnt
REMOUNT_OK
===== STAGE 3: durable manifestation =====
+ echo REMOUNT_OK
+ echo '===== STAGE 3: durable manifestation ====='
+ /root/recheck /mnt/t
[after remount, uid=65534, dir=/mnt/t]
nameA key=7fffffffff180000 len=11 bytes=6161616146712e0702dfbf
nameB key=7fffffffff180000 len=11 bytes=61616c6a33712e0a09aabf
persist stat nameA : OK
persist stat nameB : No such file or directory <-- POISONED (dirent exists on disk)
persist readdir nameB: 0
persist unlink nameB : No such file or directory <-- UNREMOVABLE
after 5 re-creates : readdir nameB cnt = 1 (was 0) <-- LEAK: one more unremovable dirent+inode each
PERSIST_UNCLEAR LEAK_CONFIRMED
RECHECK_RC=0
+ echo 'RECHECK_RC=0'
+ ls -la /mnt/t
total 0
drwxrwxrwt 1 root wheel 0 Sep 6 12:17 .
drwxr-xr-x 1 root wheel 0 Sep 6 12:17 ..
-rw-r--r-- 1 nobody wheel 0 Sep 6 12:17 aaaaFq.߿
-rw-r--r-- 1 nobody wheel 0 Sep 6 12:17 aalj3q.
��
Filesystem Size Used Avail Capacity Mounted on
poison 3560M 225M 3335M 6% /mnt
+ df -h /mnt
+ sync
RUN_DONE
+ echo RUN_DONE