ci2 starts bisection 2023-06-17 11:29:25.378392651 +0000 UTC m=+136388.571189401 bisecting cause commit starting from 40f71e7cd3c6ac04293556ab0504a372393838ff building syzkaller on f3921d4d63f97d1f1fb49a69ea85744bb7ef184b ensuring issue is reproducible on original commit 40f71e7cd3c6ac04293556ab0504a372393838ff testing commit 40f71e7cd3c6ac04293556ab0504a372393838ff gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 314c6542da9a0ca4190e5da2c895d77baa304cb3090538c20db8e34823e644cc all runs: crashed: WARNING: Reset corrupted AGFL on AG NUM. NUM blocks leaked. Please unmount and run xfs_repair. testing release v6.3 testing commit 457391b0380335d5e9a5babdec90ac53928b23b4 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 589187ff0b1e5100145a445ec858630621c9fa8907612d947c5f6a4c9dab1853 all runs: OK too many neither good nor bad results, skipping this commit # git bisect start 40f71e7cd3c6ac04293556ab0504a372393838ff 457391b0380335d5e9a5babdec90ac53928b23b4 Bisecting: 7767 revisions left to test after this (roughly 13 steps) [6e98b09da931a00bf4e0477d0fa52748bf28fcce] Merge tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next testing commit 6e98b09da931a00bf4e0477d0fa52748bf28fcce gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7290af7029cbd1a14811da9500568afac6272209d8cadfbba23e9971272ab056 all runs: OK too many neither good nor bad results, skipping this commit # git bisect good 6e98b09da931a00bf4e0477d0fa52748bf28fcce Bisecting: 3887 revisions left to test after this (roughly 12 steps) [d55571c0084465f1f7e1e29f22bd910d366a6e1d] Merge tag 'kbuild-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild testing commit d55571c0084465f1f7e1e29f22bd910d366a6e1d gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 2733273af60c47697e8f5d0e2f661a63952372e7fb270bc0830f97b99d146c08 all runs: OK too many neither good nor bad results, skipping this commit # git bisect good d55571c0084465f1f7e1e29f22bd910d366a6e1d Bisecting: 1816 revisions left to test after this (roughly 11 steps) [f085df1be60abf670315c11036261cfaec16b2eb] Merge tag 'perf-tools-for-v6.4-3-2023-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux testing commit f085df1be60abf670315c11036261cfaec16b2eb gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: ff674f70604b1bedb3f3bf301eae0ac200a7855fae07c01e3dcb1efba8be1602 all runs: OK too many neither good nor bad results, skipping this commit # git bisect good f085df1be60abf670315c11036261cfaec16b2eb Bisecting: 907 revisions left to test after this (roughly 10 steps) [4e893b5aa4ac2c8a56a40d18fe87e9d2295e5dcf] Merge tag 'for-linus-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip testing commit 4e893b5aa4ac2c8a56a40d18fe87e9d2295e5dcf gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6632878517724cc64e98957d422ada3390f814d6d12b282ee2c127efec3d5529 all runs: OK too many neither good nor bad results, skipping this commit # git bisect good 4e893b5aa4ac2c8a56a40d18fe87e9d2295e5dcf Bisecting: 471 revisions left to test after this (roughly 9 steps) [986c34b495810b38f365bb71665b77de60f15b2c] Merge tag 'drm-msm-fixes-2023-06-08' of https://gitlab.freedesktop.org/drm/msm into drm-fixes testing commit 986c34b495810b38f365bb71665b77de60f15b2c gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 4c706f3bbdbe4a64550dafeb402ee4c9653c54ef7232e063d1611d7e136da129 all runs: OK too many neither good nor bad results, skipping this commit # git bisect good 986c34b495810b38f365bb71665b77de60f15b2c Bisecting: 236 revisions left to test after this (roughly 8 steps) [8f0e3703571fe771d06235870ccbbf4ad41e63e8] Merge branch 'udplite-dccp-print-deprecation-notice' testing commit 8f0e3703571fe771d06235870ccbbf4ad41e63e8 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: f90ce0780ade10f939542497e2392df6e2a35be1971a2b5d97eaafef6d4b3d1e all runs: crashed: WARNING: Reset corrupted AGFL on AG NUM. NUM blocks leaked. Please unmount and run xfs_repair. # git bisect bad 8f0e3703571fe771d06235870ccbbf4ad41e63e8 Bisecting: 101 revisions left to test after this (roughly 7 steps) [25041a4c02c7cf774d8b6ed60586fd64f1cdaa81] Merge tag 'net-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net testing commit 25041a4c02c7cf774d8b6ed60586fd64f1cdaa81 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 406d795248de351f21d5b3f125072973c0b3a3528d1fcc05c4bd913e5d8775c1 all runs: crashed: WARNING: Reset corrupted AGFL on AG NUM. NUM blocks leaked. Please unmount and run xfs_repair. # git bisect bad 25041a4c02c7cf774d8b6ed60586fd64f1cdaa81 Bisecting: 66 revisions left to test after this (roughly 6 steps) [1e5c647c3f6d4f8497dedcd226204e1880e0ffb3] rfs: annotate lockless accesses to sk->sk_rxhash testing commit 1e5c647c3f6d4f8497dedcd226204e1880e0ffb3 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: ef3d0e9d04bb286a71eb0c51de6bc2326f0e4569a87c60b030b3d431b788dd0a all runs: OK too many neither good nor bad results, skipping this commit # git bisect good 1e5c647c3f6d4f8497dedcd226204e1880e0ffb3 Bisecting: 30 revisions left to test after this (roughly 5 steps) [79b6fad54683c28cc7e40d806e409abd65ed241a] Merge tag 'xfs-6.4-rc5-fixes' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux testing commit 79b6fad54683c28cc7e40d806e409abd65ed241a gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: b8f6f07b518176275df968d758621356f59ddf11509813361791c47005bff4aa all runs: crashed: WARNING: Reset corrupted AGFL on AG NUM. NUM blocks leaked. Please unmount and run xfs_repair. # git bisect bad 79b6fad54683c28cc7e40d806e409abd65ed241a Bisecting: 17 revisions left to test after this (roughly 4 steps) [25bda386c3d526b48dd22186324570fc8e191a52] MAINTAINERS: Add entry for debug objects testing commit 25bda386c3d526b48dd22186324570fc8e191a52 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 24c27e453e4dd6effab0160b021b63810f807e0910fd110a1c4a3ff08523b07e all runs: OK too many neither good nor bad results, skipping this commit # git bisect good 25bda386c3d526b48dd22186324570fc8e191a52 Bisecting: 8 revisions left to test after this (roughly 3 steps) [3148ebf2c0782340946732bfaf3073d23ac833fa] xfs: validity check agbnos on the AGFL testing commit 3148ebf2c0782340946732bfaf3073d23ac833fa gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 813fa87d47a68d3d41e871bfc0f089b1e82a6bbb327878b049f8ea47116ecab4 all runs: crashed: WARNING: Reset corrupted AGFL on AG NUM. NUM blocks leaked. Please unmount and run xfs_repair. # git bisect bad 3148ebf2c0782340946732bfaf3073d23ac833fa Bisecting: 4 revisions left to test after this (roughly 2 steps) [82842fee6e5979ca7e2bf4d839ef890c22ffb7aa] xfs: fix AGF vs inode cluster buffer deadlock testing commit 82842fee6e5979ca7e2bf4d839ef890c22ffb7aa gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 2df57f9d972460a2901cd227df8968429dd990b4ee1d86d9369b503d52e2e106 all runs: OK too many neither good nor bad results, skipping this commit # git bisect good 82842fee6e5979ca7e2bf4d839ef890c22ffb7aa Bisecting: 2 revisions left to test after this (roughly 1 step) [6be73cecb5a241309008d7fc4c47749e5324bfb0] xfs: fix broken logic when detecting mergeable bmap records testing commit 6be73cecb5a241309008d7fc4c47749e5324bfb0 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 337831575914ff48504818503a3efe8cd4380242c6ab89437ee4f0fedce1335f all runs: OK too many neither good nor bad results, skipping this commit # git bisect good 6be73cecb5a241309008d7fc4c47749e5324bfb0 Bisecting: 0 revisions left to test after this (roughly 1 step) [e0a8de7da35e5b22b44fa1013ccc0716e17b0c14] xfs: fix agf/agfl verification on v4 filesystems testing commit e0a8de7da35e5b22b44fa1013ccc0716e17b0c14 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: e6943f31f176abef1e79173a868b02e52624fad343c57c070aad319e5fc13395 all runs: crashed: WARNING: Reset corrupted AGFL on AG NUM. NUM blocks leaked. Please unmount and run xfs_repair. # git bisect bad e0a8de7da35e5b22b44fa1013ccc0716e17b0c14 Bisecting: 0 revisions left to test after this (roughly 0 steps) [1e473279f492faf33ed3fbb3ecf8eec9f56b951c] xfs: fix double xfs_perag_rele() in xfs_filestream_pick_ag() testing commit 1e473279f492faf33ed3fbb3ecf8eec9f56b951c gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 96faa5eebe60d3d2fc89f1495d1b85cb86811eaa276e1676abd71d2eae5b42f7 all runs: OK too many neither good nor bad results, skipping this commit # git bisect good 1e473279f492faf33ed3fbb3ecf8eec9f56b951c e0a8de7da35e5b22b44fa1013ccc0716e17b0c14 is the first bad commit commit e0a8de7da35e5b22b44fa1013ccc0716e17b0c14 Author: Dave Chinner Date: Mon Jun 5 14:48:15 2023 +1000 xfs: fix agf/agfl verification on v4 filesystems When a v4 filesystem has fl_last - fl_first != fl_count, we do not not detect the corruption and allow the AGF to be used as it if was fully valid. On V5 filesystems, we reset the AGFL to empty in these cases and avoid the corruption at a small cost of leaked blocks. If we don't catch the corruption on V4 filesystems, bad things happen later when an allocation attempts to trim the free list and either double-frees stale entries in the AGFl or tries to free NULLAGBNO entries. Either way, this is bad. Prevent this from happening by using the AGFL_NEED_RESET logic for v4 filesysetms, too. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_alloc.c | 59 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 17 deletions(-) culprit signature: e6943f31f176abef1e79173a868b02e52624fad343c57c070aad319e5fc13395 parent signature: 96faa5eebe60d3d2fc89f1495d1b85cb86811eaa276e1676abd71d2eae5b42f7 revisions tested: 17, total time: 9h7m41.988113928s (build: 7h1m51.275763617s, test: 2h0m42.999235533s) first bad commit: e0a8de7da35e5b22b44fa1013ccc0716e17b0c14 xfs: fix agf/agfl verification on v4 filesystems recipients (to): ["david@fromorbit.com" "dchinner@redhat.com" "djwong@kernel.org" "hch@lst.de"] recipients (cc): [] crash: WARNING: Reset corrupted AGFL on AG NUM. NUM blocks leaked. Please unmount and run xfs_repair. XFS (loop0): WARNING: Reset corrupted AGFL on AG 0. 4 blocks leaked. Please unmount and run xfs_repair. XFS (loop0): metadata I/O error in "xfs_read_agi+0x264/0x530" at daddr 0x8002 len 1 error 117 XFS (loop0): WARNING: Reset corrupted AGFL on AG 0. 4 blocks leaked. Please unmount and run xfs_repair. XFS (loop0): Internal error !ino_ok at line 213 of file fs/xfs/libxfs/xfs_dir2.c. Caller xfs_dir_ino_validate+0x1e/0x70 fs/xfs/libxfs/xfs_dir2.c:220 CPU: 0 PID: 2825 Comm: kworker/u4:5 Not tainted 6.4.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Workqueue: xfs_iwalk-5536 xfs_pwork_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x167/0x220 lib/dump_stack.c:106 xfs_error_report fs/xfs/xfs_error.c:384 [inline] xfs_corruption_error+0xef/0x170 fs/xfs/xfs_error.c:401 xfs_dir_ino_validate+0x4c/0x70 fs/xfs/libxfs/xfs_dir2.c:213 xfs_dir2_sf_verify+0x40a/0x910 fs/xfs/libxfs/xfs_dir2_sf.c:779 xfs_ifork_verify_local_data fs/xfs/libxfs/xfs_inode_fork.c:706 [inline] xfs_iformat_data_fork+0x2d6/0x5c0 fs/xfs/libxfs/xfs_inode_fork.c:256 xfs_inode_from_disk+0xa8a/0xee0 fs/xfs/libxfs/xfs_inode_buf.c:245 xfs_iget_cache_miss fs/xfs/xfs_icache.c:618 [inline] xfs_iget+0xa3d/0x2450 fs/xfs/xfs_icache.c:756 xfs_qm_dqusage_adjust+0x1c5/0x4d0 fs/xfs/xfs_qm.c:1157 xfs_iwalk_ag_recs+0x2ec/0x690 fs/xfs/xfs_iwalk.c:220 xfs_iwalk_run_callbacks+0x20e/0x3d0 fs/xfs/xfs_iwalk.c:376 xfs_iwalk_ag+0x806/0x9d0 fs/xfs/xfs_iwalk.c:482 xfs_iwalk_ag_work+0xb0/0x150 fs/xfs/xfs_iwalk.c:624 xfs_pwork_work+0x75/0x120 fs/xfs/xfs_pwork.c:47 process_one_work+0x797/0xe20 kernel/workqueue.c:2405 worker_thread+0x8c9/0xfd0 kernel/workqueue.c:2552 kthread+0x27c/0x2f0 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 XFS (loop0): Corruption detected. Unmount and run xfs_repair XFS (loop0): Invalid inode number 0x24 XFS (loop0): Metadata corruption detected at xfs_dir2_sf_verify+0x727/0x910 fs/xfs/libxfs/xfs_dir2_sf.c:774, inode 0x23 data fork XFS (loop0): Unmount and run xfs_repair XFS (loop0): First 32 bytes of corrupted metadata buffer: 00000000: 02 00 00 00 00 20 05 00 30 66 69 6c 65 30 01 00 ..... ..0file0.. 00000010: 00 00 24 05 00 48 66 69 6c 65 31 07 00 00 00 25 ..$..Hfile1....% XFS (loop0): metadata I/O error in "xfs_read_agi+0x264/0x530" at daddr 0x8002 len 1 error 117 XFS (loop0): WARNING: Reset corrupted AGFL on AG 0. 4 blocks leaked. Please unmount and run xfs_repair.