Bug 656465 - Systemd and kernel crash after mounting btrfs subvolume disc
Summary: Systemd and kernel crash after mounting btrfs subvolume disc
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Ian Kent
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 660015 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-23 19:44 UTC by Vaclav "sHINOBI" Misek
Modified: 2010-12-22 19:53 UTC (History)
14 users (show)

Fixed In Version: kernel-2.6.35.10-72.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-22 19:53:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Screenshot of systemd crash #1 (227.08 KB, image/jpeg)
2010-11-23 19:44 UTC, Vaclav "sHINOBI" Misek
no flags Details
Screenshot of systemd crash #2 (274.30 KB, image/jpeg)
2010-11-23 19:45 UTC, Vaclav "sHINOBI" Misek
no flags Details
Screenshot of systemd crash #3 (225.69 KB, image/jpeg)
2010-11-23 19:45 UTC, Vaclav "sHINOBI" Misek
no flags Details
Patch - fix error handling in btrfs_get_sb() (1.78 KB, patch)
2010-11-29 02:14 UTC, Ian Kent
no flags Details | Diff
Patch - setup blank root and fs_info for mount time (4.42 KB, patch)
2010-11-29 02:15 UTC, Ian Kent
no flags Details | Diff
Patch - fix race between btrfs_get_sb() and umount (1.04 KB, patch)
2010-11-29 02:17 UTC, Ian Kent
no flags Details | Diff
Crash pulling mounted USB drive (4.84 KB, text/plain)
2010-12-12 01:15 UTC, Ralph Loader
no flags Details

Description Vaclav "sHINOBI" Misek 2010-11-23 19:44:11 UTC
Created attachment 462425 [details]
Screenshot of systemd crash #1

Description of problem:
When I try to boot my system with my disc which includes btrfs subvols, the systemd and then kernel crashes. The two traces are included at screenshots.

Version-Release number of selected component (if applicable):
systemd-13-1.fc15.x86_64
kernel-2.6.36.1-7.rc1.fc15.x86_64

How reproducible:
relevant part of the /etc/fstab
UUID=00053a82-4d2d-4f28-b576-ac614be9bae6 /home/media             btrfs    defaults,subvol=home_media        1 1
UUID=00053a82-4d2d-4f28-b576-ac614be9bae6 /usr/local/games        btrfs    defaults,subvol=games        1 1


Steps to Reproduce:
1. start system with above mentioned disc
2. crash of systemd and later kernel
3.

Comment 1 Vaclav "sHINOBI" Misek 2010-11-23 19:45:07 UTC
Created attachment 462426 [details]
Screenshot of systemd crash #2

Comment 2 Vaclav "sHINOBI" Misek 2010-11-23 19:45:40 UTC
Created attachment 462428 [details]
Screenshot of systemd crash #3

Comment 3 Vaclav "sHINOBI" Misek 2010-11-23 19:47:53 UTC
I forgot to add that the system boots correctly when init=/sbin/upstart is set or the disc is powered down. Whe system boots, there is no problem to use mount -a to mount it.

Comment 4 Michal Schmidt 2010-11-24 06:24:03 UTC
systemd merely exposes a btrfs bug here.
The first trace is the same as in:
https://bugzilla.redhat.com/show_bug.cgi?id=650261#c17
Ian Kent seems to be working on it and has posted a kernel to test.

*** This bug has been marked as a duplicate of bug 650261 ***

Comment 5 Vaclav "sHINOBI" Misek 2010-11-27 21:49:46 UTC
According to the request from Ian, I reopened it for rawhide kernel and changed component to the kernel.

Comment 6 Ian Kent 2010-11-29 00:27:51 UTC
Looking at the screen shots this may be the same issue but I can't
be sure. I can prepare patches for our Rawhide kernel so we can test
it but Josef hasn't finalized the upstream submission yet so we will
need to wait a bit longer before we consider requesting they be
included in a release kernel.

Comment 7 Ian Kent 2010-11-29 02:14:23 UTC
Created attachment 463405 [details]
Patch - fix error handling in btrfs_get_sb()

It seems 2.6.36 is closer to 2.6.35 than I thought for
btrfs. This patch must have gone into 2.6.37 so it is
still needed in Rawhide for the moment.

Comment 8 Ian Kent 2010-11-29 02:15:59 UTC
Created attachment 463406 [details]
Patch - setup blank root and fs_info for mount time

I've tried to make this as close to what I think Josef
will post upstream.

Comment 9 Ian Kent 2010-11-29 02:17:10 UTC
Created attachment 463407 [details]
Patch - fix race between btrfs_get_sb() and umount

The evidence shows we need this too.

Comment 10 Ian Kent 2010-11-29 03:32:31 UTC
Can you give this kernel a try please:
http://people.redhat.com/~ikent/kernel-2.6.36.1-9.bz656465.1

Comment 11 Vaclav "sHINOBI" Misek 2010-11-29 16:57:49 UTC
This kernel fixes the bug for me and I haven't noticed any negative effects during brief testing.

Comment 12 Kyle McMartin 2010-12-09 23:22:12 UTC
Ian, should we merge this patch?

Comment 13 Kyle McMartin 2010-12-10 00:23:52 UTC
*** Bug 660015 has been marked as a duplicate of this bug. ***

Comment 14 Ian Kent 2010-12-10 13:38:44 UTC
(In reply to comment #12)
> Ian, should we merge this patch?

Yes, I think so.
Anyone who tested this found these patches fix the problem.
The changes have gone upstream, except for a corner case
potential memory leak.

Comment 15 Kyle McMartin 2010-12-10 15:04:44 UTC
OK, rawhide is now on 2.6.37-rc5, so these bugs are fixed there. I'll grab the fixes for the other releases (which should be going to .36 as soon as I get a bit of time...)

Comment 16 Kyle McMartin 2010-12-10 15:28:23 UTC
Ok, got the fixes for F-14. Thanks for debugging this, Ian.

Comment 17 Ralph Loader 2010-12-12 01:15:53 UTC
Created attachment 468182 [details]
Crash pulling mounted USB drive

The kernel-2.6.36.1-9.bz656465.1 no longer crashes on mount for me, but it now crashes if I remove a USB hard-drive while mounted and then attempt a manual unmount.

Comment 18 Ian Kent 2010-12-13 01:52:01 UTC
(In reply to comment #17)
> Created attachment 468182 [details]
> Crash pulling mounted USB drive
> 
> The kernel-2.6.36.1-9.bz656465.1 no longer crashes on mount for me, but it now
> crashes if I remove a USB hard-drive while mounted and then attempt a manual
> unmount.

We don't want to confuse matters.

The trace shows fairly clearly this is a different bug so I'm
not going to complicate matters by now starting to wrk on that.
The problem is that if we just continue on solving one bug after
another in the same report we end up not getting any fixes pushed
out.

Please open another bug for this.

Comment 19 Ralph Loader 2010-12-13 05:12:00 UTC
Comment on attachment 468182 [details]
Crash pulling mounted USB drive

> Please open another bug for this.

Done - bug 662547

Comment 20 Vaclav "sHINOBI" Misek 2010-12-13 08:04:24 UTC
I can confirm that rawhide kernel 2.6.37-0.rc5.git2.1.fc15.x86_64 fixes the bug for me. Should we close it?

Comment 21 Ian Kent 2010-12-13 12:44:07 UTC
(In reply to comment #20)
> I can confirm that rawhide kernel 2.6.37-0.rc5.git2.1.fc15.x86_64 fixes the bug
> for me. Should we close it?

Yes, I think so.
We probably should leave it open a little while longer for
people to find when looking. Making it MODIFIED hopefully
won't won't make it harder to find and indicates the change
has been applied.

Comment 22 Fedora Update System 2010-12-17 15:10:53 UTC
kernel-2.6.35.10-68.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/kernel-2.6.35.10-68.fc14

Comment 23 Fedora Update System 2010-12-19 23:57:13 UTC
kernel-2.6.35.10-69.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/kernel-2.6.35.10-69.fc14

Comment 24 Fedora Update System 2010-12-21 13:55:49 UTC
kernel-2.6.35.10-72.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/kernel-2.6.35.10-72.fc14

Comment 25 Fedora Update System 2010-12-22 00:04:06 UTC
kernel-2.6.35.10-72.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kernel'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/kernel-2.6.35.10-72.fc14

Comment 26 Fedora Update System 2010-12-22 19:52:26 UTC
kernel-2.6.35.10-72.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.