Bug 224347 - Boot erroneously mounts severely damaged ufs file system
Summary: Boot erroneously mounts severely damaged ufs file system
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-14 19:07 UTC by freebsd
Modified: 2021-10-05 20:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2017-12-14 19:07:58 UTC
If a non-system ufs file system is severely damaged and does not pass the normal boot-time fsck -p sequence, it may still be mounted read-write and the system will boot up into multi-user mode.  This happens in spite of having background_fsck="NO" in rc.conf.  There are no messages posted to the system log, and the console boot-time errors may have scrolled beyond reach in the buffer if one logs into vt0.  After the first reboot, there are no errors related to the disk in question posted at boot-time.

This happens because the return value of checkfilesys in fsck_ffs/main.c is basically ignored.

When this condition occurs, it is 100% repeatable.  One can crash the system and it will reboot as if everything is ok; running whatever software tweaks the file system (in my case thunderbird) will always recrash the system.

See the discussion on freebsd-questions:
  Subject: Thunderbird causing system crash, need guidance
Comment 1 Piotr Pawel Stefaniak freebsd_committer freebsd_triage 2021-10-05 20:00:08 UTC
I think the problem has been fixed by this commit:
https://cgit.freebsd.org/src/commit/?id=469759f8e4bec7897f7d1802d534f8f82d36b898