Bug 1444821

Summary: "bad tree block start" message, disk switching to read-only
Product: [Fedora] Fedora Reporter: Christophe de Dinechin <dinechin>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: esandeen, gansalmon, ichavero, itamar, jonathan, josef, kernel-maint, madhu.chinakonda, mchehab, mmahut
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-12 10:13:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
dmesg output at time of latest crash. none

Description Christophe de Dinechin 2017-04-24 11:46:18 UTC
Created attachment 1273572 [details]
dmesg output at time of latest crash.

Description of problem:

Being a happy user of BTRFS on my home NAS, I've been trying to use BTRFS as my primary filesystem on a couple of Fedora 25 machines, but I'm losing faith after running several times into filesystem corruptions that manifest themselves with messages that look like this:

[525697.825951] audit: type=1131 audit(1493030444.892:5400): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[525761.195108] btree_readpage_end_io_hook: 2 callbacks suppressed
[525761.195114] BTRFS error (device sda4): bad tree block start 11022913622198796681 52432896
[525761.203698] BTRFS error (device sda4): bad tree block start 11022913622198796681 52432896
[525970.013112] ------------[ cut here ]------------
[525970.013138] WARNING: CPU: 5 PID: 471 at fs/btrfs/extent-tree.c:6938 __btrfs_free_extent.isra.58+0x7fd/0xe80 [btrfs]
[525970.013139] Modules linked in: macvtap macvlan xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_broute bridge stp llc ebtable_nat ip6table_mangle ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_security ip6table_raw iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables binfmt_misc fuse snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hda_core intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp snd_hwdep kvm_intel kvm snd_seq rc_imon_pad snd_seq_device imon snd_pcm
[525970.013199]  irqbypass crct10dif_pclmul crc32_pclmul iTCO_wdt ghash_clmulni_intel intel_cstate rc_core intel_uncore intel_rapl_perf joydev iTCO_vendor_support gpio_ich ppdev snd_timer tpm_infineon tpm_tis tpm_tis_core snd i2c_i801 soundcore mei_me mei tpm parport_pc parport shpchp lpc_ich nfsd auth_rpcgss nfs_acl lockd grace sunrpc btrfs xor raid6_pq nouveau i915 mxm_wmi wmi ttm video i2c_algo_bit drm_kms_helper drm crc32c_intel serio_raw r8169 mii fjes
[525970.013229] CPU: 5 PID: 471 Comm: btrfs-transacti Not tainted 4.10.6-200.fc25.x86_64 #1
[525970.013229] Hardware name: Gigabyte Technology Co., Ltd. Z68AP-D3/Z68AP-D3, BIOS F2 06/03/2011
[525970.013230] Call Trace:
[525970.013237]  dump_stack+0x63/0x86
[525970.013239]  __warn+0xcb/0xf0
[525970.013241]  warn_slowpath_null+0x1d/0x20
[525970.013256]  __btrfs_free_extent.isra.58+0x7fd/0xe80 [btrfs]
[525970.013272]  __btrfs_run_delayed_refs+0xae9/0x1320 [btrfs]
[525970.013275]  ? __switch_to+0x227/0x460
[525970.013290]  btrfs_run_delayed_refs+0x8f/0x2a0 [btrfs]
[525970.013308]  btrfs_commit_transaction+0x48/0x930 [btrfs]
[525970.013323]  ? start_transaction+0x99/0x460 [btrfs]
[525970.013339]  transaction_kthread+0x18c/0x1b0 [btrfs]
[525970.013342]  kthread+0x101/0x140
[525970.013357]  ? btrfs_cleanup_transaction+0x540/0x540 [btrfs]
[525970.013359]  ? kthread_park+0x90/0x90
[525970.013361]  ret_from_fork+0x2c/0x40
[525970.013363] ---[ end trace 0a5df83b37800c90 ]---
[525970.013367] BTRFS info (device sda4): leaf 232030208 total ptrs 183 free spa

Version-Release number of selected component (if applicable):

Can't fetch anymore, the system boots with read-only. However, a similar system shows

btrfs-progs.x86_64                    4.6.1-1.fc25                     @anaconda

How reproducible: Seen at least 4 times on 3 different disks and 2 different systems.

Steps to Reproduce:
1. Select BTRFS for the boot disk during Fedora 25 system install
2. Work on the disk for long enough
3. Wait until you get mysterious messages

Actual results:

System starts showing "bad tree block" messages, the disk becomes read-only. the system becomes unusable.

Expected results:

No error unless some major disk I/O error occurred. And even then, being able to detect errors is relatively unhelpful without the ability to repair them.

Additional info:

See attached log.

Comment 1 Eric Sandeen 2017-04-24 14:02:28 UTC
I would suggest reporting this to the upstream mailing list.


Comment 2 Christophe de Dinechin 2017-04-25 09:29:07 UTC
While attempting to repair the disk, I run into https://bugzilla.redhat.com/show_bug.cgi?id=1435567. See comments there for what I tried.

Comment 3 Christophe de Dinechin 2017-04-27 16:09:18 UTC
(In reply to Eric Sandeen from comment #1)
> I would suggest reporting this to the upstream mailing list.

It has been reported. https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg63526.html. Thanks.

Comment 4 Fedora End Of Life 2017-11-16 18:36:48 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. 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 '25'.

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 25 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 5 Fedora End Of Life 2017-12-12 10:13:08 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 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

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