syzbot


KCSAN: data-race in btrfs_wait_block_group_cache_progress / link_free_space

Status: auto-closed as invalid on 2021/05/17 23:12
Subsystems: btrfs
[Documentation on labels]
First crash: 1132d, last: 1102d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in btrfs_wait_block_group_cache_progress / link_free_space

write to 0xffff88810a7bbb50 of 8 bytes by task 24 on cpu 0:
 link_free_space+0x25c/0x2d0 fs/btrfs/free-space-cache.c:1743
 __btrfs_add_free_space+0x1cf/0x9de fs/btrfs/free-space-cache.c:2519
 btrfs_add_free_space_async_trimmed+0x13e/0x1d0 fs/btrfs/free-space-cache.c:2623
 add_new_free_space+0x189/0x1e0 fs/btrfs/block-group.c:503
 load_extent_tree_free fs/btrfs/block-group.c:619 [inline]
 caching_thread+0x488/0x8d0 fs/btrfs/block-group.c:688
 btrfs_work_helper+0x1e2/0x380 fs/btrfs/async-thread.c:318
 process_one_work+0x3e1/0x950 kernel/workqueue.c:2275
 worker_thread+0x616/0xa70 kernel/workqueue.c:2421
 kthread+0x20b/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

read to 0xffff88810a7bbb50 of 8 bytes by task 8387 on cpu 1:
 btrfs_wait_block_group_cache_progress+0x185/0x2c0 fs/btrfs/block-group.c:406
 find_free_extent_clustered+0x5b7/0x740 fs/btrfs/extent-tree.c:3657
 do_allocation_clustered fs/btrfs/extent-tree.c:3743 [inline]
 do_allocation fs/btrfs/extent-tree.c:3870 [inline]
 find_free_extent+0xf08/0x22a0 fs/btrfs/extent-tree.c:4309
 btrfs_reserve_extent+0x135/0x2e0 fs/btrfs/extent-tree.c:4441
 btrfs_alloc_tree_block+0xfe/0x880 fs/btrfs/extent-tree.c:4840
 alloc_tree_block_no_bg_flush fs/btrfs/ctree.c:992 [inline]
 __btrfs_cow_block+0x2f2/0xac0 fs/btrfs/ctree.c:1048
 btrfs_cow_block+0x252/0x3a0 fs/btrfs/ctree.c:1495
 commit_cowonly_roots+0x94/0x590 fs/btrfs/transaction.c:1233
 btrfs_commit_transaction+0x99f/0x1980 fs/btrfs/transaction.c:2293
 btrfs_commit_super+0x8f/0xa0 fs/btrfs/disk-io.c:4210
 close_ctree+0x1c0/0x52d fs/btrfs/disk-io.c:4275
 btrfs_put_super+0x21/0x30 fs/btrfs/super.c:325
 generic_shutdown_super+0xde/0x210 fs/super.c:464
 kill_anon_super+0x23/0x40 fs/super.c:1056
 btrfs_kill_super+0x26/0x40 fs/btrfs/super.c:2353
 deactivate_locked_super+0x6a/0xb0 fs/super.c:335
 deactivate_super+0x85/0x90 fs/super.c:366
 cleanup_mnt+0x277/0x2e0 fs/namespace.c:1136
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1143
 task_work_run+0x8e/0x110 kernel/task_work.c:140
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:174 [inline]
 exit_to_user_mode_prepare+0x17c/0x1b0 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8387 Comm: syz-executor.4 Tainted: G        W         5.12.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/12 23:10 upstream 89698becf06d 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in btrfs_wait_block_group_cache_progress / link_free_space
2021/04/10 13:30 upstream 4e04e7513b0f 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in btrfs_wait_block_group_cache_progress / link_free_space
2021/04/05 11:19 upstream e49d033bddf5 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in btrfs_wait_block_group_cache_progress / link_free_space
2021/03/26 13:19 upstream db24726bfefa a8529b82 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in btrfs_wait_block_group_cache_progress / link_free_space
2021/03/21 17:01 upstream 812da4d39463 4c9a64da .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in btrfs_wait_block_group_cache_progress / link_free_space
2021/03/13 10:13 upstream f296bfd5cd04 4a003785 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in btrfs_wait_block_group_cache_progress / link_free_space
* Struck through repros no longer work on HEAD.