Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 2012 06:30:20 GMT
From:      Kirk McKusick <mckusick@mckusick.com>
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/164472: [ufs] fsck -B panics on particular data inconsistency 
Message-ID:  <201202010630.q116UKZC043576@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/164472; it has been noted by GNATS.

From: Kirk McKusick <mckusick@mckusick.com>
To: eugene@zhegan.in
Cc: bug-followup@FreeBSD.org, freebsd-fs@FreeBSD.org,
        Kostik Belousov <kostikbel@gmail.com>
Subject: Re: kern/164472: [ufs] fsck -B panics on particular data inconsistency 
Date: Tue, 31 Jan 2012 22:26:43 -0800

 > From: Kostik Belousov <kostikbel@gmail.com>
 > To: bug-followup@FreeBSD.org, eugene@zhegan.in
 > Cc:  
 > Subject: Re: kern/164472: [ufs] fsck -B panics on particular data inconsistency
 > Date: Mon, 30 Jan 2012 07:30:04 +0200
 > 
 >  You failed to mention which panic you got. Was it 'dup alloc' ? A
 >  backtace would be also useful.
 > 
 >  If it was indeed 'dup alloc', then there is nothing fsck or snapshots
 >  can be accused for. Your filesystem is in inconsistent state, which
 >  requires full fsck to recover. It must be not mounted while not
 >  repaired.
 > 
 >  Somewhat more interesting is how the fs got into this state.
 
 Thanks for your report and in particular a small file image that
 demonstrates the problem. I have been able to reproduce your panic
 reliably on my test machine.
 
 Running a normal fsck on the image does indeed show that the filesystem
 has corruption that is unexpected on a filesystem running with soft
 updates. So, in the end, if the background fsck were able to run, it
 would fail and notify the system that it needed to be checked by a
 full fsck. But as you have aptly demonstrated, the background fsck
 crashes the system as it tries to take a snapshot of the filesystem
 on which to run its check.
 
 The cause of the crash is because in taking a snapshot, the filesystem
 needs to allocate an inode for the snapshot. As it turns out, the
 inode that it tries to allocate is marked free in the inode map, but
 is in fact already allocated which leads to the panic.
 
 I am still mulling over how to resolve this problem, but have not
 yet come up with one. I am looking for a solution that effectively
 will let the snapshot fail rather than crashing the system so that
 the fsck -B can then gracefully fail and lead to the full fsck as
 is needed in this case.
 
 	Kirk McKusick



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202010630.q116UKZC043576>