kern/163310: Panics, sudden reboots and file system corrupts with snapshots on SU+J

Yamagi Burmeister yamagi at yamagi.org
Thu Dec 15 10:30:12 UTC 2011


>Number:         163310
>Category:       kern
>Synopsis:       Panics, sudden reboots and file system corrupts with snapshots on SU+J
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 15 10:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Yamagi Burmeister
>Release:        FreeBSD 9.0-RC3, r228526
>Organization:
>Environment:
FreeBSD vbox.happy.home.yamagi.org 9.0-RC3 FreeBSD 9.0-RC3 #0 r228526: Thu Dec 15 10:19:23 CET 2011     root at vbox.happy.home.yamagi.org:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
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.
>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.
>Fix:
Non. Smells like a race condition or something like that.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list