syzbot


memory leak in clear_state_bit

Status: upstream: reported C repro on 2023/11/24 04:07
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+81670362c283f3dd889c@syzkaller.appspotmail.com
First crash: 184d, last: 169d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] memory leak in clear_state_bit 0 (1) 2023/11/24 04:07
Last patch testing requests (9)
Created Duration User Patch Repo Result
2024/04/26 00:38 22m retest repro upstream report log
2024/04/26 00:38 20m retest repro upstream report log
2024/04/26 00:38 14m retest repro upstream report log
2024/02/13 22:22 15m retest repro upstream report log
2024/02/13 22:22 15m retest repro upstream report log
2024/02/13 22:22 10m retest repro upstream report log
2023/12/05 05:33 17m retest repro upstream report log
2023/12/05 05:33 13m retest repro upstream report log
2023/12/05 05:33 10m retest repro upstream report log

Sample crash report:
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
BUG: memory leak
unreferenced object 0xffff888100812800 (size 64):
  comm "syz-executor358", pid 5076, jiffies 4294970941 (age 12.950s)
  hex dump (first 32 bytes):
    00 00 48 00 00 00 00 00 ff ff 48 00 00 00 00 00  ..H.......H.....
    60 b6 52 02 00 c9 ff ff 60 b6 52 02 00 c9 ff ff  `.R.....`.R.....
  backtrace:
    [<ffffffff816339bd>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff816339bd>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff816339bd>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff816339bd>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
    [<ffffffff8157e845>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
    [<ffffffff8215ec8b>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff8215ec8b>] ulist_add_merge fs/btrfs/ulist.c:210 [inline]
    [<ffffffff8215ec8b>] ulist_add_merge+0xcb/0x2b0 fs/btrfs/ulist.c:198
    [<ffffffff821b3964>] add_extent_changeset fs/btrfs/extent-io-tree.c:199 [inline]
    [<ffffffff821b3964>] add_extent_changeset fs/btrfs/extent-io-tree.c:186 [inline]
    [<ffffffff821b3964>] clear_state_bit+0xa4/0x1f0 fs/btrfs/extent-io-tree.c:559
    [<ffffffff821b4b12>] __clear_extent_bit+0x432/0x840 fs/btrfs/extent-io-tree.c:731
    [<ffffffff82169c7d>] __btrfs_qgroup_release_data+0x21d/0x4a0 fs/btrfs/qgroup.c:4123
    [<ffffffff820e2737>] alloc_ordered_extent+0x57/0x2c0 fs/btrfs/ordered-data.c:159
    [<ffffffff820e2dc8>] btrfs_alloc_ordered_extent+0x78/0x4f0 fs/btrfs/ordered-data.c:274
    [<ffffffff820ab67a>] btrfs_create_dio_extent+0xba/0x1b0 fs/btrfs/inode.c:6953
    [<ffffffff820c47ac>] btrfs_get_blocks_direct_write fs/btrfs/inode.c:7343 [inline]
    [<ffffffff820c47ac>] btrfs_dio_iomap_begin+0xcbc/0x11a0 fs/btrfs/inode.c:7594
    [<ffffffff81772039>] iomap_iter+0x219/0x590 fs/iomap/iter.c:91
    [<ffffffff8177968b>] __iomap_dio_rw+0x2bb/0xd40 fs/iomap/direct-io.c:658
    [<ffffffff820c4da3>] btrfs_dio_write+0x73/0xa0 fs/btrfs/inode.c:7798
    [<ffffffff820cf774>] btrfs_direct_write fs/btrfs/file.c:1543 [inline]
    [<ffffffff820cf774>] btrfs_do_write_iter+0x454/0x960 fs/btrfs/file.c:1684
    [<ffffffff816924c4>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816924c4>] do_iter_readv_writev+0x154/0x220 fs/read_write.c:735
    [<ffffffff81693c4c>] do_iter_write+0xec/0x370 fs/read_write.c:860

write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/21 05:15 upstream 98b1cc82c4af cb976f63 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-leak memory leak in clear_state_bit
2023/11/21 04:05 upstream 98b1cc82c4af cb976f63 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-leak memory leak in clear_state_bit
2023/11/20 03:56 upstream eb3479bc23fa cb976f63 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-leak memory leak in clear_state_bit
* Struck through repros no longer work on HEAD.