Bug 1112874

Summary: [abrt] btrfs-progs: __free_extent(): btrfsck killed by SIGABRT
Product: [Fedora] Fedora Reporter: Spenk <henk.spaan>
Component: btrfs-progsAssignee: Josef Bacik <josef>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: esandeen, josef, mmahut, sweil
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/258ec6b82aadb94b4cc186008ba94b75a035d467
Whiteboard: abrt_hash:386bfb275c9907a3c7408f5e3e63172bb772c2cc
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-29 21:18:38 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
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages none

Description Spenk 2014-06-24 22:13:22 UTC
Description of problem:
Probably my backup fedora installation on btrfs was messed up by using hard resets.
Nevertheless the partition was still accessible apart from an occasional readonly filesystem when booting.

I decided to shrink the partition, which failed on the checking the partition.
After this I 
- tried to repair which did not succeed.
- tried --init-extent-tree, which flooded my console with messages like:
	Backref 1102512128 parent 256 root 256 not found in extent tree
	backpointer mismatch on [1102512128 16384]	
	owner ref check failed [1102512128 16384]
	ref mismatch on [1102643200 16384] extent item 0, found 1
	adding new tree backref on start 1102643200 len 16384 parent 256 root 256
	Backref 1102643200 parent 256 root 256 not found in extent tree
	backpointer mismatch on [1102643200 16384]
	owner ref check failed [1102643200 16384]
	repaired damaged extent references
- repeated this command two times
- tried --init-extent-tree --init-csum-tree which failed
- tried --init-csum-tree alone, which caused this report to be collected

Version-Release number of selected component:
btrfs-progs-3.14.2-3.fc20

Additional info:
reporter:       libreport-2.2.2
backtrace_rating: 4
cmdline:        btrfsck --init-csum-tree /dev/sdc3
crash_function: __free_extent
executable:     /usr/sbin/btrfsck
kernel:         3.14.8-200.fc20.x86_64
runlevel:       N 5
type:           CCpp
uid:            0

Truncated backtrace:
Thread no. 1 (8 frames)
 #4 __free_extent at extent-tree.c:2335
 #5 btrfs_free_extent at extent-tree.c:2501
 #6 __btrfs_cow_block at ctree.c:305
 #7 btrfs_cow_block at ctree.c:369
 #8 commit_tree_roots at disk-io.c:428
 #9 btrfs_commit_transaction at disk-io.c:492
 #10 check_chunks_and_extents at cmds-check.c:5896
 #11 cmd_check at cmds-check.c:6581

Comment 1 Spenk 2014-06-24 22:13:26 UTC
Created attachment 911889 [details]
File: backtrace

Comment 2 Spenk 2014-06-24 22:13:28 UTC
Created attachment 911890 [details]
File: cgroup

Comment 3 Spenk 2014-06-24 22:13:30 UTC
Created attachment 911891 [details]
File: core_backtrace

Comment 4 Spenk 2014-06-24 22:13:32 UTC
Created attachment 911892 [details]
File: dso_list

Comment 5 Spenk 2014-06-24 22:13:34 UTC
Created attachment 911893 [details]
File: environ

Comment 6 Spenk 2014-06-24 22:13:37 UTC
Created attachment 911894 [details]
File: limits

Comment 7 Spenk 2014-06-24 22:13:39 UTC
Created attachment 911895 [details]
File: maps

Comment 8 Spenk 2014-06-24 22:13:41 UTC
Created attachment 911896 [details]
File: open_fds

Comment 9 Spenk 2014-06-24 22:13:43 UTC
Created attachment 911897 [details]
File: proc_pid_status

Comment 10 Spenk 2014-06-24 22:13:45 UTC
Created attachment 911898 [details]
File: var_log_messages

Comment 11 Zach Brown 2014-06-24 22:41:48 UTC
>  #4 __free_extent at extent-tree.c:2335

> Created attachment 911889 [details]
> File: backtrace

#3  0x0000003b2e82ec42 in __GI___assert_fail (assertion=assertion@entry=0x458fd0 "!(owner_objectid != btrfs_tree_block_level(leaf, bi))", file=file@entry=0x45910d "extent-tree.c", line=line@entry=2335, function=function@entry=0x459447 <__PRETTY_FUNCTION__.8874> "__free_extent") at assert.c:101

This comes from the WARN_ON() in:

        if (owner_objectid < BTRFS_FIRST_FREE_OBJECTID &&
            key.type == BTRFS_EXTENT_ITEM_KEY) {
                struct btrfs_tree_block_info *bi;
                BUG_ON(item_size < sizeof(*ei) + sizeof(*bi));
                bi = (struct btrfs_tree_block_info *)(ei + 1);
                WARN_ON(owner_objectid != btrfs_tree_block_level(leaf, bi));
        }

Which comes from the depth of time in btrfs-progs and is still present upstream.

commit 95d3f20b51e9b2ee21822313ad4f31279396407b
Author: Chris Mason <chris.mason>
Date:   Fri May 29 16:35:30 2009 -0400

    Mixed back reference  (FORWARD ROLLING FORMAT CHANGE)

It's a simple on-disk inconsistency (the caller's owner of the ref doesn't match what's on disk) that causes fsck to explode.  Those playing along at home can be forgiven for confusing WARN_ON() with something that issues a warning.  It's a hard assertion.

$ grep _ON kerncompat.h 
#define BUG_ON(c) assert(!(c))
#define WARN_ON(c) assert(!(c))

Comment 12 Spenk 2014-06-25 10:22:16 UTC
Hmm,

Trying to scrub also results in a report, but I've got a tainted kernel (nvidia), so I can report using the reporting tool.
After the report the process still seems to be running though and the cancel command keeps hanging without a response.

After reboot, the process seems to kill after five kerneloops according to cancel command, but running state is not cleared as the process according to the start command.

I'll wait for version 3.15 to appear in updates.

Comment 13 Fedora End Of Life 2015-05-29 12:12:44 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is 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  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

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.

Comment 14 Fedora End Of Life 2015-06-29 21:18:38 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.