Bug 92272 - [ffs] [hang] Filling a filesystem while creating a snapshot on it locks the system
Summary: [ffs] [hang] Filling a filesystem while creating a snapshot on it locks the s...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-24 16:40 UTC by John Kozubik
Modified: 2018-01-03 05:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Kozubik 2006-01-24 16:40:05 UTC
If a filesystem is completely full (approaching 110% in `df` output on
most systems), mksnap_ffs will refuse to begin a snapshot for that reason.
There seem to be no negative consequences.

However, if the filesystem is not quite completely full, mksnap_ffs will
(correctly) begin creating the snapshot as expected.  If, during the course
of snapshot creation, the filesystem being snapshotted becomes full,
mksnap_ffs will exit with an error exactly as it does if it is started on
an already full filesystem.

However, several hours later, the system will lock up completely.  It still
responds to pings, and open connections to and from it remain in that
state, but they cannot be used and new connections cannot be established.

Fix: 

Do not fill a filesystem completely while snapshots are being created on
that filesystem.
How-To-Repeat: dd, or otherwise fill a filesystem, until it is not quite full - 108% or
so, as shown in the output of `df`.  Then, in one terminal, prepare a
mksnap_ffs command line that will create a snapshot on the filesystem,
and in another terminal create a dd line that will more than fill up the
filesystem.

First, start the mksnap_ffs process, and then immediately start the dd
process.  Both processes will eventually exit complaining of a full filesystem.

If the filesystem became full after the snapshot was initiated, but before
it could complete successfully, the system will lock up several (sometimes
as long as 12-15) hours later.

I suggest doing this test on a large filesystem (several hundreds of
gigabytes) because snapshots take longer to create on such filesystems
and it will be easier to fill it to capacity with dd before the snapshot
completes itself.

I have repeated this problem on two different systems, each with 380
Gigabyte filesystems.
Comment 1 Bruce Cran freebsd_committer freebsd_triage 2009-03-28 23:30:32 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:27 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped