Date: Wed, 04 May 2022 00:44:28 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 263765] panic: ffs_sync: modification on read-only filesystem Message-ID: <bug-263765-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263765 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 whil= e it consistently panics during boot, while upgrading the read-only root mount to read-write: Trying to mount root from ufs:gpt/rootfs [rw]...=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 WARNING: / was not properly dismounted=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 WARNING: /: mount pending error: blocks 367136 files 5=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 No suitable dump device was found.=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 Setting hostuuid: 4ff7a735-851c-7030-87f0-cf2c2b9ef44e.=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 Setting hostid: 0x1c981ebb.=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 Starting file system checks:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 WARNING: / was not properly dismounted=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 panic: /: ffs_sync: modification on read-only filesystem=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 cpuid =3D 1=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 time =3D 1651623448=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 KDB: stack backtrace:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe007a140= 750=20=20 vpanic() at vpanic+0x17f/frame 0xfffffe007a1407a0=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 panic() at panic+0x43/frame 0xfffffe007a140800=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ffs_sync() at ffs_sync+0x6e6/frame 0xfffffe007a1408a0=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 vfs_write_suspend() at vfs_write_suspend+0x165/frame 0xfffffe007a1408f0=20= =20=20=20=20=20=20=20=20 vfs_write_suspend_umnt() at vfs_write_suspend_umnt+0x35/frame 0xfffffe007a140920 ffs_mount() at ffs_mount+0xa2b/frame 0xfffffe007a140a70=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 vfs_domount_update() at vfs_domount_update+0x277/frame 0xfffffe007a140bf0= =20=20=20=20=20=20=20 vfs_domount() at vfs_domount+0x26b/frame 0xfffffe007a140d20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 vfs_donmount() at vfs_donmount+0x878/frame 0xfffffe007a140dc0=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 sys_nmount() at sys_nmount+0x69/frame 0xfffffe007a140e00=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe007a140f30=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe007a140f30= =20=20=20=20=20=20 --- syscall (378, FreeBSD ELF64, sys_nmount), rip =3D 0x28658b33e3da, rsp = =3D 0x286588ae7e38, rbp =3D 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=20 Running fsck from single-user mode fixed the problem, but it reappeared sev= eral 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 he= lp narrow down the problem. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263765-227>