Bug 163310 - Panics, sudden reboots and file system corrupts with snapshots on SU+J
Summary: Panics, sudden reboots and file system corrupts with snapshots on SU+J
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-15 10:30 UTC by yamagi
Modified: 2017-12-31 22:32 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 yamagi 2011-12-15 10:30:11 UTC
There are still a lot of strange things happening when create and / or removing ufs snapshots on filesystems with SU+J. While investigating random panics while creating snapshots I experienced:

- Deadlocks, freezing the whole system or just any file system activity. Sometime the kernel prints messages like "fsync: giving up on dirty"

- Random panics with different panic strings like "panic: snapacct_ufs2: bad block" or the generic "panic: page fault while in kernel mode". The backtraces were different too.

- Sudden reboots.

- Corrupted filesystems, only repairable by two or more consecutive runs of "fsck -y" in single user mode.

Non of the problems arise when using normal softupdates without journaling. This problems can be seen on several machines and even in VirtualBox, so hardware failure can be ruled out. Looks like some race condition somewhere in the ufs or snapshot code. Further debug information - including file system images - can be provided if necessary.

Fix: 

Non. Smells like a race condition or something like that.
How-To-Repeat: % mount
/dev/ada0p2 on / (ufs, local, journaled soft-updates)

# create some load
% cp -r /usr/src /tmp

# Switch to another tty and create a snapshot
% mksnap_ffs / /.snap/foo1

Repeat this until the box crashes.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:47 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