bisecting fixing commit since 64b4fc45bea6f4faa843d2f97ff51665280efee1
building syzkaller on be2c130d4c0c511da96ce278486cf0564aeadcea
testing commit 64b4fc45bea6f4faa843d2f97ff51665280efee1
compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: a3fe91368b5fd3fe51bac40c148f21c0653a715c54c44e14f6b308a6932bebe8
all runs: crashed: INFO: task hung in __sync_dirty_buffer
testing current HEAD d58071a8a76d779eedab38033ae4c821c30295a5
testing commit d58071a8a76d779eedab38033ae4c821c30295a5
compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: 5d0c46495f9acffda9c70fb3afe1ecd09b573fc6b6196478aa3cf71c3590ef06
run #0: boot failed: create image operation failed: &{Code:ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS Location: Message:The zone 'projects/syzkaller/zones/us-central1-c' does not have enough resources available to fulfill the request. '(resource type:compute)'. ForceSendFields:[] NullFields:[]}.
run #1: crashed: INFO: task hung in __sync_dirty_buffer
run #2: crashed: INFO: task hung in __sync_dirty_buffer
run #3: crashed: INFO: task hung in __sync_dirty_buffer
run #4: crashed: INFO: task hung in __sync_dirty_buffer
run #5: crashed: INFO: task hung in __sync_dirty_buffer
run #6: crashed: INFO: task hung in __sync_dirty_buffer
run #7: crashed: INFO: task hung in __sync_dirty_buffer
run #8: crashed: INFO: task hung in __sync_dirty_buffer
run #9: crashed: INFO: task hung in __sync_dirty_buffer
revisions tested: 2, total time: 25m2.307268907s (build: 12m43.248127373s, test: 11m35.410107454s)
the crash still happens on HEAD
commit msg: Linux 5.16-rc3
crash: INFO: task hung in __sync_dirty_buffer
INFO: task syz-executor.0:8896 blocked for more than 143 seconds.
Not tainted 5.16.0-rc3-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0 state:D stack:26448 pid: 8896 ppid: 7071 flags:0x00004004
Call Trace:
context_switch kernel/sched/core.c:4972 [inline]
__schedule+0x90d/0x26c0 kernel/sched/core.c:6253
schedule+0xd2/0x260 kernel/sched/core.c:6326
io_schedule+0xee/0x170 kernel/sched/core.c:8371
bit_wait_io+0x12/0xd0 kernel/sched/wait_bit.c:209
__wait_on_bit_lock+0x121/0x1a0 kernel/sched/wait_bit.c:90
out_of_line_wait_on_bit_lock+0xd5/0x110 kernel/sched/wait_bit.c:117
wait_on_bit_lock_io include/linux/wait_bit.h:208 [inline]
__lock_buffer fs/buffer.c:69 [inline]
lock_buffer include/linux/buffer_head.h:368 [inline]
__sync_dirty_buffer+0x287/0x310 fs/buffer.c:3142
__ext4_handle_dirty_metadata+0x1c4/0x680 fs/ext4/ext4_jbd2.c:380
ext4_convert_inline_data_nolock+0x5c9/0xfe0 fs/ext4/inline.c:1252
ext4_convert_inline_data+0x297/0x3d0 fs/ext4/inline.c:2024
ext4_fallocate+0x150/0x3310 fs/ext4/extents.c:4707
vfs_fallocate+0x2a5/0xb90 fs/open.c:307
ksys_fallocate fs/open.c:330 [inline]
__do_sys_fallocate fs/open.c:338 [inline]
__se_sys_fallocate fs/open.c:336 [inline]
__x64_sys_fallocate+0xb0/0x100 fs/open.c:336
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665f9
RSP: 002b:00007fe3f19c8188 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000100000001 RDI: 0000000000000006
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 000000002811fdff R11: 0000000000000246 R12: 000000000056bf80
R13: 00007fff38a87a8f R14: 00007fe3f19c8300 R15: 0000000000022000
INFO: task syz-executor.0:8953 blocked for more than 143 seconds.
Not tainted 5.16.0-rc3-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0 state:D stack:26864 pid: 8953 ppid: 7071 flags:0x00004004
Call Trace:
context_switch kernel/sched/core.c:4972 [inline]
__schedule+0x90d/0x26c0 kernel/sched/core.c:6253
schedule+0xd2/0x260 kernel/sched/core.c:6326
io_schedule+0xee/0x170 kernel/sched/core.c:8371
bit_wait_io+0x12/0xd0 kernel/sched/wait_bit.c:209
__wait_on_bit_lock+0x121/0x1a0 kernel/sched/wait_bit.c:90
out_of_line_wait_on_bit_lock+0xd5/0x110 kernel/sched/wait_bit.c:117
wait_on_bit_lock_io include/linux/wait_bit.h:208 [inline]
__lock_buffer fs/buffer.c:69 [inline]
lock_buffer include/linux/buffer_head.h:368 [inline]
write_dirty_buffer+0x10f/0x120 fs/buffer.c:3121
fsync_buffers_list fs/buffer.c:705 [inline]
sync_mapping_buffers+0x300/0x970 fs/buffer.c:548
ext4_fsync_nojournal fs/ext4/fsync.c:86 [inline]
ext4_sync_file+0x74c/0xc90 fs/ext4/fsync.c:170
generic_write_sync include/linux/fs.h:2955 [inline]
ext4_buffered_write_iter+0x256/0x330 fs/ext4/file.c:277
ext4_file_write_iter+0x383/0x1160 fs/ext4/file.c:681
call_write_iter include/linux/fs.h:2162 [inline]
new_sync_write+0x360/0x600 fs/read_write.c:503
vfs_write+0x609/0x900 fs/read_write.c:590
ksys_write+0xf4/0x1d0 fs/read_write.c:643
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665f9
RSP: 002b:00007fe3f19a7188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000056c038 RCX: 00000000004665f9
RDX: 0000000000000082 RSI: 00000000200004c0 RDI: 0000000000000004
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c038
R13: 00007fff38a87a8f R14: 00007fe3f19a7300 R15: 0000000000022000
Showing all locks held in the system:
3 locks held by kworker/u4:1/10:
#0: ffff8880b9e39a58 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x1e/0x30 kernel/sched/core.c:478
#1: ffff8880b9e279c8 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x3a6/0x490 kernel/sched/psi.c:880
#2: ffffffff8ab78980 (rcu_read_lock){....}-{1:2}, at: batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:410 [inline]
#2: ffffffff8ab78980 (rcu_read_lock){....}-{1:2}, at: batadv_nc_worker+0xd3/0xd70 net/batman-adv/network-coding.c:723
1 lock held by khungtaskd/27:
#0: ffffffff8ab78980 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6458
1 lock held by in:imklog/6243:
2 locks held by syz-executor.0/8896:
#0: ffff88807480e460 (sb_writers#5){.+.+}-{0:0}, at: ksys_fallocate fs/open.c:330 [inline]
#0: ffff88807480e460 (sb_writers#5){.+.+}-{0:0}, at: __do_sys_fallocate fs/open.c:338 [inline]
#0: ffff88807480e460 (sb_writers#5){.+.+}-{0:0}, at: __se_sys_fallocate fs/open.c:336 [inline]
#0: ffff88807480e460 (sb_writers#5){.+.+}-{0:0}, at: __x64_sys_fallocate+0xb0/0x100 fs/open.c:336
#1: ffff88806b7dda80 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:142 [inline]
#1: ffff88806b7dda80 (&ei->xattr_sem){++++}-{3:3}, at: ext4_convert_inline_data+0x1ca/0x3d0 fs/ext4/inline.c:2022
2 locks held by syz-executor.0/8953:
#0: ffff888072aeb770 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x9c/0xb0 fs/file.c:990
#1: ffff88807480e460 (sb_writers#5){.+.+}-{0:0}, at: ksys_write+0xf4/0x1d0 fs/read_write.c:643
2 locks held by syz-executor.2/9309:
#0: ffff88807eaa2460 (sb_writers#5){.+.+}-{0:0}, at: ksys_fallocate fs/open.c:330 [inline]
#0: ffff88807eaa2460 (sb_writers#5){.+.+}-{0:0}, at: __do_sys_fallocate fs/open.c:338 [inline]
#0: ffff88807eaa2460 (sb_writers#5){.+.+}-{0:0}, at: __se_sys_fallocate fs/open.c:336 [inline]
#0: ffff88807eaa2460 (sb_writers#5){.+.+}-{0:0}, at: __x64_sys_fallocate+0xb0/0x100 fs/open.c:336
#1: ffff88806b71ee70 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:142 [inline]
#1: ffff88806b71ee70 (&ei->xattr_sem){++++}-{3:3}, at: ext4_convert_inline_data+0x1ca/0x3d0 fs/ext4/inline.c:2022
2 locks held by syz-executor.2/9316:
#0: ffff88801865cd70 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x9c/0xb0 fs/file.c:990
#1: ffff88807eaa2460 (sb_writers#5){.+.+}-{0:0}, at: ksys_write+0xf4/0x1d0 fs/read_write.c:643
=============================================
NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.16.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106
nmi_cpu_backtrace.cold+0x30/0xc0 lib/nmi_backtrace.c:111
nmi_trigger_cpumask_backtrace+0x11f/0x170 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
watchdog+0x88c/0xbf0 kernel/hung_task.c:295
kthread+0x3ab/0x480 kernel/kthread.c:327
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 45 Comm: kworker/u4:2 Not tainted 5.16.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:check_preemption_disabled+0x29/0xe0 lib/smp_processor_id.c:56
Code: cc 41 54 55 53 48 83 ec 08 65 44 8b 25 b8 1b 8a 77 65 8b 05 29 76 8a 77 a9 ff ff ff 7f 74 0c 48 83 c4 08 44 89 e0 5b 5d 41 5c 9c 58 f6 c4 02 74 ed 65 48 8b 04 25 40 70 02 00 f6 40 2f 04 48
RSP: 0018:ffffc9000115f9f8 EFLAGS: 00000092
RAX: 0000000000000000 RBX: ffffffff8c810000 RCX: ffffffffffffffff
RDX: ffff8880115d0000 RSI: ffffffff892163e0 RDI: ffffffff89216420
RBP: ffff888140738000 R08: 8000000001a7b063 R09: 0000000000000003
R10: ffffffff8c819290 R11: 0000000000000000 R12: ffffffff8ac9eec0
R13: ffff8880115d0000 R14: 000000008c810000 R15: ffffffff8ac9ee00
FS: 0000000000000000(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fead4c93000 CR3: 000000000a88e000 CR4: 0000000000350ef0
Call Trace:
switch_mm_irqs_off+0x34/0xa10 arch/x86/mm/tlb.c:494
use_temporary_mm arch/x86/kernel/alternative.c:924 [inline]
__text_poke+0x44a/0x8c0 arch/x86/kernel/alternative.c:1021
text_poke_bp_batch+0x3d9/0x560 arch/x86/kernel/alternative.c:1361
text_poke_flush arch/x86/kernel/alternative.c:1451 [inline]
text_poke_flush arch/x86/kernel/alternative.c:1448 [inline]
text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1458
arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
static_key_enable_cpuslocked+0x15f/0x220 kernel/jump_label.c:177
static_key_enable+0x11/0x20 kernel/jump_label.c:190
toggle_allocation_gate mm/kfence/core.c:732 [inline]
toggle_allocation_gate+0xe3/0x310 mm/kfence/core.c:724
process_one_work+0x87f/0x1450 kernel/workqueue.c:2298
worker_thread+0x598/0x1040 kernel/workqueue.c:2445
kthread+0x3ab/0x480 kernel/kthread.c:327
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
----------------
Code disassembly (best guess):
0: cc int3
1: 41 54 push %r12
3: 55 push %rbp
4: 53 push %rbx
5: 48 83 ec 08 sub $0x8,%rsp
9: 65 44 8b 25 b8 1b 8a mov %gs:0x778a1bb8(%rip),%r12d # 0x778a1bc9
10: 77
11: 65 8b 05 29 76 8a 77 mov %gs:0x778a7629(%rip),%eax # 0x778a7641
18: a9 ff ff ff 7f test $0x7fffffff,%eax
1d: 74 0c je 0x2b
1f: 48 83 c4 08 add $0x8,%rsp
23: 44 89 e0 mov %r12d,%eax
26: 5b pop %rbx
27: 5d pop %rbp
28: 41 5c pop %r12
* 2a: c3 retq <-- trapping instruction
2b: 9c pushfq
2c: 58 pop %rax
2d: f6 c4 02 test $0x2,%ah
30: 74 ed je 0x1f
32: 65 48 8b 04 25 40 70 mov %gs:0x27040,%rax
39: 02 00
3b: f6 40 2f 04 testb $0x4,0x2f(%rax)
3f: 48 rex.W