Created attachment 248309 [details] crash screenshot My system was hung because the kernel failed to panic after / was forcibly unmounted due to an I/O error. There is code in ffs_fsfail_cleanup_locked to panic in this case. It did not work. The system kept running but processes crashed as they tried to page in from the bad disk. Key lines below. See attached screenshot for more. There are no log messages because /var/log/messages is on the bad disk. I am running a stable/13 kernel ("13.3-STABLE") on an old amd64 system. g_vfs_done():ada0p2[WRITE(offset=1392508928, length=20480)]error=6 UFS: forcibly unmounting /dev/ada0p2 from / swap_pager: I/O error - pagein failed
Until init is killed, the system is going to stay on.
(In reply to Konstantin Belousov from comment #1) There is code to panic when / is unmounted: if (ump->um_mountp == rootvnode->v_mount) panic("UFS: root fs would be forcibly unmounted"); It didn't trigger on my system because the panic is only in 14.0 and newer. So this bug report is a request to merge 60a41168d195cc09f7351c2c2bcafc389ed52406 to stable/13.
^Triage: over to committer of 60a41168d195cc09f7351c2c2bcafc389ed52406 for possible MFC.
Over to actual committer of 60a41168d195cc09f7351c2c2bcafc389ed52406
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=083608e4669e0eb3d31d4e7d9ced00ae822807e6 commit 083608e4669e0eb3d31d4e7d9ced00ae822807e6 Author: Chuck Silvers <chs@FreeBSD.org> AuthorDate: 2023-08-10 16:55:47 +0000 Commit: Chuck Silvers <chs@FreeBSD.org> CommitDate: 2024-03-20 20:25:49 +0000 UFS: panic rather than forcibly unmount the root fs If the root fs is forcibly unmounted then basically every process will die with a SEGV as soon as it tries to run again because libc.so is gone, which leaves the system basically hung. It seems better to just panic instead, so let's do that. PR: 276944 Requested-by: karels Reviewed-by: imp, mckusick, karels Sponsored-by: Netflix Differential Revision: https://reviews.freebsd.org/D41387 (cherry picked from commit 60a41168d195cc09f7351c2c2bcafc389ed52406) sys/ufs/ffs/ffs_vfsops.c | 3 +++ 1 file changed, 3 insertions(+)
MFC'd to stable/13 today.