Bug 98051 - volume can be umounted before fs has fully flushed to disk, results in scary warning
Summary: volume can be umounted before fs has fully flushed to disk, results in scary ...
Status: RESOLVED OBSOLETE
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Josef Bacik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-11 02:48 UTC by Chris Murphy
Modified: 2022-10-04 08:40 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.0.1-300.fc22.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Chris Murphy 2015-05-11 02:48:45 UTC
1. Mount and use a Btrfs file system, stop using it for at least 5 minutes.
2. As fast as I can type, in order:
# umount <mountpoint>
# hdparm -y <dev>
[26521.934031] sd 7:0:0:0: [sdc] Synchronizing SCSI cache
[26521.934066] sd 7:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[26522.480317] BTRFS: bdev /dev/sdc1 errs: wr 0, rd 0, flush 1, corrupt 0, gen 0
[26522.515110] BTRFS: error (device sdc1) in write_all_supers:3454: errno=-5 IO failure (errors while submitting device barriers.)
[26522.515119] BTRFS info (device sdc1): forced readonly

The file system checks fine, and mounts fine, so no major problem apparently. Just a bit scary that it's possible for umount to return to prompt before flush to disk is complete.


Full dmesg from step 2 including call trace:



[26521.930658] usb 1-1.3: USB disconnect, device number 11
[26521.934031] sd 7:0:0:0: [sdc] Synchronizing SCSI cache
[26521.934066] sd 7:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[26522.480317] BTRFS: bdev /dev/sdc1 errs: wr 0, rd 0, flush 1, corrupt 0, gen 0
[26522.515110] BTRFS: error (device sdc1) in write_all_supers:3454: errno=-5 IO failure (errors while submitting device barriers.)
[26522.515119] BTRFS info (device sdc1): forced readonly
[26522.515125] BTRFS warning (device sdc1): Skipping commit of aborted transaction.
[26522.515129] ------------[ cut here ]------------
[26522.515184] WARNING: CPU: 6 PID: 9408 at fs/btrfs/super.c:260 __btrfs_abort_transaction+0x54/0x130 [btrfs]()
[26522.515188] BTRFS: Transaction aborted (error -5)
[26522.515190] Modules linked in: vhost_net vhost macvtap macvlan xfs libcrc32c uas usb_storage rfcomm fuse xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun ccm ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack bnep ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw arc4 b43 intel_rapl iosf_mbi x86_pkg_temp_thermal coretemp kvm_intel mac80211 snd_hda_codec_cirrus snd_hda_codec_generic kvm cfg80211 snd_hda_intel snd_hda_controller snd_hda_codec ssb iTCO_wdt snd_hwdep crct10dif_pclmul iTCO_vendor_support snd_seq crc32_pclmul snd_seq_device
[26522.515315]  uvcvideo snd_pcm applesmc videobuf2_vmalloc videobuf2_core ghash_clmulni_intel videobuf2_memops v4l2_common btusb input_polldev bluetooth tg3 videodev sbs i2c_i801 hid_appleir mei_me snd_timer ptp rfkill media bcm5974 lpc_ich snd pps_core mei apple_gmux bcma sbshc mfd_core soundcore shpchp apple_bl nfsd auth_rpcgss nfs_acl lockd grace sunrpc btrfs xor i915 raid6_pq i2c_algo_bit drm_kms_helper sdhci_pci crc32c_intel drm firewire_ohci sdhci mmc_core firewire_core crc_itu_t video
[26522.515386] CPU: 6 PID: 9408 Comm: umount Not tainted 4.0.1-300.fc22.x86_64 #1
[26522.515390] Hardware name: Apple Inc. MacBookPro8,2/Mac-94245A3940C91C80, BIOS    MBP81.88Z.0047.B27.1201241646 01/24/12
[26522.515394]  0000000000000000 000000009dbd0ab1 ffff8801da56bba8 ffffffff817819a8
[26522.515401]  0000000000000000 ffff8801da56bc00 ffff8801da56bbe8 ffffffff8109c60a
[26522.515407]  0000000000000044 ffff8802655f32c0 00000000fffffffb ffff8802020d7800
[26522.515413] Call Trace:
[26522.515426]  [<ffffffff817819a8>] dump_stack+0x45/0x57
[26522.515434]  [<ffffffff8109c60a>] warn_slowpath_common+0x8a/0xc0
[26522.515445]  [<ffffffff8109c695>] warn_slowpath_fmt+0x55/0x70
[26522.515474]  [<ffffffffa02889a4>] __btrfs_abort_transaction+0x54/0x130 [btrfs]
[26522.515510]  [<ffffffffa02b741f>] cleanup_transaction+0x7f/0x2d0 [btrfs]
[26522.515518]  [<ffffffff810dec90>] ? wake_atomic_t_function+0x70/0x70
[26522.515551]  [<ffffffffa02b819f>] btrfs_commit_transaction+0x2ef/0xa30 [btrfs]
[26522.515587]  [<ffffffffa0283bc9>] btrfs_sync_fs+0x59/0x110 [btrfs]
[26522.515597]  [<ffffffff81250162>] sync_filesystem+0x82/0xc0
[26522.515604]  [<ffffffff8121f3f4>] generic_shutdown_super+0x34/0x100
[26522.515610]  [<ffffffff8121f746>] kill_anon_super+0x16/0x30
[26522.515634]  [<ffffffffa0284f78>] btrfs_kill_super+0x18/0x120 [btrfs]
[26522.515644]  [<ffffffff8121fb39>] deactivate_locked_super+0x49/0x80
[26522.515650]  [<ffffffff8121ffac>] deactivate_super+0x6c/0x80
[26522.515657]  [<ffffffff8123e5d3>] cleanup_mnt+0x43/0xa0
[26522.515663]  [<ffffffff8123e682>] __cleanup_mnt+0x12/0x20
[26522.515682]  [<ffffffff810b9944>] task_work_run+0xc4/0xe0
[26522.515691]  [<ffffffff81013d0d>] do_notify_resume+0x9d/0xa0
[26522.515700]  [<ffffffff817882e3>] int_signal+0x12/0x17
[26522.515704] ---[ end trace e0ac4e58a00fdfc5 ]---
[26522.515710] BTRFS: error (device sdc1) in cleanup_transaction:1686: errno=-5 IO failure
[26522.515714] BTRFS info (device sdc1): delayed_refs has NO entry
Comment 1 David Sterba 2022-10-04 08:40:46 UTC
This is a semi-automated bugzilla cleanup, report is against an old kernel version. If the problem still happens, please open a new bug. Thanks.

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