./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2011119380 <...> Warning: Permanently added '10.128.1.21' (ECDSA) to the list of known hosts. execve("./syz-executor2011119380", ["./syz-executor2011119380"], 0x7ffc11108f50 /* 10 vars */) = 0 brk(NULL) = 0x5555571d4000 brk(0x5555571d4c40) = 0x5555571d4c40 arch_prctl(ARCH_SET_FS, 0x5555571d4300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor2011119380", 4096) = 28 brk(0x5555571f5c40) = 0x5555571f5c40 brk(0x5555571f6000) = 0x5555571f6000 mprotect(0x7f1e8230a000, 16384, PROT_READ) = 0 mmap(0x1ffff000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1ffff000 mmap(0x20000000, 16777216, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000000 mmap(0x21000000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x21000000 open("./bus", O_RDWR|O_CREAT|O_TRUNC|O_NONBLOCK|O_SYNC|O_DIRECT|O_LARGEFILE|O_NOATIME, 000) = 3 ioctl(3, FS_IOC_SETFLAGS, [FS_JOURNAL_DATA_FL]) = 0 openat(AT_FDCWD, "cgroup.controllers", O_RDWR|O_CREAT|O_NOCTTY|O_TRUNC|O_APPEND|FASYNC|0x18, 000) = 4 [ 41.792328][ T27] audit: type=1800 audit(1677924961.197:2): pid=5081 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed(directio) comm="syz-executor201" name="bus" dev="sda1" ino=1138 res=0 errno=0 [ 41.818187][ T5081] warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow [ 41.845844][ T5081] [ 41.857412][ T5081] ====================================================== [ 41.864400][ T5081] WARNING: possible circular locking dependency detected [ 41.871388][ T5081] 6.2.0-syzkaller-13413-g0a3f9a6b0265 #0 Not tainted [ 41.878030][ T5081] ------------------------------------------------------ [ 41.885014][ T5081] syz-executor201/5081 is trying to acquire lock: [ 41.891409][ T5081] ffff888144d40400 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: ext4_bmap+0x52/0x470 [ 41.900967][ T5081] [ 41.900967][ T5081] but task is already holding lock: [ 41.908300][ T5081] ffff88802afba3f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: jbd2_journal_flush+0x47f/0xc90 [ 41.918896][ T5081] [ 41.918896][ T5081] which lock already depends on the new lock. [ 41.918896][ T5081] [ 41.929442][ T5081] [ 41.929442][ T5081] the existing dependency chain (in reverse order) is: [ 41.938421][ T5081] [ 41.938421][ T5081] -> #3 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 41.947156][ T5081] mutex_lock_io_nested+0x143/0x11a0 [ 41.952948][ T5081] jbd2_journal_flush+0x19e/0xc90 [ 41.958494][ T5081] __ext4_ioctl+0xb3f/0x4c90 [ 41.963605][ T5081] __x64_sys_ioctl+0x197/0x210 [ 41.968888][ T5081] do_syscall_64+0x39/0xb0 [ 41.973811][ T5081] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 41.980224][ T5081] [ 41.980224][ T5081] -> #2 (&journal->j_barrier){+.+.}-{3:3}: [ 41.988192][ T5081] __mutex_lock+0x12f/0x1350 [ 41.993296][ T5081] jbd2_journal_lock_updates+0x162/0x310 [ 41.999443][ T5081] ext4_change_inode_journal_flag+0x188/0x550 [ 42.006029][ T5081] ext4_fileattr_set+0xe78/0x1a50 [ 42.011563][ T5081] vfs_fileattr_set+0x7ff/0xc40 [ 42.016949][ T5081] do_vfs_ioctl+0xfa8/0x1670 [ 42.022050][ T5081] __x64_sys_ioctl+0x10c/0x210 [ 42.027345][ T5081] do_syscall_64+0x39/0xb0 [ 42.032275][ T5081] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 42.038684][ T5081] [ 42.038684][ T5081] -> #1 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 42.047194][ T5081] percpu_down_write+0x53/0x390 [ 42.052564][ T5081] ext4_ind_migrate+0x23b/0x860 [ 42.057942][ T5081] ext4_fileattr_set+0x1582/0x1a50 [ 42.063563][ T5081] vfs_fileattr_set+0x7ff/0xc40 [ 42.068946][ T5081] do_vfs_ioctl+0xfa8/0x1670 [ 42.074149][ T5081] __x64_sys_ioctl+0x10c/0x210 [ 42.079594][ T5081] do_syscall_64+0x39/0xb0 [ 42.084541][ T5081] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 42.090952][ T5081] [ 42.090952][ T5081] -> #0 (&sb->s_type->i_mutex_key#8){++++}-{3:3}: [ 42.099537][ T5081] __lock_acquire+0x2ec7/0x5d40 [ 42.104895][ T5081] lock_acquire+0x1e3/0x670 [ 42.109901][ T5081] down_read+0x3d/0x50 [ 42.114482][ T5081] ext4_bmap+0x52/0x470 [ 42.119143][ T5081] bmap+0xae/0x120 [ 42.123395][ T5081] jbd2_journal_bmap+0xac/0x1c0 [ 42.128752][ T5081] jbd2_journal_flush+0x87b/0xc90 [ 42.134282][ T5081] __ext4_ioctl+0xb3f/0x4c90 [ 42.139382][ T5081] __x64_sys_ioctl+0x197/0x210 [ 42.144662][ T5081] do_syscall_64+0x39/0xb0 [ 42.149585][ T5081] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 42.155995][ T5081] [ 42.155995][ T5081] other info that might help us debug this: [ 42.155995][ T5081] [ 42.166288][ T5081] Chain exists of: [ 42.166288][ T5081] &sb->s_type->i_mutex_key#8 --> &journal->j_barrier --> &journal->j_checkpoint_mutex [ 42.166288][ T5081] [ 42.181734][ T5081] Possible unsafe locking scenario: [ 42.181734][ T5081] [ 42.189158][ T5081] CPU0 CPU1 [ 42.194501][ T5081] ---- ---- [ 42.199850][ T5081] lock(&journal->j_checkpoint_mutex); [ 42.205376][ T5081] lock(&journal->j_barrier); [ 42.212636][ T5081] lock(&journal->j_checkpoint_mutex); [ 42.220678][ T5081] lock(&sb->s_type->i_mutex_key#8); [ 42.226037][ T5081] [ 42.226037][ T5081] *** DEADLOCK *** [ 42.226037][ T5081] [ 42.234158][ T5081] 2 locks held by syz-executor201/5081: [ 42.239697][ T5081] #0: ffff88802afba170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x162/0x310 [ 42.250558][ T5081] #1: ffff88802afba3f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: jbd2_journal_flush+0x47f/0xc90 [ 42.261590][ T5081] [ 42.261590][ T5081] stack backtrace: [ 42.267455][ T5081] CPU: 0 PID: 5081 Comm: syz-executor201 Not tainted 6.2.0-syzkaller-13413-g0a3f9a6b0265 #0 [ 42.277499][ T5081] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 [ 42.287638][ T5081] Call Trace: [ 42.290903][ T5081] [ 42.293815][ T5081] dump_stack_lvl+0xd9/0x150 [ 42.298403][ T5081] check_noncircular+0x25f/0x2e0 [ 42.303329][ T5081] ? print_circular_bug+0x5c0/0x5c0 [ 42.308510][ T5081] ? __switch_to+0x5d0/0x1110 [ 42.313172][ T5081] ? mark_lock.part.0+0xee/0x1970 [ 42.318181][ T5081] ? print_usage_bug.part.0+0x660/0x660 [ 42.323712][ T5081] __lock_acquire+0x2ec7/0x5d40 [ 42.328553][ T5081] ? __wait_on_bit+0xd4/0x180 [ 42.333220][ T5081] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 42.339193][ T5081] lock_acquire+0x1e3/0x670 [ 42.343689][ T5081] ? ext4_bmap+0x52/0x470 [ 42.348016][ T5081] ? out_of_line_wait_on_bit_timeout+0x170/0x170 [ 42.354351][ T5081] ? lock_release+0x780/0x780 [ 42.359022][ T5081] down_read+0x3d/0x50 [ 42.363102][ T5081] ? ext4_bmap+0x52/0x470 [ 42.367428][ T5081] ext4_bmap+0x52/0x470 [ 42.371571][ T5081] ? mpage_release_unused_pages+0x870/0x870 [ 42.377451][ T5081] bmap+0xae/0x120 [ 42.381165][ T5081] ? do_raw_read_unlock+0xe0/0xe0 [ 42.386175][ T5081] jbd2_journal_bmap+0xac/0x1c0 [ 42.391011][ T5081] ? jbd2_log_start_commit+0x50/0x50 [ 42.396280][ T5081] ? _raw_write_unlock+0x28/0x40 [ 42.401199][ T5081] ? jbd2_mark_journal_empty+0x307/0x3f0 [ 42.406820][ T5081] jbd2_journal_flush+0x87b/0xc90 [ 42.411833][ T5081] ? jbd2_fc_get_buf+0x310/0x310 [ 42.416776][ T5081] ? _raw_spin_unlock_irqrestore+0x41/0x70 [ 42.422569][ T5081] ? __ext4_ioctl+0x3ca2/0x4c90 [ 42.427415][ T5081] __ext4_ioctl+0xb3f/0x4c90 [ 42.431994][ T5081] ? tomoyo_path_number_perm+0x166/0x570 [ 42.437630][ T5081] ? ext4_reset_inode_seed+0x450/0x450 [ 42.443097][ T5081] ? __sanitizer_cov_trace_switch+0x54/0x90 [ 42.448976][ T5081] ? do_vfs_ioctl+0x132/0x1670 [ 42.453735][ T5081] ? vfs_fileattr_set+0xc40/0xc40 [ 42.458753][ T5081] ? find_held_lock+0x2d/0x110 [ 42.463498][ T5081] ? put_page+0x2/0x280 [ 42.467656][ T5081] ? ext4_fileattr_set+0x1a50/0x1a50 [ 42.472947][ T5081] __x64_sys_ioctl+0x197/0x210 [ 42.477708][ T5081] do_syscall_64+0x39/0xb0 [ 42.482116][ T5081] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 42.488013][ T5081] RIP: 0033:0x7f1e8229db79 [ 42.492410][ T5081] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 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 [ 42.512001][ T5081] RSP: 002b:00007ffddbcc12e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 42.520484][ T5081] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1e8229db79 [ 42.528446][ T5081] RDX: 0000000020000000 RSI: 000000004004662b RDI: 0000000000000004 [ 42.536489][ T5081] RBP: 00007f1e82261d20 R08: 0000000000000000 R09: 0000000000000000 ioctl(4, _IOC(_IOC_WRITE, 0x66, 0x2b, 0x4), 0x20000000) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 42.544454][ T5081] R10: 0000000000000000 R11: 00