linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] Btrfs
@ 2015-02-19 20:36 Chris Mason
  2015-02-20 10:09 ` Markus Trippelsdorf
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Mason @ 2015-02-19 20:36 UTC (permalink / raw)
  To: torvalds, linux-btrfs, LKML

Hi Linus,

Please pull my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

This was held up a little trying to track down a use-after-free in btrfs
raid5/6.  It's not clear yet if this is just made easier to trigger with
this pull or if its a new bug from the raid5/6 cleanups.  Dave Sterba is
the only one to trigger it so far, but he has a consistent way to
reproduce, so we'll get it nailed shortly.

This pull is mostly cleanups and fixes.

The raid5/6 cleanups from Zhao Lei fixup some long standing warts in the
code and add improvements on top of the scrubbing support from 3.19.

Josef has round one of our ENOSPC fixes coming from large btrfs clusters
here at FB.

Dave Sterba continues a long series of cleanups (thanks Dave), and
Filipe continues hammering on corner cases in fsync and others.

David Sterba (25) commits (+332/-306):
    btrfs: more superblock checks, lower bounds on devices and sectorsize/nodesize (+19/-0)
    btrfs: sink blocksize parameter to btrfs_find_create_tree_block (+17/-12)
    btrfs: cleanup, rename a few variables in btrfs_read_sys_array (+16/-15)
    btrfs: sink blocksize parameter to reada_tree_block_flagged (+4/-4)
    btrfs: sink blocksize parameter to btrfs_init_new_buffer (+4/-5)
    btrfs: sink blocksize parameter to readahead_tree_block (+8/-11)
    btrfs: sink blocksize parameter to tree_block_processed (+5/-4)
    btrfs: use GFP_NOFS in __alloc_extent_buffer directly (+5/-5)
    btrfs: set proper message level for skinny metadata (+1/-1)
    btrfs: expand btrfs_find_item if found_key is NULL (+21/-8)
    btrfs: update message levels after checksum errors (+2/-2)
    btrfs: remove a no-op unfreeze superbock callback (+0/-6)
    btrfs: update message levels during failed mount (+8/-8)
    btrfs: sink parameter len to alloc_extent_buffer (+8/-8)
    btrfs: add more checks to btrfs_read_sys_array (+23/-3)
    btrfs: switch extent_state state to unsigned (+55/-55)
    btrfs: cleanup, remove inode_item_info helper (+5/-15)
    btrfs: cleanup, remove inode_ref_info helper (+6/-11)
    btrfs: add checks for sys_chunk_array sizes (+19/-0)
    btrfs: fix leak of path in btrfs_find_item (+22/-15)
    btrfs: unify extent buffer allocation api (+35/-23)
    btrfs: remove blocksize from reada_extent (+6/-9)
    btrfs: kill btrfs_inode_*time helpers (+33/-69)
    btrfs: update message levels for errors (+6/-5)
    btrfs: simplify insert_orphan_item (+4/-12)

Zhao Lei (16) commits (+332/-400):
    Btrfs: Separate finding-right-mirror and writing-to-target's process in scrub_handle_errored_block() (+17/-27)
    Btrfs: Break loop when reach BTRFS_MAX_MIRRORS in scrub_setup_recheck_block() (+1/-1)
    Btrfs: Introduce BTRFS_BLOCK_GROUP_RAID56_MASK to check raid56 simply (+19/-28)
    Btrfs: Remove noneed force_write in scrub_write_block_to_dev_replace (+7/-12)
    Btrfs: Fix a jump typo of nodatasum_case to avoid wrong WARN_ON() (+2/-1)
    Btrfs: Make raid_map array be inlined in btrfs_bio structure (+105/-125)
    Btrfs: Combine per-page recover in dev-replace and scrub (+48/-72)
    Btrfs: btrfs_rm_dev_replace_blocked(): Use wait_event() (+2/-11)
    Btrfs: Simplify scrub_setup_recheck_block()'s argument (+9/-16)
    Btrfs: add ref_count and free function for btrfs_bio (+57/-54)
    Btrfs: sort raid_map before adding tgtdev stripes (+8/-14)
    Btrfs: Cleanup btrfs_bio_counter_inc_blocked() (+6/-6)
    Btrfs: fix a out-of-bound access of raid_map (+5/-2)
    Rename all ref_count to refs in struct (+13/-13)
    Btrfs: Include map_type in raid_bio (+22/-18)
    btrfs: Fix out-of-space bug (+11/-0)

Filipe Manana (12) commits (+257/-65):
    Btrfs: fix fsync log replay for inodes with a mix of regular refs and extrefs (+43/-5)
    Btrfs: fix race between transaction commit and empty block group removal (+22/-1)
    Btrfs: lookup for block group only if needed when freeing a tree block (+6/-4)
    Btrfs: don't remove extents and xattrs when logging new names (+27/-12)
    Btrfs: fix fsync when extend references are added to an inode (+16/-11)
    Btrfs: fix fsync data loss after adding hard link to inode (+73/-9)
    Btrfs: fix directory inconsistency after fsync log replay (+18/-2)
    Btrfs: fix setup_leaf_for_split() to avoid leaf corruption (+4/-2)
    Btrfs: fix scrub race leading to use-after-free (+15/-1)
    Btrfs: add missing cleanup on sysfs init failure (+9/-1)
    Btrfs: fix scheduler warning when syncing log (+1/-1)
    Btrfs: scrub, fix sleep in atomic context (+23/-16)

Josef Bacik (5) commits (+177/-147):
    Btrfs: only adjust outstanding_extents when we do a short write (+6/-5)
    Btrfs: don't set and clear delalloc for O_DIRECT writes (+2/-6)
    Btrfs: track dirty block groups on their own list (+72/-124)
    Btrfs: account for large extents with enospc (+76/-7)
    Btrfs: change how we track dirty roots (+21/-5)

Shaohua Li (1) commits (+5/-8):
    btrfs: delete chunk allocation attemp when setting block group ro

Yang Dongsheng (1) commits (+1/-2):
    btrfs: qgroup: move WARN_ON() to the correct location.

Anand Jain (1) commits (+0/-4):
    Btrfs: fix unused members in struct btrfs_root

Liu Bo (1) commits (+1/-4):
    Btrfs: cleanup unused run_most

Satoru Takeuchi (1) commits (+1/-2):
    Btrfs: Remove unnecessary placeholder in btrfs_err_code

chandan r (1) commits (+36/-2):
    Btrfs: Add code to support file creation time

Forrest Liu (1) commits (+2/-1):
    Btrfs: fix BUG_ON in btrfs_orphan_add() when delete unused block group

chandan (1) commits (+1/-1):
    Btrfs: insert_new_root: Fix lock type of the extent buffer.

Naohiro Aota (1) commits (+3/-1):
    btrfs: clear bio reference after submit_one_bio()

Gui Hecheng (1) commits (+1/-4):
    btrfs: cleanup init for list in free-space-cache

Total: (68) commits (+1149/-947)

 fs/btrfs/backref.c                   |  28 +---
 fs/btrfs/backref.h                   |   3 -
 fs/btrfs/btrfs_inode.h               |   3 +
 fs/btrfs/ctree.c                     |  55 +++----
 fs/btrfs/ctree.h                     |  39 ++---
 fs/btrfs/delayed-inode.c             |  38 +++--
 fs/btrfs/dev-replace.c               |  25 +--
 fs/btrfs/disk-io.c                   | 102 +++++++++---
 fs/btrfs/disk-io.h                   |   6 +-
 fs/btrfs/extent-tree.c               | 250 ++++++++++++----------------
 fs/btrfs/extent_io.c                 |  87 ++++++----
 fs/btrfs/extent_io.h                 |  65 ++++----
 fs/btrfs/free-space-cache.c          |  13 +-
 fs/btrfs/inode-item.c                |   9 +-
 fs/btrfs/inode.c                     | 156 +++++++++++++-----
 fs/btrfs/qgroup.c                    |   3 +-
 fs/btrfs/raid56.c                    | 103 ++++--------
 fs/btrfs/raid56.h                    |  11 +-
 fs/btrfs/reada.c                     |  19 +--
 fs/btrfs/relocation.c                |  12 +-
 fs/btrfs/scrub.c                     | 309 ++++++++++++++++-------------------
 fs/btrfs/send.c                      |   9 +-
 fs/btrfs/super.c                     |   6 -
 fs/btrfs/sysfs.c                     |  10 +-
 fs/btrfs/tests/extent-buffer-tests.c |   2 +-
 fs/btrfs/tests/extent-io-tests.c     |   3 +-
 fs/btrfs/tests/inode-tests.c         |   4 +-
 fs/btrfs/tests/qgroup-tests.c        |  23 ++-
 fs/btrfs/transaction.c               |  27 ++-
 fs/btrfs/transaction.h               |   7 +
 fs/btrfs/tree-log.c                  | 234 ++++++++++++++++++++------
 fs/btrfs/volumes.c                   | 242 +++++++++++++++------------
 fs/btrfs/volumes.h                   |  18 +-
 include/uapi/linux/btrfs.h           |   3 +-
 34 files changed, 1063 insertions(+), 861 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [GIT PULL] Btrfs
  2015-02-19 20:36 [GIT PULL] Btrfs Chris Mason
@ 2015-02-20 10:09 ` Markus Trippelsdorf
  2015-02-24 12:29   ` WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0() Markus Trippelsdorf
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Trippelsdorf @ 2015-02-20 10:09 UTC (permalink / raw)
  To: Chris Mason, linux-btrfs, LKML

On 2015.02.19 at 15:36 -0500, Chris Mason wrote:
> Hi Linus,
> 
> Please pull my for-linus branch:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

I get the following warnings during Firefox LTO build. lto1-wpa-stream
outputs the final object files in parallel and therefore stresses the
filessystem.
These warnings started with the git merge above.

The disk is a conventional drive:

[    2.438132] scsi 1:0:0:0: Direct-Access     ATA      ST2000DM001-1CH1 CC29 PQ: 0 ANSI: 5
[    2.438308] sd 1:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[    2.438310] sd 1:0:0:0: [sda] 4096-byte physical blocks

/dev/sda2      btrfs     1.9T  905G  946G  49% /var
/dev/sda2 on /var type btrfs (rw,relatime,compress=lzo,noacl,space_cache)


[ 4155.708579] ------------[ cut here ]------------
[ 4155.708590] WARNING: CPU: 1 PID: 8850 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
[ 4155.708593] CPU: 1 PID: 8850 Comm: lto1-wpa-stream Not tainted 3.19.0-08975-g3d883483dc0a-dirty #101
[ 4155.708594] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
[ 4155.708595]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
[ 4155.708597]  ffffffff8106d2d2 ffff8800dad9bb78 ffff88018554ccc0 ffff880215e2e000
[ 4155.708599]  ffff880215f23000 0000000000000000 ffffffff8121b6f8 0000000000000000
[ 4155.708601] Call Trace:
[ 4155.708606]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
[ 4155.708609]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
[ 4155.708611]  [<ffffffff8121b6f8>] ? btrfs_destroy_inode+0x278/0x2a0
[ 4155.708614]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
[ 4155.708615]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
[ 4155.708618]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
[ 4155.708621]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
[ 4155.708623]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
[ 4155.708625]  [<ffffffff810e3241>] ? try_to_free_pages+0x1e1/0x320
[ 4155.708626]  [<ffffffff810daa82>] ? __alloc_pages_nodemask+0x382/0x680
[ 4155.708629]  [<ffffffff810f597d>] ? handle_mm_fault+0xbbd/0xe60
[ 4155.708631]  [<ffffffff81092e15>] ? put_prev_task_fair+0x75/0x320
[ 4155.708632]  [<ffffffff810903b0>] ? __dequeue_entity+0x30/0x40
[ 4155.708633]  [<ffffffff81094975>] ? pick_next_task_fair+0x415/0x480
[ 4155.708636]  [<ffffffff81064144>] ? __do_page_fault+0x104/0x3a0
[ 4155.708637]  [<ffffffff8168fb77>] ? __schedule+0x257/0x860
[ 4155.708639]  [<ffffffff8169518f>] ? page_fault+0x1f/0x30
[ 4155.708640] ---[ end trace 265993ee076d84aa ]---
[ 4155.708641] ------------[ cut here ]------------
[ 4155.708643] WARNING: CPU: 1 PID: 8850 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
[ 4155.708644] CPU: 1 PID: 8850 Comm: lto1-wpa-stream Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
[ 4155.708645] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
[ 4155.708645]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
[ 4155.708647]  ffffffff8106d2d2 ffff8800dad9bb78 ffff88018554ccc0 ffff880215e2e000
[ 4155.708648]  ffff880215f23000 0000000000000000 ffffffff8121b672 0000000000000000
[ 4155.708649] Call Trace:
[ 4155.708651]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
[ 4155.708652]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
[ 4155.708654]  [<ffffffff8121b672>] ? btrfs_destroy_inode+0x1f2/0x2a0
[ 4155.708655]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
[ 4155.708656]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
[ 4155.708658]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
[ 4155.708659]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
[ 4155.708661]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
[ 4155.708662]  [<ffffffff810e3241>] ? try_to_free_pages+0x1e1/0x320
[ 4155.708664]  [<ffffffff810daa82>] ? __alloc_pages_nodemask+0x382/0x680
[ 4155.708665]  [<ffffffff810f597d>] ? handle_mm_fault+0xbbd/0xe60
[ 4155.708667]  [<ffffffff81092e15>] ? put_prev_task_fair+0x75/0x320
[ 4155.708668]  [<ffffffff810903b0>] ? __dequeue_entity+0x30/0x40
[ 4155.708669]  [<ffffffff81094975>] ? pick_next_task_fair+0x415/0x480
[ 4155.708670]  [<ffffffff81064144>] ? __do_page_fault+0x104/0x3a0
[ 4155.708672]  [<ffffffff8168fb77>] ? __schedule+0x257/0x860
[ 4155.708673]  [<ffffffff8169518f>] ? page_fault+0x1f/0x30
[ 4155.708674] ---[ end trace 265993ee076d84ab ]---
[ 4156.021127] ------------[ cut here ]------------
[ 4156.021136] WARNING: CPU: 3 PID: 35 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
[ 4156.021139] CPU: 3 PID: 35 Comm: kswapd0 Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
[ 4156.021140] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
[ 4156.021141]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
[ 4156.021143]  ffffffff8106d2d2 ffff8802160dfcb8 ffff88006b07a690 ffff880215e2e000
[ 4156.021145]  ffff880215f23000 0000000000000000 ffffffff8121b6f8 0000000000000000
[ 4156.021146] Call Trace:
[ 4156.021151]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
[ 4156.021154]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
[ 4156.021156]  [<ffffffff8121b6f8>] ? btrfs_destroy_inode+0x278/0x2a0
[ 4156.021159]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
[ 4156.021160]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
[ 4156.021163]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
[ 4156.021166]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
[ 4156.021168]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
[ 4156.021169]  [<ffffffff810e3698>] ? kswapd+0x318/0x6c0
[ 4156.021171]  [<ffffffff810e3380>] ? try_to_free_pages+0x320/0x320
[ 4156.021173]  [<ffffffff81084c3c>] ? kthread+0xbc/0xe0
[ 4156.021175]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
[ 4156.021177]  [<ffffffff81693bec>] ? ret_from_fork+0x7c/0xb0
[ 4156.021178]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
[ 4156.021179] ---[ end trace 265993ee076d84ac ]---
[ 4156.021180] ------------[ cut here ]------------
[ 4156.021182] WARNING: CPU: 3 PID: 35 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
[ 4156.021183] CPU: 3 PID: 35 Comm: kswapd0 Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
[ 4156.021184] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
[ 4156.021184]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
[ 4156.021186]  ffffffff8106d2d2 ffff8802160dfcb8 ffff88006b07a690 ffff880215e2e000
[ 4156.021187]  ffff880215f23000 0000000000000000 ffffffff8121b672 0000000000000000
[ 4156.021188] Call Trace:
[ 4156.021190]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
[ 4156.021191]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
[ 4156.021192]  [<ffffffff8121b672>] ? btrfs_destroy_inode+0x1f2/0x2a0
[ 4156.021194]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
[ 4156.021195]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
[ 4156.021197]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
[ 4156.021198]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
[ 4156.021200]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
[ 4156.021201]  [<ffffffff810e3698>] ? kswapd+0x318/0x6c0
[ 4156.021203]  [<ffffffff810e3380>] ? try_to_free_pages+0x320/0x320
[ 4156.021204]  [<ffffffff81084c3c>] ? kthread+0xbc/0xe0
[ 4156.021205]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
[ 4156.021207]  [<ffffffff81693bec>] ? ret_from_fork+0x7c/0xb0
[ 4156.021208]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
[ 4156.021209] ---[ end trace 265993ee076d84ad ]---

-- 
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
  2015-02-20 10:09 ` Markus Trippelsdorf
@ 2015-02-24 12:29   ` Markus Trippelsdorf
  2015-03-02 11:25     ` Markus Trippelsdorf
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Trippelsdorf @ 2015-02-24 12:29 UTC (permalink / raw)
  To: Chris Mason, linux-btrfs, LKML

On 2015.02.20 at 11:09 +0100, Markus Trippelsdorf wrote:
> 
> I get the following warnings during Firefox LTO build. lto1-wpa-stream
> outputs the final object files in parallel and therefore stresses the
> filessystem.
> These warnings started with the git merge above.
> 
> The disk is a conventional drive:
> 
> [    2.438132] scsi 1:0:0:0: Direct-Access     ATA      ST2000DM001-1CH1 CC29 PQ: 0 ANSI: 5
> [    2.438308] sd 1:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
> [    2.438310] sd 1:0:0:0: [sda] 4096-byte physical blocks
> 
> /dev/sda2      btrfs     1.9T  905G  946G  49% /var
> /dev/sda2 on /var type btrfs (rw,relatime,compress=lzo,noacl,space_cache)
> 
> 
> [ 4155.708579] ------------[ cut here ]------------
> [ 4155.708590] WARNING: CPU: 1 PID: 8850 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> [ 4155.708593] CPU: 1 PID: 8850 Comm: lto1-wpa-stream Not tainted 3.19.0-08975-g3d883483dc0a-dirty #101
> [ 4155.708594] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> [ 4155.708595]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
> [ 4155.708597]  ffffffff8106d2d2 ffff8800dad9bb78 ffff88018554ccc0 ffff880215e2e000
> [ 4155.708599]  ffff880215f23000 0000000000000000 ffffffff8121b6f8 0000000000000000
> [ 4155.708601] Call Trace:
> [ 4155.708606]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
> [ 4155.708609]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> [ 4155.708611]  [<ffffffff8121b6f8>] ? btrfs_destroy_inode+0x278/0x2a0
> [ 4155.708614]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
> [ 4155.708615]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
> [ 4155.708618]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
> [ 4155.708621]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
> [ 4155.708623]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
> [ 4155.708625]  [<ffffffff810e3241>] ? try_to_free_pages+0x1e1/0x320
> [ 4155.708626]  [<ffffffff810daa82>] ? __alloc_pages_nodemask+0x382/0x680
> [ 4155.708629]  [<ffffffff810f597d>] ? handle_mm_fault+0xbbd/0xe60
> [ 4155.708631]  [<ffffffff81092e15>] ? put_prev_task_fair+0x75/0x320
> [ 4155.708632]  [<ffffffff810903b0>] ? __dequeue_entity+0x30/0x40
> [ 4155.708633]  [<ffffffff81094975>] ? pick_next_task_fair+0x415/0x480
> [ 4155.708636]  [<ffffffff81064144>] ? __do_page_fault+0x104/0x3a0
> [ 4155.708637]  [<ffffffff8168fb77>] ? __schedule+0x257/0x860
> [ 4155.708639]  [<ffffffff8169518f>] ? page_fault+0x1f/0x30
> [ 4155.708640] ---[ end trace 265993ee076d84aa ]---
> [ 4155.708641] ------------[ cut here ]------------
> [ 4155.708643] WARNING: CPU: 1 PID: 8850 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> [ 4155.708644] CPU: 1 PID: 8850 Comm: lto1-wpa-stream Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
> [ 4155.708645] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> [ 4155.708645]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
> [ 4155.708647]  ffffffff8106d2d2 ffff8800dad9bb78 ffff88018554ccc0 ffff880215e2e000
> [ 4155.708648]  ffff880215f23000 0000000000000000 ffffffff8121b672 0000000000000000
> [ 4155.708649] Call Trace:
> [ 4155.708651]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
> [ 4155.708652]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> [ 4155.708654]  [<ffffffff8121b672>] ? btrfs_destroy_inode+0x1f2/0x2a0
> [ 4155.708655]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
> [ 4155.708656]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
> [ 4155.708658]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
> [ 4155.708659]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
> [ 4155.708661]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
> [ 4155.708662]  [<ffffffff810e3241>] ? try_to_free_pages+0x1e1/0x320
> [ 4155.708664]  [<ffffffff810daa82>] ? __alloc_pages_nodemask+0x382/0x680
> [ 4155.708665]  [<ffffffff810f597d>] ? handle_mm_fault+0xbbd/0xe60
> [ 4155.708667]  [<ffffffff81092e15>] ? put_prev_task_fair+0x75/0x320
> [ 4155.708668]  [<ffffffff810903b0>] ? __dequeue_entity+0x30/0x40
> [ 4155.708669]  [<ffffffff81094975>] ? pick_next_task_fair+0x415/0x480
> [ 4155.708670]  [<ffffffff81064144>] ? __do_page_fault+0x104/0x3a0
> [ 4155.708672]  [<ffffffff8168fb77>] ? __schedule+0x257/0x860
> [ 4155.708673]  [<ffffffff8169518f>] ? page_fault+0x1f/0x30
> [ 4155.708674] ---[ end trace 265993ee076d84ab ]---
> [ 4156.021127] ------------[ cut here ]------------
> [ 4156.021136] WARNING: CPU: 3 PID: 35 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> [ 4156.021139] CPU: 3 PID: 35 Comm: kswapd0 Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
> [ 4156.021140] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> [ 4156.021141]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
> [ 4156.021143]  ffffffff8106d2d2 ffff8802160dfcb8 ffff88006b07a690 ffff880215e2e000
> [ 4156.021145]  ffff880215f23000 0000000000000000 ffffffff8121b6f8 0000000000000000
> [ 4156.021146] Call Trace:
> [ 4156.021151]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
> [ 4156.021154]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> [ 4156.021156]  [<ffffffff8121b6f8>] ? btrfs_destroy_inode+0x278/0x2a0
> [ 4156.021159]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
> [ 4156.021160]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
> [ 4156.021163]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
> [ 4156.021166]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
> [ 4156.021168]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
> [ 4156.021169]  [<ffffffff810e3698>] ? kswapd+0x318/0x6c0
> [ 4156.021171]  [<ffffffff810e3380>] ? try_to_free_pages+0x320/0x320
> [ 4156.021173]  [<ffffffff81084c3c>] ? kthread+0xbc/0xe0
> [ 4156.021175]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
> [ 4156.021177]  [<ffffffff81693bec>] ? ret_from_fork+0x7c/0xb0
> [ 4156.021178]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
> [ 4156.021179] ---[ end trace 265993ee076d84ac ]---
> [ 4156.021180] ------------[ cut here ]------------
> [ 4156.021182] WARNING: CPU: 3 PID: 35 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> [ 4156.021183] CPU: 3 PID: 35 Comm: kswapd0 Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
> [ 4156.021184] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> [ 4156.021184]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
> [ 4156.021186]  ffffffff8106d2d2 ffff8802160dfcb8 ffff88006b07a690 ffff880215e2e000
> [ 4156.021187]  ffff880215f23000 0000000000000000 ffffffff8121b672 0000000000000000
> [ 4156.021188] Call Trace:
> [ 4156.021190]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
> [ 4156.021191]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> [ 4156.021192]  [<ffffffff8121b672>] ? btrfs_destroy_inode+0x1f2/0x2a0
> [ 4156.021194]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
> [ 4156.021195]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
> [ 4156.021197]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
> [ 4156.021198]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
> [ 4156.021200]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
> [ 4156.021201]  [<ffffffff810e3698>] ? kswapd+0x318/0x6c0
> [ 4156.021203]  [<ffffffff810e3380>] ? try_to_free_pages+0x320/0x320
> [ 4156.021204]  [<ffffffff81084c3c>] ? kthread+0xbc/0xe0
> [ 4156.021205]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
> [ 4156.021207]  [<ffffffff81693bec>] ? ret_from_fork+0x7c/0xb0
> [ 4156.021208]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
> [ 4156.021209] ---[ end trace 265993ee076d84ad ]---

Also happens when I remove directories:

[83159.023857] ------------[ cut here ]------------
[83159.023865] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
[83159.023868] CPU: 2 PID: 32343 Comm: rm Not tainted 4.0.0-rc1-dirty #104
[83159.023869] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
[83159.023870]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
[83159.023872]  ffffffff8106d2d2 0000000000000000 ffff880008dd8560 ffff880215805800
[83159.023873]  ffff880169477eb8 ffff880008dd8560 ffffffff8121bab8 ffff880100675000
[83159.023874] Call Trace:
[83159.023878]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
[83159.023881]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
[83159.023882]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
[83159.023885]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
[83159.023887]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
[83159.023889]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
[83159.023891]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
[83159.023892] ---[ end trace 3b7c45c6e46fe8db ]---
[83159.023892] ------------[ cut here ]------------
[83159.023894] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
[83159.023895] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
[83159.023896] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
[83159.023897]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
[83159.023898]  ffffffff8106d2d2 0000000000000000 ffff880008dd8560 ffff880215805800
[83159.023899]  ffff880169477eb8 ffff880008dd8560 ffffffff8121ba32 ffff880100675000
[83159.023900] Call Trace:
[83159.023902]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
[83159.023903]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
[83159.023905]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
[83159.023906]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
[83159.023907]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
[83159.023909]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
[83159.023910]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
[83159.023911] ---[ end trace 3b7c45c6e46fe8dc ]---
[83159.038708] ------------[ cut here ]------------
[83159.038716] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
[83159.038718] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
[83159.038719] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
[83159.038720]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
[83159.038722]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
[83159.038723]  ffff880169477eb8 ffff88005756edf0 ffffffff8121bab8 ffff880100675000
[83159.038725] Call Trace:
[83159.038728]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
[83159.038731]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
[83159.038732]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
[83159.038735]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
[83159.038737]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
[83159.038740]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
[83159.038742]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
[83159.038743] ---[ end trace 3b7c45c6e46fe8dd ]---
[83159.038744] ------------[ cut here ]------------
[83159.038745] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
[83159.038746] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
[83159.038747] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
[83159.038747]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
[83159.038749]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
[83159.038750]  ffff880169477eb8 ffff88005756edf0 ffffffff8121ba32 ffff880100675000
[83159.038751] Call Trace:
[83159.038753]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
[83159.038754]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
[83159.038755]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
[83159.038757]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
[83159.038758]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
[83159.038760]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
[83159.038761]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
[83159.038762] ---[ end trace 3b7c45c6e46fe8de ]---

-- 
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
  2015-02-24 12:29   ` WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0() Markus Trippelsdorf
@ 2015-03-02 11:25     ` Markus Trippelsdorf
  2015-03-02 12:07       ` Filipe David Manana
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Trippelsdorf @ 2015-03-02 11:25 UTC (permalink / raw)
  To: Chris Mason, linux-btrfs, LKML

On 2015.02.24 at 13:29 +0100, Markus Trippelsdorf wrote:
> On 2015.02.20 at 11:09 +0100, Markus Trippelsdorf wrote:
> > 
> > I get the following warnings during Firefox LTO build. lto1-wpa-stream
> > outputs the final object files in parallel and therefore stresses the
> > filessystem.
> > These warnings started with the git merge above.
> > 
> > The disk is a conventional drive:
> > 
> > [    2.438132] scsi 1:0:0:0: Direct-Access     ATA      ST2000DM001-1CH1 CC29 PQ: 0 ANSI: 5
> > [    2.438308] sd 1:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
> > [    2.438310] sd 1:0:0:0: [sda] 4096-byte physical blocks
> > 
> > /dev/sda2      btrfs     1.9T  905G  946G  49% /var
> > /dev/sda2 on /var type btrfs (rw,relatime,compress=lzo,noacl,space_cache)
> > 
> > 
> > [ 4155.708579] ------------[ cut here ]------------
> > [ 4155.708590] WARNING: CPU: 1 PID: 8850 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> > [ 4155.708593] CPU: 1 PID: 8850 Comm: lto1-wpa-stream Not tainted 3.19.0-08975-g3d883483dc0a-dirty #101
> > [ 4155.708594] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> > [ 4155.708595]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
> > [ 4155.708597]  ffffffff8106d2d2 ffff8800dad9bb78 ffff88018554ccc0 ffff880215e2e000
> > [ 4155.708599]  ffff880215f23000 0000000000000000 ffffffff8121b6f8 0000000000000000
> > [ 4155.708601] Call Trace:
> > [ 4155.708606]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
> > [ 4155.708609]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> > [ 4155.708611]  [<ffffffff8121b6f8>] ? btrfs_destroy_inode+0x278/0x2a0
> > [ 4155.708614]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
> > [ 4155.708615]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
> > [ 4155.708618]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
> > [ 4155.708621]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
> > [ 4155.708623]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
> > [ 4155.708625]  [<ffffffff810e3241>] ? try_to_free_pages+0x1e1/0x320
> > [ 4155.708626]  [<ffffffff810daa82>] ? __alloc_pages_nodemask+0x382/0x680
> > [ 4155.708629]  [<ffffffff810f597d>] ? handle_mm_fault+0xbbd/0xe60
> > [ 4155.708631]  [<ffffffff81092e15>] ? put_prev_task_fair+0x75/0x320
> > [ 4155.708632]  [<ffffffff810903b0>] ? __dequeue_entity+0x30/0x40
> > [ 4155.708633]  [<ffffffff81094975>] ? pick_next_task_fair+0x415/0x480
> > [ 4155.708636]  [<ffffffff81064144>] ? __do_page_fault+0x104/0x3a0
> > [ 4155.708637]  [<ffffffff8168fb77>] ? __schedule+0x257/0x860
> > [ 4155.708639]  [<ffffffff8169518f>] ? page_fault+0x1f/0x30
> > [ 4155.708640] ---[ end trace 265993ee076d84aa ]---
> > [ 4155.708641] ------------[ cut here ]------------
> > [ 4155.708643] WARNING: CPU: 1 PID: 8850 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> > [ 4155.708644] CPU: 1 PID: 8850 Comm: lto1-wpa-stream Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
> > [ 4155.708645] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> > [ 4155.708645]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
> > [ 4155.708647]  ffffffff8106d2d2 ffff8800dad9bb78 ffff88018554ccc0 ffff880215e2e000
> > [ 4155.708648]  ffff880215f23000 0000000000000000 ffffffff8121b672 0000000000000000
> > [ 4155.708649] Call Trace:
> > [ 4155.708651]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
> > [ 4155.708652]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> > [ 4155.708654]  [<ffffffff8121b672>] ? btrfs_destroy_inode+0x1f2/0x2a0
> > [ 4155.708655]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
> > [ 4155.708656]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
> > [ 4155.708658]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
> > [ 4155.708659]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
> > [ 4155.708661]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
> > [ 4155.708662]  [<ffffffff810e3241>] ? try_to_free_pages+0x1e1/0x320
> > [ 4155.708664]  [<ffffffff810daa82>] ? __alloc_pages_nodemask+0x382/0x680
> > [ 4155.708665]  [<ffffffff810f597d>] ? handle_mm_fault+0xbbd/0xe60
> > [ 4155.708667]  [<ffffffff81092e15>] ? put_prev_task_fair+0x75/0x320
> > [ 4155.708668]  [<ffffffff810903b0>] ? __dequeue_entity+0x30/0x40
> > [ 4155.708669]  [<ffffffff81094975>] ? pick_next_task_fair+0x415/0x480
> > [ 4155.708670]  [<ffffffff81064144>] ? __do_page_fault+0x104/0x3a0
> > [ 4155.708672]  [<ffffffff8168fb77>] ? __schedule+0x257/0x860
> > [ 4155.708673]  [<ffffffff8169518f>] ? page_fault+0x1f/0x30
> > [ 4155.708674] ---[ end trace 265993ee076d84ab ]---
> > [ 4156.021127] ------------[ cut here ]------------
> > [ 4156.021136] WARNING: CPU: 3 PID: 35 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> > [ 4156.021139] CPU: 3 PID: 35 Comm: kswapd0 Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
> > [ 4156.021140] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> > [ 4156.021141]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
> > [ 4156.021143]  ffffffff8106d2d2 ffff8802160dfcb8 ffff88006b07a690 ffff880215e2e000
> > [ 4156.021145]  ffff880215f23000 0000000000000000 ffffffff8121b6f8 0000000000000000
> > [ 4156.021146] Call Trace:
> > [ 4156.021151]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
> > [ 4156.021154]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> > [ 4156.021156]  [<ffffffff8121b6f8>] ? btrfs_destroy_inode+0x278/0x2a0
> > [ 4156.021159]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
> > [ 4156.021160]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
> > [ 4156.021163]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
> > [ 4156.021166]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
> > [ 4156.021168]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
> > [ 4156.021169]  [<ffffffff810e3698>] ? kswapd+0x318/0x6c0
> > [ 4156.021171]  [<ffffffff810e3380>] ? try_to_free_pages+0x320/0x320
> > [ 4156.021173]  [<ffffffff81084c3c>] ? kthread+0xbc/0xe0
> > [ 4156.021175]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
> > [ 4156.021177]  [<ffffffff81693bec>] ? ret_from_fork+0x7c/0xb0
> > [ 4156.021178]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
> > [ 4156.021179] ---[ end trace 265993ee076d84ac ]---
> > [ 4156.021180] ------------[ cut here ]------------
> > [ 4156.021182] WARNING: CPU: 3 PID: 35 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> > [ 4156.021183] CPU: 3 PID: 35 Comm: kswapd0 Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
> > [ 4156.021184] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> > [ 4156.021184]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
> > [ 4156.021186]  ffffffff8106d2d2 ffff8802160dfcb8 ffff88006b07a690 ffff880215e2e000
> > [ 4156.021187]  ffff880215f23000 0000000000000000 ffffffff8121b672 0000000000000000
> > [ 4156.021188] Call Trace:
> > [ 4156.021190]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
> > [ 4156.021191]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> > [ 4156.021192]  [<ffffffff8121b672>] ? btrfs_destroy_inode+0x1f2/0x2a0
> > [ 4156.021194]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
> > [ 4156.021195]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
> > [ 4156.021197]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
> > [ 4156.021198]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
> > [ 4156.021200]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
> > [ 4156.021201]  [<ffffffff810e3698>] ? kswapd+0x318/0x6c0
> > [ 4156.021203]  [<ffffffff810e3380>] ? try_to_free_pages+0x320/0x320
> > [ 4156.021204]  [<ffffffff81084c3c>] ? kthread+0xbc/0xe0
> > [ 4156.021205]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
> > [ 4156.021207]  [<ffffffff81693bec>] ? ret_from_fork+0x7c/0xb0
> > [ 4156.021208]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
> > [ 4156.021209] ---[ end trace 265993ee076d84ad ]---
> 
> Also happens when I remove directories:
> 
> [83159.023857] ------------[ cut here ]------------
> [83159.023865] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> [83159.023868] CPU: 2 PID: 32343 Comm: rm Not tainted 4.0.0-rc1-dirty #104
> [83159.023869] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> [83159.023870]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> [83159.023872]  ffffffff8106d2d2 0000000000000000 ffff880008dd8560 ffff880215805800
> [83159.023873]  ffff880169477eb8 ffff880008dd8560 ffffffff8121bab8 ffff880100675000
> [83159.023874] Call Trace:
> [83159.023878]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> [83159.023881]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> [83159.023882]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
> [83159.023885]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> [83159.023887]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> [83159.023889]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> [83159.023891]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> [83159.023892] ---[ end trace 3b7c45c6e46fe8db ]---
> [83159.023892] ------------[ cut here ]------------
> [83159.023894] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> [83159.023895] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> [83159.023896] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> [83159.023897]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> [83159.023898]  ffffffff8106d2d2 0000000000000000 ffff880008dd8560 ffff880215805800
> [83159.023899]  ffff880169477eb8 ffff880008dd8560 ffffffff8121ba32 ffff880100675000
> [83159.023900] Call Trace:
> [83159.023902]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> [83159.023903]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> [83159.023905]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
> [83159.023906]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> [83159.023907]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> [83159.023909]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> [83159.023910]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> [83159.023911] ---[ end trace 3b7c45c6e46fe8dc ]---
> [83159.038708] ------------[ cut here ]------------
> [83159.038716] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> [83159.038718] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> [83159.038719] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> [83159.038720]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> [83159.038722]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
> [83159.038723]  ffff880169477eb8 ffff88005756edf0 ffffffff8121bab8 ffff880100675000
> [83159.038725] Call Trace:
> [83159.038728]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> [83159.038731]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> [83159.038732]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
> [83159.038735]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> [83159.038737]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> [83159.038740]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> [83159.038742]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> [83159.038743] ---[ end trace 3b7c45c6e46fe8dd ]---
> [83159.038744] ------------[ cut here ]------------
> [83159.038745] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> [83159.038746] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> [83159.038747] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> [83159.038747]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> [83159.038749]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
> [83159.038750]  ffff880169477eb8 ffff88005756edf0 ffffffff8121ba32 ffff880100675000
> [83159.038751] Call Trace:
> [83159.038753]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> [83159.038754]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> [83159.038755]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
> [83159.038757]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> [83159.038758]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> [83159.038760]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> [83159.038761]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> [83159.038762] ---[ end trace 3b7c45c6e46fe8de ]---

Unfortunately the issue isn't 100% reproducible, so I unfortunately
cannot bisect.

Another example:
...
Mar  2 06:58:24 x4 kernel: BTRFS info (device sdb3): disk space caching is enabled
Mar  2 06:58:25 x4 kernel: microcode: CPU0: new patch_level=0x010000db
Mar  2 06:58:25 x4 kernel: microcode: CPU1: new patch_level=0x010000db
Mar  2 06:58:25 x4 kernel: microcode: CPU2: new patch_level=0x010000db
Mar  2 06:58:25 x4 kernel: microcode: CPU3: new patch_level=0x010000db
Mar  2 06:58:26 x4 kernel: Adding 4095996k swap on /dev/sda1.  Priority:-1 extents:1 across:4095996k
Mar  2 09:09:58 x4 kernel: BTRFS warning (device sda2): block group 885866364928 has wrong amount of free space
Mar  2 09:09:58 x4 kernel: BTRFS warning (device sda2): failed to load free space cache for block group 885866364928, rebuild it now
Mar  2 09:20:02 x4 kernel: ------------[ cut here ]------------
Mar  2 09:20:02 x4 kernel: WARNING: CPU: 0 PID: 14596 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
Mar  2 09:20:02 x4 kernel: CPU: 0 PID: 14596 Comm: rm Not tainted 4.0.0-rc1-00151-ga38ecbbd0be0-dirty #110
Mar  2 09:20:02 x4 kernel: Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
Mar  2 09:20:02 x4 kernel: 0000000000000000 ffffffff8199e119 ffffffff8169214e 0000000000000000
Mar  2 09:20:02 x4 kernel: ffffffff8106c4f2 0000000000000000 ffff8801095b8910 ffff880216a6d000
Mar  2 09:20:02 x4 kernel: ffff88007060beb8 ffff8801095b8910 ffffffff8121a3b8 ffff88019db09000
Mar  2 09:20:02 x4 kernel: Call Trace:
Mar  2 09:20:02 x4 kernel: [<ffffffff8169214e>] ? dump_stack+0x40/0x50
Mar  2 09:20:02 x4 kernel: [<ffffffff8106c4f2>] ? warn_slowpath_common+0x72/0xc0
Mar  2 09:20:02 x4 kernel: [<ffffffff8121a3b8>] ? btrfs_destroy_inode+0x278/0x2a0
Mar  2 09:20:02 x4 kernel: [<ffffffff8111e9e7>] ? do_unlinkat+0x127/0x300
Mar  2 09:20:02 x4 kernel: [<ffffffff81082dd4>] ? task_work_run+0xb4/0x100
Mar  2 09:20:02 x4 kernel: [<ffffffff8103aad5>] ? do_notify_resume+0x55/0x80
Mar  2 09:20:02 x4 kernel: [<ffffffff81698a92>] ? system_call_fastpath+0x12/0x17
Mar  2 09:20:02 x4 kernel: ---[ end trace de951903f2a71b04 ]---
Mar  2 09:20:02 x4 kernel: ------------[ cut here ]------------
Mar  2 09:20:02 x4 kernel: WARNING: CPU: 0 PID: 14596 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
Mar  2 09:20:02 x4 kernel: CPU: 0 PID: 14596 Comm: rm Tainted: G        W       4.0.0-rc1-00151-ga38ecbbd0be0-dirty #110
Mar  2 09:20:02 x4 kernel: Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
Mar  2 09:20:02 x4 kernel: 0000000000000000 ffffffff8199e119 ffffffff8169214e 0000000000000000
Mar  2 09:20:02 x4 kernel: ffffffff8106c4f2 0000000000000000 ffff8801095b8910 ffff880216a6d000
Mar  2 09:20:02 x4 kernel: ffff88007060beb8 ffff8801095b8910 ffffffff8121a332 ffff88019db09000
Mar  2 09:20:02 x4 kernel: Call Trace:
Mar  2 09:20:02 x4 kernel: [<ffffffff8169214e>] ? dump_stack+0x40/0x50
Mar  2 09:20:02 x4 kernel: [<ffffffff8106c4f2>] ? warn_slowpath_common+0x72/0xc0
Mar  2 09:20:02 x4 kernel: [<ffffffff8121a332>] ? btrfs_destroy_inode+0x1f2/0x2a0
Mar  2 09:20:02 x4 kernel: [<ffffffff8111e9e7>] ? do_unlinkat+0x127/0x300
Mar  2 09:20:02 x4 kernel: [<ffffffff81082dd4>] ? task_work_run+0xb4/0x100
Mar  2 09:20:02 x4 kernel: [<ffffffff8103aad5>] ? do_notify_resume+0x55/0x80
Mar  2 09:20:02 x4 kernel: [<ffffffff81698a92>] ? system_call_fastpath+0x12/0x17
Mar  2 09:20:02 x4 kernel: ---[ end trace de951903f2a71b05 ]---
Mar  2 09:20:02 x4 kernel: ------------[ cut here ]------------
Mar  2 09:20:02 x4 kernel: WARNING: CPU: 0 PID: 14596 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
Mar  2 09:20:02 x4 kernel: CPU: 0 PID: 14596 Comm: rm Tainted: G        W       4.0.0-rc1-00151-ga38ecbbd0be0-dirty #110
Mar  2 09:20:02 x4 kernel: Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
Mar  2 09:20:02 x4 kernel: 0000000000000000 ffffffff8199e119 ffffffff8169214e 0000000000000000
Mar  2 09:20:02 x4 kernel: ffffffff8106c4f2 0000000000000000 ffff88007fda01b0 ffff880216a6d000
Mar  2 09:20:02 x4 kernel: ffff88007060beb8 ffff88007fda01b0 ffffffff8121a3b8 ffff88019db09000
Mar  2 09:20:02 x4 kernel: Call Trace:
Mar  2 09:20:02 x4 kernel: [<ffffffff8169214e>] ? dump_stack+0x40/0x50
Mar  2 09:20:02 x4 kernel: [<ffffffff8106c4f2>] ? warn_slowpath_common+0x72/0xc0
Mar  2 09:20:02 x4 kernel: [<ffffffff8121a3b8>] ? btrfs_destroy_inode+0x278/0x2a0
Mar  2 09:20:02 x4 kernel: [<ffffffff8111e9e7>] ? do_unlinkat+0x127/0x300
Mar  2 09:20:02 x4 kernel: [<ffffffff81082dd4>] ? task_work_run+0xb4/0x100
Mar  2 09:20:02 x4 kernel: [<ffffffff8103aad5>] ? do_notify_resume+0x55/0x80
Mar  2 09:20:02 x4 kernel: [<ffffffff81698a92>] ? system_call_fastpath+0x12/0x17
Mar  2 09:20:02 x4 kernel: ---[ end trace de951903f2a71b06 ]---
Mar  2 09:20:02 x4 kernel: ------------[ cut here ]------------
Mar  2 09:20:02 x4 kernel: WARNING: CPU: 0 PID: 14596 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
Mar  2 09:20:02 x4 kernel: CPU: 0 PID: 14596 Comm: rm Tainted: G        W       4.0.0-rc1-00151-ga38ecbbd0be0-dirty #110
Mar  2 09:20:02 x4 kernel: Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
Mar  2 09:20:02 x4 kernel: 0000000000000000 ffffffff8199e119 ffffffff8169214e 0000000000000000
Mar  2 09:20:02 x4 kernel: ffffffff8106c4f2 0000000000000000 ffff88007fda01b0 ffff880216a6d000
Mar  2 09:20:02 x4 kernel: ffff88007060beb8 ffff88007fda01b0 ffffffff8121a332 ffff88019db09000
Mar  2 09:20:02 x4 kernel: Call Trace:
Mar  2 09:20:02 x4 kernel: [<ffffffff8169214e>] ? dump_stack+0x40/0x50
Mar  2 09:20:02 x4 kernel: [<ffffffff8106c4f2>] ? warn_slowpath_common+0x72/0xc0
Mar  2 09:20:02 x4 kernel: [<ffffffff8121a332>] ? btrfs_destroy_inode+0x1f2/0x2a0
Mar  2 09:20:02 x4 kernel: [<ffffffff8111e9e7>] ? do_unlinkat+0x127/0x300
Mar  2 09:20:02 x4 kernel: [<ffffffff81082dd4>] ? task_work_run+0xb4/0x100
Mar  2 09:20:02 x4 kernel: [<ffffffff8103aad5>] ? do_notify_resume+0x55/0x80
Mar  2 09:20:02 x4 kernel: [<ffffffff81698a92>] ? system_call_fastpath+0x12/0x17
Mar  2 09:20:02 x4 kernel: ---[ end trace de951903f2a71b07 ]---

-- 
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
  2015-03-02 11:25     ` Markus Trippelsdorf
@ 2015-03-02 12:07       ` Filipe David Manana
  2015-03-02 13:29         ` Markus Trippelsdorf
  0 siblings, 1 reply; 9+ messages in thread
From: Filipe David Manana @ 2015-03-02 12:07 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: Chris Mason, linux-btrfs, LKML

On Mon, Mar 2, 2015 at 11:25 AM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> On 2015.02.24 at 13:29 +0100, Markus Trippelsdorf wrote:
>> On 2015.02.20 at 11:09 +0100, Markus Trippelsdorf wrote:
>> >
>> > I get the following warnings during Firefox LTO build. lto1-wpa-stream
>> > outputs the final object files in parallel and therefore stresses the
>> > filessystem.
>> > These warnings started with the git merge above.
>> >
>> > The disk is a conventional drive:
>> >
>> > [    2.438132] scsi 1:0:0:0: Direct-Access     ATA      ST2000DM001-1CH1 CC29 PQ: 0 ANSI: 5
>> > [    2.438308] sd 1:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
>> > [    2.438310] sd 1:0:0:0: [sda] 4096-byte physical blocks
>> >
>> > /dev/sda2      btrfs     1.9T  905G  946G  49% /var
>> > /dev/sda2 on /var type btrfs (rw,relatime,compress=lzo,noacl,space_cache)
>> >
>> >
>> > [ 4155.708579] ------------[ cut here ]------------
>> > [ 4155.708590] WARNING: CPU: 1 PID: 8850 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
>> > [ 4155.708593] CPU: 1 PID: 8850 Comm: lto1-wpa-stream Not tainted 3.19.0-08975-g3d883483dc0a-dirty #101
>> > [ 4155.708594] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> > [ 4155.708595]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
>> > [ 4155.708597]  ffffffff8106d2d2 ffff8800dad9bb78 ffff88018554ccc0 ffff880215e2e000
>> > [ 4155.708599]  ffff880215f23000 0000000000000000 ffffffff8121b6f8 0000000000000000
>> > [ 4155.708601] Call Trace:
>> > [ 4155.708606]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
>> > [ 4155.708609]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> > [ 4155.708611]  [<ffffffff8121b6f8>] ? btrfs_destroy_inode+0x278/0x2a0
>> > [ 4155.708614]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
>> > [ 4155.708615]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
>> > [ 4155.708618]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
>> > [ 4155.708621]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
>> > [ 4155.708623]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
>> > [ 4155.708625]  [<ffffffff810e3241>] ? try_to_free_pages+0x1e1/0x320
>> > [ 4155.708626]  [<ffffffff810daa82>] ? __alloc_pages_nodemask+0x382/0x680
>> > [ 4155.708629]  [<ffffffff810f597d>] ? handle_mm_fault+0xbbd/0xe60
>> > [ 4155.708631]  [<ffffffff81092e15>] ? put_prev_task_fair+0x75/0x320
>> > [ 4155.708632]  [<ffffffff810903b0>] ? __dequeue_entity+0x30/0x40
>> > [ 4155.708633]  [<ffffffff81094975>] ? pick_next_task_fair+0x415/0x480
>> > [ 4155.708636]  [<ffffffff81064144>] ? __do_page_fault+0x104/0x3a0
>> > [ 4155.708637]  [<ffffffff8168fb77>] ? __schedule+0x257/0x860
>> > [ 4155.708639]  [<ffffffff8169518f>] ? page_fault+0x1f/0x30
>> > [ 4155.708640] ---[ end trace 265993ee076d84aa ]---
>> > [ 4155.708641] ------------[ cut here ]------------
>> > [ 4155.708643] WARNING: CPU: 1 PID: 8850 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
>> > [ 4155.708644] CPU: 1 PID: 8850 Comm: lto1-wpa-stream Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
>> > [ 4155.708645] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> > [ 4155.708645]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
>> > [ 4155.708647]  ffffffff8106d2d2 ffff8800dad9bb78 ffff88018554ccc0 ffff880215e2e000
>> > [ 4155.708648]  ffff880215f23000 0000000000000000 ffffffff8121b672 0000000000000000
>> > [ 4155.708649] Call Trace:
>> > [ 4155.708651]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
>> > [ 4155.708652]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> > [ 4155.708654]  [<ffffffff8121b672>] ? btrfs_destroy_inode+0x1f2/0x2a0
>> > [ 4155.708655]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
>> > [ 4155.708656]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
>> > [ 4155.708658]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
>> > [ 4155.708659]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
>> > [ 4155.708661]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
>> > [ 4155.708662]  [<ffffffff810e3241>] ? try_to_free_pages+0x1e1/0x320
>> > [ 4155.708664]  [<ffffffff810daa82>] ? __alloc_pages_nodemask+0x382/0x680
>> > [ 4155.708665]  [<ffffffff810f597d>] ? handle_mm_fault+0xbbd/0xe60
>> > [ 4155.708667]  [<ffffffff81092e15>] ? put_prev_task_fair+0x75/0x320
>> > [ 4155.708668]  [<ffffffff810903b0>] ? __dequeue_entity+0x30/0x40
>> > [ 4155.708669]  [<ffffffff81094975>] ? pick_next_task_fair+0x415/0x480
>> > [ 4155.708670]  [<ffffffff81064144>] ? __do_page_fault+0x104/0x3a0
>> > [ 4155.708672]  [<ffffffff8168fb77>] ? __schedule+0x257/0x860
>> > [ 4155.708673]  [<ffffffff8169518f>] ? page_fault+0x1f/0x30
>> > [ 4155.708674] ---[ end trace 265993ee076d84ab ]---
>> > [ 4156.021127] ------------[ cut here ]------------
>> > [ 4156.021136] WARNING: CPU: 3 PID: 35 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
>> > [ 4156.021139] CPU: 3 PID: 35 Comm: kswapd0 Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
>> > [ 4156.021140] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> > [ 4156.021141]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
>> > [ 4156.021143]  ffffffff8106d2d2 ffff8802160dfcb8 ffff88006b07a690 ffff880215e2e000
>> > [ 4156.021145]  ffff880215f23000 0000000000000000 ffffffff8121b6f8 0000000000000000
>> > [ 4156.021146] Call Trace:
>> > [ 4156.021151]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
>> > [ 4156.021154]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> > [ 4156.021156]  [<ffffffff8121b6f8>] ? btrfs_destroy_inode+0x278/0x2a0
>> > [ 4156.021159]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
>> > [ 4156.021160]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
>> > [ 4156.021163]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
>> > [ 4156.021166]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
>> > [ 4156.021168]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
>> > [ 4156.021169]  [<ffffffff810e3698>] ? kswapd+0x318/0x6c0
>> > [ 4156.021171]  [<ffffffff810e3380>] ? try_to_free_pages+0x320/0x320
>> > [ 4156.021173]  [<ffffffff81084c3c>] ? kthread+0xbc/0xe0
>> > [ 4156.021175]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
>> > [ 4156.021177]  [<ffffffff81693bec>] ? ret_from_fork+0x7c/0xb0
>> > [ 4156.021178]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
>> > [ 4156.021179] ---[ end trace 265993ee076d84ac ]---
>> > [ 4156.021180] ------------[ cut here ]------------
>> > [ 4156.021182] WARNING: CPU: 3 PID: 35 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
>> > [ 4156.021183] CPU: 3 PID: 35 Comm: kswapd0 Tainted: G        W       3.19.0-08975-g3d883483dc0a-dirty #101
>> > [ 4156.021184] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> > [ 4156.021184]  0000000000000000 ffffffff81999aad ffffffff8168d303 0000000000000000
>> > [ 4156.021186]  ffffffff8106d2d2 ffff8802160dfcb8 ffff88006b07a690 ffff880215e2e000
>> > [ 4156.021187]  ffff880215f23000 0000000000000000 ffffffff8121b672 0000000000000000
>> > [ 4156.021188] Call Trace:
>> > [ 4156.021190]  [<ffffffff8168d303>] ? dump_stack+0x40/0x50
>> > [ 4156.021191]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> > [ 4156.021192]  [<ffffffff8121b672>] ? btrfs_destroy_inode+0x1f2/0x2a0
>> > [ 4156.021194]  [<ffffffff81129381>] ? dispose_list+0x41/0x60
>> > [ 4156.021195]  [<ffffffff81129669>] ? prune_icache_sb+0x49/0x60
>> > [ 4156.021197]  [<ffffffff8111205a>] ? super_cache_scan+0x13a/0x1a0
>> > [ 4156.021198]  [<ffffffff810e0a1b>] ? shrink_slab.part.52.constprop.62+0x19b/0x240
>> > [ 4156.021200]  [<ffffffff810e3049>] ? shrink_zone+0x89/0xa0
>> > [ 4156.021201]  [<ffffffff810e3698>] ? kswapd+0x318/0x6c0
>> > [ 4156.021203]  [<ffffffff810e3380>] ? try_to_free_pages+0x320/0x320
>> > [ 4156.021204]  [<ffffffff81084c3c>] ? kthread+0xbc/0xe0
>> > [ 4156.021205]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
>> > [ 4156.021207]  [<ffffffff81693bec>] ? ret_from_fork+0x7c/0xb0
>> > [ 4156.021208]  [<ffffffff81084b80>] ? __kthread_parkme+0x80/0x80
>> > [ 4156.021209] ---[ end trace 265993ee076d84ad ]---
>>
>> Also happens when I remove directories:
>>
>> [83159.023857] ------------[ cut here ]------------
>> [83159.023865] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
>> [83159.023868] CPU: 2 PID: 32343 Comm: rm Not tainted 4.0.0-rc1-dirty #104
>> [83159.023869] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> [83159.023870]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
>> [83159.023872]  ffffffff8106d2d2 0000000000000000 ffff880008dd8560 ffff880215805800
>> [83159.023873]  ffff880169477eb8 ffff880008dd8560 ffffffff8121bab8 ffff880100675000
>> [83159.023874] Call Trace:
>> [83159.023878]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
>> [83159.023881]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> [83159.023882]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
>> [83159.023885]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
>> [83159.023887]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
>> [83159.023889]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
>> [83159.023891]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
>> [83159.023892] ---[ end trace 3b7c45c6e46fe8db ]---
>> [83159.023892] ------------[ cut here ]------------
>> [83159.023894] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
>> [83159.023895] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
>> [83159.023896] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> [83159.023897]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
>> [83159.023898]  ffffffff8106d2d2 0000000000000000 ffff880008dd8560 ffff880215805800
>> [83159.023899]  ffff880169477eb8 ffff880008dd8560 ffffffff8121ba32 ffff880100675000
>> [83159.023900] Call Trace:
>> [83159.023902]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
>> [83159.023903]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> [83159.023905]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
>> [83159.023906]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
>> [83159.023907]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
>> [83159.023909]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
>> [83159.023910]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
>> [83159.023911] ---[ end trace 3b7c45c6e46fe8dc ]---
>> [83159.038708] ------------[ cut here ]------------
>> [83159.038716] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
>> [83159.038718] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
>> [83159.038719] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> [83159.038720]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
>> [83159.038722]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
>> [83159.038723]  ffff880169477eb8 ffff88005756edf0 ffffffff8121bab8 ffff880100675000
>> [83159.038725] Call Trace:
>> [83159.038728]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
>> [83159.038731]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> [83159.038732]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
>> [83159.038735]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
>> [83159.038737]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
>> [83159.038740]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
>> [83159.038742]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
>> [83159.038743] ---[ end trace 3b7c45c6e46fe8dd ]---
>> [83159.038744] ------------[ cut here ]------------
>> [83159.038745] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
>> [83159.038746] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
>> [83159.038747] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> [83159.038747]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
>> [83159.038749]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
>> [83159.038750]  ffff880169477eb8 ffff88005756edf0 ffffffff8121ba32 ffff880100675000
>> [83159.038751] Call Trace:
>> [83159.038753]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
>> [83159.038754]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> [83159.038755]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
>> [83159.038757]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
>> [83159.038758]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
>> [83159.038760]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
>> [83159.038761]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
>> [83159.038762] ---[ end trace 3b7c45c6e46fe8de ]---
>
> Unfortunately the issue isn't 100% reproducible, so I unfortunately
> cannot bisect.

You probably don't need to bisect. The warning is related to the
outstanding_extents counter being != 0:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/btrfs/inode.c?id=refs/tags/v4.0-rc1#n8693

The only change in 4.0 that changes updates to that counter is:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3e05bde8c3c2dd761da4d52944a087907955a53c

So that's likely the change you would find with a bisect.

thanks

>
> Another example:
> ...
> Mar  2 06:58:24 x4 kernel: BTRFS info (device sdb3): disk space caching is enabled
> Mar  2 06:58:25 x4 kernel: microcode: CPU0: new patch_level=0x010000db
> Mar  2 06:58:25 x4 kernel: microcode: CPU1: new patch_level=0x010000db
> Mar  2 06:58:25 x4 kernel: microcode: CPU2: new patch_level=0x010000db
> Mar  2 06:58:25 x4 kernel: microcode: CPU3: new patch_level=0x010000db
> Mar  2 06:58:26 x4 kernel: Adding 4095996k swap on /dev/sda1.  Priority:-1 extents:1 across:4095996k
> Mar  2 09:09:58 x4 kernel: BTRFS warning (device sda2): block group 885866364928 has wrong amount of free space
> Mar  2 09:09:58 x4 kernel: BTRFS warning (device sda2): failed to load free space cache for block group 885866364928, rebuild it now
> Mar  2 09:20:02 x4 kernel: ------------[ cut here ]------------
> Mar  2 09:20:02 x4 kernel: WARNING: CPU: 0 PID: 14596 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> Mar  2 09:20:02 x4 kernel: CPU: 0 PID: 14596 Comm: rm Not tainted 4.0.0-rc1-00151-ga38ecbbd0be0-dirty #110
> Mar  2 09:20:02 x4 kernel: Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> Mar  2 09:20:02 x4 kernel: 0000000000000000 ffffffff8199e119 ffffffff8169214e 0000000000000000
> Mar  2 09:20:02 x4 kernel: ffffffff8106c4f2 0000000000000000 ffff8801095b8910 ffff880216a6d000
> Mar  2 09:20:02 x4 kernel: ffff88007060beb8 ffff8801095b8910 ffffffff8121a3b8 ffff88019db09000
> Mar  2 09:20:02 x4 kernel: Call Trace:
> Mar  2 09:20:02 x4 kernel: [<ffffffff8169214e>] ? dump_stack+0x40/0x50
> Mar  2 09:20:02 x4 kernel: [<ffffffff8106c4f2>] ? warn_slowpath_common+0x72/0xc0
> Mar  2 09:20:02 x4 kernel: [<ffffffff8121a3b8>] ? btrfs_destroy_inode+0x278/0x2a0
> Mar  2 09:20:02 x4 kernel: [<ffffffff8111e9e7>] ? do_unlinkat+0x127/0x300
> Mar  2 09:20:02 x4 kernel: [<ffffffff81082dd4>] ? task_work_run+0xb4/0x100
> Mar  2 09:20:02 x4 kernel: [<ffffffff8103aad5>] ? do_notify_resume+0x55/0x80
> Mar  2 09:20:02 x4 kernel: [<ffffffff81698a92>] ? system_call_fastpath+0x12/0x17
> Mar  2 09:20:02 x4 kernel: ---[ end trace de951903f2a71b04 ]---
> Mar  2 09:20:02 x4 kernel: ------------[ cut here ]------------
> Mar  2 09:20:02 x4 kernel: WARNING: CPU: 0 PID: 14596 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> Mar  2 09:20:02 x4 kernel: CPU: 0 PID: 14596 Comm: rm Tainted: G        W       4.0.0-rc1-00151-ga38ecbbd0be0-dirty #110
> Mar  2 09:20:02 x4 kernel: Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> Mar  2 09:20:02 x4 kernel: 0000000000000000 ffffffff8199e119 ffffffff8169214e 0000000000000000
> Mar  2 09:20:02 x4 kernel: ffffffff8106c4f2 0000000000000000 ffff8801095b8910 ffff880216a6d000
> Mar  2 09:20:02 x4 kernel: ffff88007060beb8 ffff8801095b8910 ffffffff8121a332 ffff88019db09000
> Mar  2 09:20:02 x4 kernel: Call Trace:
> Mar  2 09:20:02 x4 kernel: [<ffffffff8169214e>] ? dump_stack+0x40/0x50
> Mar  2 09:20:02 x4 kernel: [<ffffffff8106c4f2>] ? warn_slowpath_common+0x72/0xc0
> Mar  2 09:20:02 x4 kernel: [<ffffffff8121a332>] ? btrfs_destroy_inode+0x1f2/0x2a0
> Mar  2 09:20:02 x4 kernel: [<ffffffff8111e9e7>] ? do_unlinkat+0x127/0x300
> Mar  2 09:20:02 x4 kernel: [<ffffffff81082dd4>] ? task_work_run+0xb4/0x100
> Mar  2 09:20:02 x4 kernel: [<ffffffff8103aad5>] ? do_notify_resume+0x55/0x80
> Mar  2 09:20:02 x4 kernel: [<ffffffff81698a92>] ? system_call_fastpath+0x12/0x17
> Mar  2 09:20:02 x4 kernel: ---[ end trace de951903f2a71b05 ]---
> Mar  2 09:20:02 x4 kernel: ------------[ cut here ]------------
> Mar  2 09:20:02 x4 kernel: WARNING: CPU: 0 PID: 14596 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> Mar  2 09:20:02 x4 kernel: CPU: 0 PID: 14596 Comm: rm Tainted: G        W       4.0.0-rc1-00151-ga38ecbbd0be0-dirty #110
> Mar  2 09:20:02 x4 kernel: Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> Mar  2 09:20:02 x4 kernel: 0000000000000000 ffffffff8199e119 ffffffff8169214e 0000000000000000
> Mar  2 09:20:02 x4 kernel: ffffffff8106c4f2 0000000000000000 ffff88007fda01b0 ffff880216a6d000
> Mar  2 09:20:02 x4 kernel: ffff88007060beb8 ffff88007fda01b0 ffffffff8121a3b8 ffff88019db09000
> Mar  2 09:20:02 x4 kernel: Call Trace:
> Mar  2 09:20:02 x4 kernel: [<ffffffff8169214e>] ? dump_stack+0x40/0x50
> Mar  2 09:20:02 x4 kernel: [<ffffffff8106c4f2>] ? warn_slowpath_common+0x72/0xc0
> Mar  2 09:20:02 x4 kernel: [<ffffffff8121a3b8>] ? btrfs_destroy_inode+0x278/0x2a0
> Mar  2 09:20:02 x4 kernel: [<ffffffff8111e9e7>] ? do_unlinkat+0x127/0x300
> Mar  2 09:20:02 x4 kernel: [<ffffffff81082dd4>] ? task_work_run+0xb4/0x100
> Mar  2 09:20:02 x4 kernel: [<ffffffff8103aad5>] ? do_notify_resume+0x55/0x80
> Mar  2 09:20:02 x4 kernel: [<ffffffff81698a92>] ? system_call_fastpath+0x12/0x17
> Mar  2 09:20:02 x4 kernel: ---[ end trace de951903f2a71b06 ]---
> Mar  2 09:20:02 x4 kernel: ------------[ cut here ]------------
> Mar  2 09:20:02 x4 kernel: WARNING: CPU: 0 PID: 14596 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> Mar  2 09:20:02 x4 kernel: CPU: 0 PID: 14596 Comm: rm Tainted: G        W       4.0.0-rc1-00151-ga38ecbbd0be0-dirty #110
> Mar  2 09:20:02 x4 kernel: Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> Mar  2 09:20:02 x4 kernel: 0000000000000000 ffffffff8199e119 ffffffff8169214e 0000000000000000
> Mar  2 09:20:02 x4 kernel: ffffffff8106c4f2 0000000000000000 ffff88007fda01b0 ffff880216a6d000
> Mar  2 09:20:02 x4 kernel: ffff88007060beb8 ffff88007fda01b0 ffffffff8121a332 ffff88019db09000
> Mar  2 09:20:02 x4 kernel: Call Trace:
> Mar  2 09:20:02 x4 kernel: [<ffffffff8169214e>] ? dump_stack+0x40/0x50
> Mar  2 09:20:02 x4 kernel: [<ffffffff8106c4f2>] ? warn_slowpath_common+0x72/0xc0
> Mar  2 09:20:02 x4 kernel: [<ffffffff8121a332>] ? btrfs_destroy_inode+0x1f2/0x2a0
> Mar  2 09:20:02 x4 kernel: [<ffffffff8111e9e7>] ? do_unlinkat+0x127/0x300
> Mar  2 09:20:02 x4 kernel: [<ffffffff81082dd4>] ? task_work_run+0xb4/0x100
> Mar  2 09:20:02 x4 kernel: [<ffffffff8103aad5>] ? do_notify_resume+0x55/0x80
> Mar  2 09:20:02 x4 kernel: [<ffffffff81698a92>] ? system_call_fastpath+0x12/0x17
> Mar  2 09:20:02 x4 kernel: ---[ end trace de951903f2a71b07 ]---
>
> --
> Markus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
  2015-03-02 12:07       ` Filipe David Manana
@ 2015-03-02 13:29         ` Markus Trippelsdorf
  2015-03-03 14:13           ` Markus Trippelsdorf
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Trippelsdorf @ 2015-03-02 13:29 UTC (permalink / raw)
  To: Filipe David Manana; +Cc: Chris Mason, linux-btrfs, LKML

On 2015.03.02 at 12:07 +0000, Filipe David Manana wrote:
> >> [83159.038708] ------------[ cut here ]------------
> >> [83159.038716] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> >> [83159.038718] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> >> [83159.038719] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> >> [83159.038720]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> >> [83159.038722]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
> >> [83159.038723]  ffff880169477eb8 ffff88005756edf0 ffffffff8121bab8 ffff880100675000
> >> [83159.038725] Call Trace:
> >> [83159.038728]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> >> [83159.038731]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> >> [83159.038732]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
> >> [83159.038735]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> >> [83159.038737]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> >> [83159.038740]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> >> [83159.038742]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> >> [83159.038743] ---[ end trace 3b7c45c6e46fe8dd ]---
> >> [83159.038744] ------------[ cut here ]------------
> >> [83159.038745] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> >> [83159.038746] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> >> [83159.038747] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> >> [83159.038747]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> >> [83159.038749]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
> >> [83159.038750]  ffff880169477eb8 ffff88005756edf0 ffffffff8121ba32 ffff880100675000
> >> [83159.038751] Call Trace:
> >> [83159.038753]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> >> [83159.038754]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> >> [83159.038755]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
> >> [83159.038757]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> >> [83159.038758]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> >> [83159.038760]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> >> [83159.038761]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> >> [83159.038762] ---[ end trace 3b7c45c6e46fe8de ]---
> >
> > Unfortunately the issue isn't 100% reproducible, so I unfortunately
> > cannot bisect.
> 
> You probably don't need to bisect. The warning is related to the
> outstanding_extents counter being != 0:
> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/btrfs/inode.c?id=refs/tags/v4.0-rc1#n8693
> 
> The only change in 4.0 that changes updates to that counter is:
> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3e05bde8c3c2dd761da4d52944a087907955a53c
> 
> So that's likely the change you would find with a bisect.

OK, thank you. I will revert the commit and see if it fixes the issue.

-- 
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
  2015-03-02 13:29         ` Markus Trippelsdorf
@ 2015-03-03 14:13           ` Markus Trippelsdorf
  2015-03-07  9:35             ` Filipe David Manana
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Trippelsdorf @ 2015-03-03 14:13 UTC (permalink / raw)
  To: Filipe David Manana; +Cc: Chris Mason, linux-btrfs, LKML

On 2015.03.02 at 14:29 +0100, Markus Trippelsdorf wrote:
> On 2015.03.02 at 12:07 +0000, Filipe David Manana wrote:
> > >> [83159.038708] ------------[ cut here ]------------
> > >> [83159.038716] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> > >> [83159.038718] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> > >> [83159.038719] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> > >> [83159.038720]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> > >> [83159.038722]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
> > >> [83159.038723]  ffff880169477eb8 ffff88005756edf0 ffffffff8121bab8 ffff880100675000
> > >> [83159.038725] Call Trace:
> > >> [83159.038728]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> > >> [83159.038731]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> > >> [83159.038732]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
> > >> [83159.038735]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> > >> [83159.038737]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> > >> [83159.038740]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> > >> [83159.038742]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> > >> [83159.038743] ---[ end trace 3b7c45c6e46fe8dd ]---
> > >> [83159.038744] ------------[ cut here ]------------
> > >> [83159.038745] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> > >> [83159.038746] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> > >> [83159.038747] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> > >> [83159.038747]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> > >> [83159.038749]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
> > >> [83159.038750]  ffff880169477eb8 ffff88005756edf0 ffffffff8121ba32 ffff880100675000
> > >> [83159.038751] Call Trace:
> > >> [83159.038753]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> > >> [83159.038754]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> > >> [83159.038755]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
> > >> [83159.038757]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> > >> [83159.038758]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> > >> [83159.038760]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> > >> [83159.038761]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> > >> [83159.038762] ---[ end trace 3b7c45c6e46fe8de ]---
> > >
> > > Unfortunately the issue isn't 100% reproducible, so I unfortunately
> > > cannot bisect.
> > 
> > You probably don't need to bisect. The warning is related to the
> > outstanding_extents counter being != 0:
> > 
> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/btrfs/inode.c?id=refs/tags/v4.0-rc1#n8693
> > 
> > The only change in 4.0 that changes updates to that counter is:
> > 
> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3e05bde8c3c2dd761da4d52944a087907955a53c
> > 
> > So that's likely the change you would find with a bisect.
> 
> OK, thank you. I will revert the commit and see if it fixes the issue.

No. Reverting 3e05bde8c3 does _not_ fix the issue. It still happens.

-- 
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
  2015-03-03 14:13           ` Markus Trippelsdorf
@ 2015-03-07  9:35             ` Filipe David Manana
  2015-03-10 11:42               ` Markus Trippelsdorf
  0 siblings, 1 reply; 9+ messages in thread
From: Filipe David Manana @ 2015-03-07  9:35 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: Chris Mason, linux-btrfs, LKML

On Tue, Mar 3, 2015 at 2:13 PM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> On 2015.03.02 at 14:29 +0100, Markus Trippelsdorf wrote:
>> On 2015.03.02 at 12:07 +0000, Filipe David Manana wrote:
>> > >> [83159.038708] ------------[ cut here ]------------
>> > >> [83159.038716] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
>> > >> [83159.038718] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
>> > >> [83159.038719] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> > >> [83159.038720]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
>> > >> [83159.038722]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
>> > >> [83159.038723]  ffff880169477eb8 ffff88005756edf0 ffffffff8121bab8 ffff880100675000
>> > >> [83159.038725] Call Trace:
>> > >> [83159.038728]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
>> > >> [83159.038731]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> > >> [83159.038732]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
>> > >> [83159.038735]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
>> > >> [83159.038737]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
>> > >> [83159.038740]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
>> > >> [83159.038742]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
>> > >> [83159.038743] ---[ end trace 3b7c45c6e46fe8dd ]---
>> > >> [83159.038744] ------------[ cut here ]------------
>> > >> [83159.038745] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
>> > >> [83159.038746] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
>> > >> [83159.038747] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
>> > >> [83159.038747]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
>> > >> [83159.038749]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
>> > >> [83159.038750]  ffff880169477eb8 ffff88005756edf0 ffffffff8121ba32 ffff880100675000
>> > >> [83159.038751] Call Trace:
>> > >> [83159.038753]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
>> > >> [83159.038754]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
>> > >> [83159.038755]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
>> > >> [83159.038757]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
>> > >> [83159.038758]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
>> > >> [83159.038760]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
>> > >> [83159.038761]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
>> > >> [83159.038762] ---[ end trace 3b7c45c6e46fe8de ]---
>> > >
>> > > Unfortunately the issue isn't 100% reproducible, so I unfortunately
>> > > cannot bisect.
>> >
>> > You probably don't need to bisect. The warning is related to the
>> > outstanding_extents counter being != 0:
>> >
>> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/btrfs/inode.c?id=refs/tags/v4.0-rc1#n8693
>> >
>> > The only change in 4.0 that changes updates to that counter is:
>> >
>> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3e05bde8c3c2dd761da4d52944a087907955a53c
>> >
>> > So that's likely the change you would find with a bisect.
>>
>> OK, thank you. I will revert the commit and see if it fixes the issue.
>
> No. Reverting 3e05bde8c3 does _not_ fix the issue. It still happens.

Ok, so I ran into this as well, and identified the following patch as
the source of the problem:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dcab6a3b2ae657a2017637083c28ee303b6b1b8e

It's actually very easy to trigger. The following fio job config triggers it:

[global]
ioengine=sync
direct=0
bssplit=130M/100
fallocate=none
filename=foobar

[job1]
numjobs=1
size=1G
rw=randwrite

Then run these steps:

mkfs.btrfs -f /dev/sdd
mount /dev/sdd /mnt
cd /mnt
fio fio_job.ini
cd ..
umount /mnt
(see dmesg)

The important part is that the writes need to be larger than 128Mb.
With btrfs assertions enabled (CONFIG_BTRFS_ASSERT=y) you'll get a
BUG_ON() immediately:

[211158.555563] BTRFS: assertion failed:
BTRFS_I(inode)->outstanding_extents >= num_extents, file:
fs/btrfs/extent-tree.c, line: 4983
[211158.557901] ------------[ cut here ]------------
[211158.558666] kernel BUG at fs/btrfs/ctree.h:4013!
[211158.559660] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
(....)
[211158.561837] Call Trace:
[211158.561837]  [<ffffffffa0474666>] drop_outstanding_extent+0x3d/0x6d [btrfs]
[211158.561837]  [<ffffffffa047a5b8>]
btrfs_delalloc_release_metadata+0x53/0xfc [btrfs]
(....)

Otherwise only the warnings you reported during inode eviction.

This happens for both direct IO and buffered writes (direct=0). At
least for the direct IO case, the issue happens due to underflows when
decrementing the inode's outstanding_extents counter (after the very
first write we get outstanding_extents = (unsigned)1 - 2 =
4294967295).

thanks

>
> --
> Markus



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
  2015-03-07  9:35             ` Filipe David Manana
@ 2015-03-10 11:42               ` Markus Trippelsdorf
  0 siblings, 0 replies; 9+ messages in thread
From: Markus Trippelsdorf @ 2015-03-10 11:42 UTC (permalink / raw)
  To: Filipe David Manana; +Cc: Chris Mason, linux-btrfs, LKML, Josef Bacik

On 2015.03.07 at 09:35 +0000, Filipe David Manana wrote:
> On Tue, Mar 3, 2015 at 2:13 PM, Markus Trippelsdorf
> <markus@trippelsdorf.de> wrote:
> > On 2015.03.02 at 14:29 +0100, Markus Trippelsdorf wrote:
> >> On 2015.03.02 at 12:07 +0000, Filipe David Manana wrote:
> >> > >> [83159.038708] ------------[ cut here ]------------
> >> > >> [83159.038716] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()
> >> > >> [83159.038718] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> >> > >> [83159.038719] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> >> > >> [83159.038720]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> >> > >> [83159.038722]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
> >> > >> [83159.038723]  ffff880169477eb8 ffff88005756edf0 ffffffff8121bab8 ffff880100675000
> >> > >> [83159.038725] Call Trace:
> >> > >> [83159.038728]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> >> > >> [83159.038731]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> >> > >> [83159.038732]  [<ffffffff8121bab8>] ? btrfs_destroy_inode+0x278/0x2a0
> >> > >> [83159.038735]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> >> > >> [83159.038737]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> >> > >> [83159.038740]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> >> > >> [83159.038742]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> >> > >> [83159.038743] ---[ end trace 3b7c45c6e46fe8dd ]---
> >> > >> [83159.038744] ------------[ cut here ]------------
> >> > >> [83159.038745] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8694 btrfs_destroy_inode+0x1f2/0x2a0()
> >> > >> [83159.038746] CPU: 2 PID: 32343 Comm: rm Tainted: G        W       4.0.0-rc1-dirty #104
> >> > >> [83159.038747] Hardware name: System manufacturer System Product Name/M4A78T-E, BIOS 3503    04/13/2011
> >> > >> [83159.038747]  0000000000000000 ffffffff8199990f ffffffff8168d723 0000000000000000
> >> > >> [83159.038749]  ffffffff8106d2d2 0000000000000000 ffff88005756edf0 ffff880215805800
> >> > >> [83159.038750]  ffff880169477eb8 ffff88005756edf0 ffffffff8121ba32 ffff880100675000
> >> > >> [83159.038751] Call Trace:
> >> > >> [83159.038753]  [<ffffffff8168d723>] ? dump_stack+0x40/0x50
> >> > >> [83159.038754]  [<ffffffff8106d2d2>] ? warn_slowpath_common+0x72/0xc0
> >> > >> [83159.038755]  [<ffffffff8121ba32>] ? btrfs_destroy_inode+0x1f2/0x2a0
> >> > >> [83159.038757]  [<ffffffff8111f747>] ? do_unlinkat+0x1a7/0x2e0
> >> > >> [83159.038758]  [<ffffffff81083974>] ? task_work_run+0xb4/0x100
> >> > >> [83159.038760]  [<ffffffff8103b9a9>] ? do_notify_resume+0x69/0x80
> >> > >> [83159.038761]  [<ffffffff81694092>] ? system_call_fastpath+0x12/0x17
> >> > >> [83159.038762] ---[ end trace 3b7c45c6e46fe8de ]---
> >> > >
> >> > > Unfortunately the issue isn't 100% reproducible, so I unfortunately
> >> > > cannot bisect.
> >> >
> >> > You probably don't need to bisect. The warning is related to the
> >> > outstanding_extents counter being != 0:
> >> >
> >> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/btrfs/inode.c?id=refs/tags/v4.0-rc1#n8693
> >> >
> >> > The only change in 4.0 that changes updates to that counter is:
> >> >
> >> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3e05bde8c3c2dd761da4d52944a087907955a53c
> >> >
> >> > So that's likely the change you would find with a bisect.
> >>
> >> OK, thank you. I will revert the commit and see if it fixes the issue.
> >
> > No. Reverting 3e05bde8c3 does _not_ fix the issue. It still happens.
> 
> Ok, so I ran into this as well, and identified the following patch as
> the source of the problem:
> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dcab6a3b2ae657a2017637083c28ee303b6b1b8e
> 
> It's actually very easy to trigger. The following fio job config triggers it:
> 
> [global]
> ioengine=sync
> direct=0
> bssplit=130M/100
> fallocate=none
> filename=foobar
> 
> [job1]
> numjobs=1
> size=1G
> rw=randwrite
> 
> Then run these steps:
> 
> mkfs.btrfs -f /dev/sdd
> mount /dev/sdd /mnt
> cd /mnt
> fio fio_job.ini
> cd ..
> umount /mnt
> (see dmesg)
> 
> The important part is that the writes need to be larger than 128Mb.
> With btrfs assertions enabled (CONFIG_BTRFS_ASSERT=y) you'll get a
> BUG_ON() immediately:
> 
> [211158.555563] BTRFS: assertion failed:
> BTRFS_I(inode)->outstanding_extents >= num_extents, file:
> fs/btrfs/extent-tree.c, line: 4983
> [211158.557901] ------------[ cut here ]------------
> [211158.558666] kernel BUG at fs/btrfs/ctree.h:4013!
> [211158.559660] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
> (....)
> [211158.561837] Call Trace:
> [211158.561837]  [<ffffffffa0474666>] drop_outstanding_extent+0x3d/0x6d [btrfs]
> [211158.561837]  [<ffffffffa047a5b8>]
> btrfs_delalloc_release_metadata+0x53/0xfc [btrfs]
> (....)
> 
> Otherwise only the warnings you reported during inode eviction.
> 
> This happens for both direct IO and buffered writes (direct=0). At
> least for the direct IO case, the issue happens due to underflows when
> decrementing the inode's outstanding_extents counter (after the very
> first write we get outstanding_extents = (unsigned)1 - 2 =
> 4294967295).

Josef?

-- 
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-10 11:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19 20:36 [GIT PULL] Btrfs Chris Mason
2015-02-20 10:09 ` Markus Trippelsdorf
2015-02-24 12:29   ` WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0() Markus Trippelsdorf
2015-03-02 11:25     ` Markus Trippelsdorf
2015-03-02 12:07       ` Filipe David Manana
2015-03-02 13:29         ` Markus Trippelsdorf
2015-03-03 14:13           ` Markus Trippelsdorf
2015-03-07  9:35             ` Filipe David Manana
2015-03-10 11:42               ` Markus Trippelsdorf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).