[Bug 263765] panic: ffs_sync: modification on read-only filesystem
Date: Wed, 04 May 2022 00:44:28 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263765
Bug ID: 263765
Summary: panic: ffs_sync: modification on read-only filesystem
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: markj@FreeBSD.org
I was using a VM to test some code and crashed it many times. After a while it
consistently panics during boot, while upgrading the read-only root mount to
read-write:
Trying to mount root from ufs:gpt/rootfs [rw]...
WARNING: / was not properly dismounted
WARNING: /: mount pending error: blocks 367136 files 5
No suitable dump device was found.
Setting hostuuid: 4ff7a735-851c-7030-87f0-cf2c2b9ef44e.
Setting hostid: 0x1c981ebb.
Starting file system checks:
WARNING: / was not properly dismounted
panic: /: ffs_sync: modification on read-only filesystem
cpuid = 1
time = 1651623448
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe007a140750
vpanic() at vpanic+0x17f/frame 0xfffffe007a1407a0
panic() at panic+0x43/frame 0xfffffe007a140800
ffs_sync() at ffs_sync+0x6e6/frame 0xfffffe007a1408a0
vfs_write_suspend() at vfs_write_suspend+0x165/frame 0xfffffe007a1408f0
vfs_write_suspend_umnt() at vfs_write_suspend_umnt+0x35/frame
0xfffffe007a140920
ffs_mount() at ffs_mount+0xa2b/frame 0xfffffe007a140a70
vfs_domount_update() at vfs_domount_update+0x277/frame 0xfffffe007a140bf0
vfs_domount() at vfs_domount+0x26b/frame 0xfffffe007a140d20
vfs_donmount() at vfs_donmount+0x878/frame 0xfffffe007a140dc0
sys_nmount() at sys_nmount+0x69/frame 0xfffffe007a140e00
amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe007a140f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe007a140f30
--- syscall (378, FreeBSD ELF64, sys_nmount), rip = 0x28658b33e3da, rsp =
0x286588ae7e38, rbp = 0x286588ae83a0 ---
The problem appears to be that the fmod flag in the superblock got set,
somehow:
magic 19540119 (UFS2)
last mounted time Mon May 2 21:00:40 2022
last modified time Mon May 2 21:00:52 2022
superblock location 65536 id [ 62658b45 0a5e546e ]
ncg 82 size 13107200 blocks 12694551
bsize 32768 shift 15 mask 0xffff8000
fsize 4096 shift 12 mask 0xfffff000
frag 8 shift 3 fsbtodb 3
minfree 8% optim time symlinklen 120
maxbsize 32768 maxbpg 8192 maxcontig 2 contigsumsize 2
nbfree 1377660 ndir 4007 nifree 6527315 nffree 6053
bpg 20042 fpg 160336 ipg 80256 unrefs 0
nindir 4096 inopb 128 maxfilesize 2252349704110079
sbsize 4096 cgsize 32768 csaddr 5056 cssize 4096
sblkno 24 cblkno 32 iblkno 40 dblkno 5056
cgrotor 7 fmod 1 ronly 0 clean 0
metaspace 0 avgfpdir 64 avgfilesize 16384
flags unclean soft-updates
Running fsck from single-user mode fixed the problem, but it reappeared several
times.
I'm not really sure how fmod can end up set; it looks like it's cleared any
time FFS updates the superblock. (But then why is it in the superblock at
all?)
I don't appear to have checksums enabled here, maybe enabling them would help
narrow down the problem.
--
You are receiving this mail because:
You are the assignee for the bug.