f39300149ccc starts bisection 2025-01-14 16:27:25.737155697 +0800 CST m=+29.698122435 bisecting cause commit starting from 2144da25584eb10b84252230319b5783f6a83041 building syzkaller on HEAD ensuring issue is reproducible on original commit 2144da25584eb10b84252230319b5783f6a83041 testing commit 2144da25584eb10b84252230319b5783f6a83041 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: a7e6dab6e5118e5882dbb1b4eb087d3f9ebd2628f2b8ca3deec7a0c56ff4237c run #0: crashed: WARNING in corrupted run #1: crashed: WARNING in corrupted run #2: crashed: WARNING in bch2_trans_srcu_unlock run #3: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in corrupted, types: [WARNING] check whether we can drop unnecessary instrumentation disabling configs for [HANG LEAK UBSAN KASAN LOCKDEP ATOMIC_SLEEP], they are not needed testing commit 2144da25584eb10b84252230319b5783f6a83041 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 7640948f6ebe7db9266c341e8ca879f5c6110a5c71adfaa72724dc471d541650 run #0: crashed: WARNING in bch2_trans_srcu_unlock run #1: crashed: WARNING in bch2_trans_srcu_unlock run #2: crashed: WARNING in bch2_trans_srcu_unlock run #3: crashed: WARNING in corrupted representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] the bug reproduces without the instrumentation disabling configs for [KASAN LOCKDEP ATOMIC_SLEEP HANG LEAK UBSAN], they are not needed kconfig minimization: base=4514 full=4514 leaves diff=0 split chunks (needed=false): <0> split chunk #0 of len 0 into 3 parts disabling configs for [LOCKDEP ATOMIC_SLEEP HANG LEAK UBSAN KASAN], they are not needed picked [v6.12 v6.11 v6.10 v6.8 v6.6 v6.4 v6.2 v6.0 v5.17 v5.14 v5.11 v5.8 v5.5 v5.2 v4.20 v4.19] out of 35 release tags testing release v6.12 testing commit adc218676eef25575469234709c2d87185ca223a gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 997699cbb89501bc54087269c09340592311112b96004241a1b559effa94b096 run #0: crashed: WARNING in corrupted run #1: crashed: WARNING in bch2_trans_srcu_unlock run #2: crashed: WARNING in corrupted run #3: crashed: WARNING in corrupted representative crash: WARNING in corrupted, types: [WARNING] testing release v6.11 testing commit 98f7e32f20d28ec452afb208f9cffc08448a2652 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: ad335976b8949a1149c8e98bd110c6afcac87529fe8bc4744a22fbed3dcbf21d all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] testing release v6.10 testing commit 0c3836482481200ead7b416ca80c68a29cfdaabd gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 05711b59e367efe112fe67aee2fa5da8fb7dc9b2566ff575b95c5968af7500b1 all runs: OK false negative chance: 0.000 # git bisect start 98f7e32f20d28ec452afb208f9cffc08448a2652 0c3836482481200ead7b416ca80c68a29cfdaabd Bisecting: 7076 revisions left to test after this (roughly 13 steps) [b3ce7a30847a54a7f96a35e609303d8afecd460b] Merge tag 'drm-next-2024-07-18' of https://gitlab.freedesktop.org/drm/kernel testing commit b3ce7a30847a54a7f96a35e609303d8afecd460b gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: c98b754e8602068fda138e0ec01f8225c288609df625fd4e7be9fb4019ca7df4 all runs: OK false negative chance: 0.000 # git bisect good b3ce7a30847a54a7f96a35e609303d8afecd460b Bisecting: 3385 revisions left to test after this (roughly 12 steps) [fbc90c042cd1dc7258ebfebe6d226017e5b5ac8c] Merge tag 'mm-stable-2024-07-21-14-50' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm testing commit fbc90c042cd1dc7258ebfebe6d226017e5b5ac8c gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: da69665a8ef24eac02e36a2e4de1f6ce0e783c81ce0142ef208a0f340acbe26a all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] # git bisect bad fbc90c042cd1dc7258ebfebe6d226017e5b5ac8c Bisecting: 1890 revisions left to test after this (roughly 11 steps) [04d17331ca33744e1426fdeee7ba5e975c4b2239] Merge tag 'usb-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb testing commit 04d17331ca33744e1426fdeee7ba5e975c4b2239 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: fa236a96f0990d91596960717617a20ed1c6c7043c2a0ecb18e4da077e18bfbc all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] # git bisect bad 04d17331ca33744e1426fdeee7ba5e975c4b2239 Bisecting: 901 revisions left to test after this (roughly 10 steps) [ebcfbf02abfbecc144440ff797419cc95cb047fe] Merge tag 'iommu-updates-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux testing commit ebcfbf02abfbecc144440ff797419cc95cb047fe gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 5395911fb1c6b099f9691722c3e80c4db0ce07d51e2fb6299148ef3b9bd8cf8b all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] # git bisect bad ebcfbf02abfbecc144440ff797419cc95cb047fe Bisecting: 451 revisions left to test after this (roughly 9 steps) [51ed42a8a135511f6d6f75b56e85e6586a06a93c] Merge tag 'ext4_for_linus-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 testing commit 51ed42a8a135511f6d6f75b56e85e6586a06a93c gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: cff50251c0d41c77aec0aa126ef475453673978efa305132a855120bad222a43 all runs: OK false negative chance: 0.000 # git bisect good 51ed42a8a135511f6d6f75b56e85e6586a06a93c Bisecting: 266 revisions left to test after this (roughly 8 steps) [720261cfc7329406a50c2a8536e0039b9dd9a4e5] Merge tag 'bcachefs-2024-07-18.2' of https://evilpiepirate.org/git/bcachefs testing commit 720261cfc7329406a50c2a8536e0039b9dd9a4e5 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 5a2b52cf0af1178deebfe31146d925019b49232dca7d1b43fcc49245eb20b3c6 all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] # git bisect bad 720261cfc7329406a50c2a8536e0039b9dd9a4e5 Bisecting: 92 revisions left to test after this (roughly 7 steps) [7aa7183e00d92539c61b3a01a7ebf676b0ecb91e] bcachefs: split out lru_format.h testing commit 7aa7183e00d92539c61b3a01a7ebf676b0ecb91e gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 2abfedaa6c2d5553edd059c36c382a7eda8881de5e656145fd7bc44e59553138 all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] # git bisect bad 7aa7183e00d92539c61b3a01a7ebf676b0ecb91e Bisecting: 45 revisions left to test after this (roughly 6 steps) [91f44781d59a00a3478240e0b907c70d972e8897] bcachefs: Convert bch2_compression_stats_to_text() to new accounting testing commit 91f44781d59a00a3478240e0b907c70d972e8897 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: d95b3eb22bb8121d07771bada22977b4824b642d331886609e33aeae25cec4bd all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] # git bisect bad 91f44781d59a00a3478240e0b907c70d972e8897 Bisecting: 22 revisions left to test after this (roughly 5 steps) [2612e29142ff718e6f120c62e6792f0a67fd3005] bcachefs: BCH_DATA_unstriped testing commit 2612e29142ff718e6f120c62e6792f0a67fd3005 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 92a4e471d1aa9767f66fb18e5dee553028103e5db3ba4d0a0377843a44f29db6 all runs: OK false negative chance: 0.000 # git bisect good 2612e29142ff718e6f120c62e6792f0a67fd3005 Bisecting: 11 revisions left to test after this (roughly 4 steps) [72a6bb098c5879ce6aa51f714730971737a0b3ca] bcachefs: Kill bch2_fs_usage_initialize() testing commit 72a6bb098c5879ce6aa51f714730971737a0b3ca gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 5bf5bb19ac0fc4c1c0ae6e277899fa48ad71b27802c9368870b646fdd353d31c all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] # git bisect bad 72a6bb098c5879ce6aa51f714730971737a0b3ca Bisecting: 5 revisions left to test after this (roughly 3 steps) [2744e5c9eb1a1090b5f61c955e934c70bfe6b04c] bcachefs: KEY_TYPE_accounting testing commit 2744e5c9eb1a1090b5f61c955e934c70bfe6b04c gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: 5591bd659fef21df5c3fb1a6db4d091f6ccc3a1da78b27a0b65843c8b60ecc61 all runs: OK false negative chance: 0.000 # git bisect good 2744e5c9eb1a1090b5f61c955e934c70bfe6b04c Bisecting: 2 revisions left to test after this (roughly 2 steps) [1d16c605cc55ef26f0c65b362665a6c99080ccbc] bcachefs: Disk space accounting rewrite testing commit 1d16c605cc55ef26f0c65b362665a6c99080ccbc gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: e213b09bca1eba4deb98cd0c80ba8c712263b5ad09ebe2911e7c8d38e8a5b755 all runs: OK false negative chance: 0.000 # git bisect good 1d16c605cc55ef26f0c65b362665a6c99080ccbc Bisecting: 0 revisions left to test after this (roughly 1 step) [f5095b9f85a1674a92d00e7ab466499a8ba49ce1] bcachefs: dev_usage updated by new accounting testing commit f5095b9f85a1674a92d00e7ab466499a8ba49ce1 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: c5c68d97773a669373a195df1e78ca42e500bbad62f0ce5c5480ef1c50e601e6 all runs: crashed: WARNING in bch2_trans_srcu_unlock representative crash: WARNING in bch2_trans_srcu_unlock, types: [WARNING] # git bisect bad f5095b9f85a1674a92d00e7ab466499a8ba49ce1 Bisecting: 0 revisions left to test after this (roughly 0 steps) [2e8d686a4a13c01d9a2b329507a0f5ce6455b5a8] bcachefs: Coalesce accounting keys before journal replay testing commit 2e8d686a4a13c01d9a2b329507a0f5ce6455b5a8 gcc compiler: gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34 kernel signature: e8639b4b0f4ee0607ce69bd2c43c7fc49fb3c0f8cd9e605a266344347924334d all runs: OK false negative chance: 0.000 # git bisect good 2e8d686a4a13c01d9a2b329507a0f5ce6455b5a8 f5095b9f85a1674a92d00e7ab466499a8ba49ce1 is the first bad commit commit f5095b9f85a1674a92d00e7ab466499a8ba49ce1 Author: Kent Overstreet Date: Mon Jan 1 19:42:37 2024 -0500 bcachefs: dev_usage updated by new accounting Reading disk accounting now requires an eytzinger lookup (see: bch2_accounting_mem_read()), but the per-device counters are used frequently enough that we'd like to still be able to read them with just a percpu sum, as in the old code. This patch special cases the device counters; when we update in-memory accounting we also update the old style percpu counters if it's a deice counter update. Signed-off-by: Kent Overstreet fs/bcachefs/bcachefs.h | 3 +-- fs/bcachefs/btree_gc.c | 2 +- fs/bcachefs/buckets.c | 36 +++++------------------------------- fs/bcachefs/buckets_types.h | 2 +- fs/bcachefs/disk_accounting.c | 15 +++++++++++++++ fs/bcachefs/disk_accounting.h | 14 +++++++++++++- fs/bcachefs/recovery.c | 17 ----------------- fs/bcachefs/sb-clean.c | 17 ----------------- 8 files changed, 36 insertions(+), 70 deletions(-) accumulated error probability: 0.00 culprit signature: c5c68d97773a669373a195df1e78ca42e500bbad62f0ce5c5480ef1c50e601e6 parent signature: e8639b4b0f4ee0607ce69bd2c43c7fc49fb3c0f8cd9e605a266344347924334d revisions tested: 19, total time: 2h47m49.795703559s (build: 1h50m1.043478243s, test: 29m52.464114823s) first bad commit: f5095b9f85a1674a92d00e7ab466499a8ba49ce1 bcachefs: dev_usage updated by new accounting recipients (to): ["kent.overstreet@linux.dev" "kent.overstreet@linux.dev" "linux-bcachefs@vger.kernel.org"] recipients (cc): ["bfoster@redhat.com" "linux-kernel@vger.kernel.org"] crash: WARNING in bch2_trans_srcu_unlock bcachefs (loop0 inum 1073741825 offset 0): no device to read from bcachefs (loop0 inum 1073741827 offset 0): no device to read from ------------[ cut here ]------------ btree trans held srcu lock (delaying memory reclaim) for 31 seconds WARNING: CPU: 0 PID: 1345 at fs/bcachefs/btree_iter.c:2996 check_srcu_held_too_long fs/bcachefs/btree_iter.c:2996 [inline] WARNING: CPU: 0 PID: 1345 at fs/bcachefs/btree_iter.c:2996 check_srcu_held_too_long fs/bcachefs/btree_iter.c:2994 [inline] WARNING: CPU: 0 PID: 1345 at fs/bcachefs/btree_iter.c:2996 bch2_trans_srcu_unlock fs/bcachefs/btree_iter.c:3012 [inline] WARNING: CPU: 0 PID: 1345 at fs/bcachefs/btree_iter.c:2996 bch2_trans_srcu_unlock+0x204/0x220 fs/bcachefs/btree_iter.c:3001 Modules linked in: CPU: 0 PID: 1345 Comm: syz-executor368 Not tainted 6.10.0-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:check_srcu_held_too_long fs/bcachefs/btree_iter.c:2996 [inline] RIP: 0010:check_srcu_held_too_long fs/bcachefs/btree_iter.c:2994 [inline] RIP: 0010:bch2_trans_srcu_unlock fs/bcachefs/btree_iter.c:3012 [inline] RIP: 0010:bch2_trans_srcu_unlock+0x204/0x220 fs/bcachefs/btree_iter.c:3001 Code: c7 c7 18 02 e3 83 48 b9 cf f7 53 e3 a5 9b c4 20 4c 29 e2 48 c1 ea 03 48 89 d0 48 f7 e1 48 c1 ea 04 48 89 d6 e8 0d 27 1d ff 90 <0f> 0b 90 90 e9 63 ff ff ff e8 ce 8d 35 ff 90 0f 0b 90 e9 7b ff ff RSP: 0018:ffa0000008e078d0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffffffffffffab6c RCX: ffffffff810cf9ac RDX: ff1100011b6aa0c0 RSI: ffffffff810cf9b5 RDI: 0000000000000001 RBP: ff110001139e4000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff841a69d8 R12: 00000000fffbe85d R13: ff11000113100000 R14: ff110001139e4198 R15: 0000000000000040 FS: 000055558eebb880(0000) GS:ff1100052bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000561446961000 CR3: 00000001139e8005 CR4: 0000000000771ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: bch2_trans_begin+0xa83/0xb20 fs/bcachefs/btree_iter.c:3089 bch2_remap_range+0x6df/0x1e20 fs/bcachefs/reflink.c:473 bch2_remap_file_range+0x47e/0x780 fs/bcachefs/fs-io.c:903 vfs_copy_file_range+0x6b9/0x9e0 fs/read_write.c:1522 __do_sys_copy_file_range+0x142/0x300 fs/read_write.c:1612 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x9e/0x1a0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f54aee352ad Code: c3 e8 e7 2b 00 00 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd6e0667e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000146 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f54aee352ad RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007f54aedea6e0 R08: 7fffffffffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f54aedea780 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---[ end trace 0000000000000000 ]---