Bug 662547

Summary: Kernel crash after removing mounted btrfs drive.
Product: [Fedora] Fedora Reporter: Ralph Loader <suckfish>
Component: kernelAssignee: Ian Kent <ikent>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dougsland, gansalmon, ikent, itamar, jbacik, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 21:55:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Kernel backtrace. none

Description Ralph Loader 2010-12-13 05:09:58 UTC
Created attachment 468301 [details]
Kernel backtrace.

With a USB drive with several mounted btrfs filesystems.

Remove the drive (without unmounting the filesystems) and then attempt to umount the filesystems manually.

Result is a kernel BUG, X appears to exit immediately, and the system does not respond to keyboard.

This is with the kernel from bug 656465 (kernel-2.6.36.1-9.bz656465.1.fc15.x86_64).  I haven't tested with earlier kernels, due to bug 656465 making it impossible to mount the drive with earlier kernels...

Comment 1 Ian Kent 2010-12-13 12:46:30 UTC
I'll have a look at this one, soon as I get a chance.

Comment 2 Ian Kent 2010-12-15 03:30:49 UTC
(In reply to comment #1)
> I'll have a look at this one, soon as I get a chance.

This is rather interesting.

AFAICT this is due to btrfs not being able to write the device
super block(s) prior to umount, the implication being that the
file system is possibly corrupt, which is no surprise.

I guess the problem is that if we can't do anything to the device
then we can't umount or re-mount it and later find out if it's
corrupt and possibly repair it.

Josef, my first thought is that this would be a case where we
would want to mark the fs read only and return success to allow
a umount, what do you think?

Comment 3 Fedora End Of Life 2012-08-16 21:55:18 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping