syzbot


INFO: task hung in invalidate_inode_pages2_range

Status: upstream: reported on 2023/01/06 10:24
Reported-by: syzbot+1973f06df51495304125@syzkaller.appspotmail.com
First crash: 466d, last: 466d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in invalidate_inode_pages2_range fs 6 2200d 2306d 0/26 auto-closed as invalid on 2019/02/22 10:34
android-49 INFO: task hung in invalidate_inode_pages2_range 13 2189d 2254d 0/3 auto-closed as invalid on 2019/02/22 15:29
android-44 INFO: task hung in invalidate_inode_pages2_range 3 2231d 2236d 0/2 auto-closed as invalid on 2019/02/22 15:29

Sample crash report:
INFO: task syz-executor.2:321 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.2  D27664   321  27486 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 io_schedule+0xb5/0x120 kernel/sched/core.c:5181
 wait_on_page_bit_common mm/filemap.c:1123 [inline]
 __lock_page+0x316/0x460 mm/filemap.c:1296
 lock_page include/linux/pagemap.h:484 [inline]
 invalidate_inode_pages2_range+0xb3f/0x1110 mm/truncate.c:713
 fuse_finish_open+0x2e2/0x590 fs/fuse/file.c:182
 fuse_open_common+0x236/0x2c0 fs/fuse/file.c:222
 do_dentry_open+0x4aa/0x1160 fs/open.c:796
 do_last fs/namei.c:3421 [inline]
 path_openat+0x793/0x2df0 fs/namei.c:3537
 do_filp_open+0x18c/0x3f0 fs/namei.c:3567
 do_sys_open+0x3b3/0x520 fs/open.c:1085
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fac1a2650c9
Code: Bad RIP value.
RSP: 002b:00007fac187d7168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007fac1a384f80 RCX: 00007fac1a2650c9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000100
RBP: 00007fac1a2c0ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffec92f527f R14: 00007fac187d7300 R15: 0000000000022000
INFO: task syz-executor.2:322 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.2  D28016   322  27486 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline]
 rwsem_down_write_failed+0x3aa/0x760 kernel/locking/rwsem-xadd.c:618
 call_rwsem_down_write_failed+0x13/0x20 arch/x86/lib/rwsem.S:117
 __down_write arch/x86/include/asm/rwsem.h:142 [inline]
 down_write+0x4f/0x90 kernel/locking/rwsem.c:72
 inode_lock include/linux/fs.h:748 [inline]
 do_truncate+0x125/0x1f0 fs/open.c:61
 handle_truncate fs/namei.c:3009 [inline]
 do_last fs/namei.c:3427 [inline]
 path_openat+0x2308/0x2df0 fs/namei.c:3537
 do_filp_open+0x18c/0x3f0 fs/namei.c:3567
 do_sys_open+0x3b3/0x520 fs/open.c:1085
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fac1a2650c9
Code: Bad RIP value.
RSP: 002b:00007fac187b6168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007fac1a385050 RCX: 00007fac1a2650c9
RDX: 0000000000000000 RSI: 000000000000004e RDI: 0000000020000540
RBP: 00007fac1a2c0ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffec92f527f R14: 00007fac187b6300 R15: 0000000000022000
INFO: task syz-executor.2:334 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.2  D27880   334  27486 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 fuse_wait_on_page_writeback fs/fuse/file.c:383 [inline]
 fuse_wait_on_page_writeback.isra.0+0x11b/0x170 fs/fuse/file.c:379
 fuse_launder_page fs/fuse/file.c:2033 [inline]
 fuse_launder_page+0xb6/0xe0 fs/fuse/file.c:2026
 do_launder_page mm/truncate.c:655 [inline]
 invalidate_inode_pages2_range+0x795/0x1110 mm/truncate.c:725
 fuse_finish_open+0x2e2/0x590 fs/fuse/file.c:182
 fuse_open_common+0x254/0x2c0 fs/fuse/file.c:222
 do_dentry_open+0x4aa/0x1160 fs/open.c:796
 do_last fs/namei.c:3421 [inline]
 path_openat+0x793/0x2df0 fs/namei.c:3537
 do_filp_open+0x18c/0x3f0 fs/namei.c:3567
 do_sys_open+0x3b3/0x520 fs/open.c:1085
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fac1a2650c9
Code: Bad RIP value.
RSP: 002b:00007fac18774168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007fac1a3851f0 RCX: 00007fac1a2650c9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00007fac1a2c0ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffec92f527f R14: 00007fac18774300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1569:
 #0: 00000000fcf63099 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7855:
 #0: 000000003f6ecb06 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
2 locks held by kworker/1:0/8141:
 #0: 00000000ea962a70 ((wq_completion)"rcu_gp"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 0000000025815c9d ((work_completion)(&rew.rew_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
5 locks held by kworker/u4:4/8799:
4 locks held by kworker/u4:6/9512:
 #0: 00000000a4a54c53 ((wq_completion)"%s""netns"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 0000000043887601 (net_cleanup_work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
 #2: 000000008c21128b (pernet_ops_rwsem){++++}, at: cleanup_net+0xa8/0x8b0 net/core/net_namespace.c:521
 #3: 00000000c30dfeb8 (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline]
 #3: 00000000c30dfeb8 (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x4dc/0x6f0 kernel/rcu/tree_exp.h:667
netlink: 12 bytes leftover after parsing attributes in process `syz-executor.5'.
2 locks held by kworker/u4:10/14564:
2 locks held by syz-executor.2/322:
 #0: 000000008e20568e (sb_writers#34){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline]
 #0: 000000008e20568e (sb_writers#34){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360
 #1: 000000009a76f57c (&sb->s_type->i_mutex_key#41){+.+.}, at: inode_lock include/linux/fs.h:748 [inline]
 #1: 000000009a76f57c (&sb->s_type->i_mutex_key#41){+.+.}, at: do_truncate+0x125/0x1f0 fs/open.c:61
2 locks held by syz-executor.2/334:
 #0: 000000008e20568e (sb_writers#34){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline]
 #0: 000000008e20568e (sb_writers#34){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360
 #1: 000000009a76f57c (&sb->s_type->i_mutex_key#41){+.+.}, at: inode_lock include/linux/fs.h:748 [inline]
 #1: 000000009a76f57c (&sb->s_type->i_mutex_key#41){+.+.}, at: fuse_open_common+0x1bc/0x2c0 fs/fuse/file.c:215
2 locks held by syz-executor.3/7764:
 #0: 00000000777177a4 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 00000000777177a4 (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
 #1: 00000000a92c302a (&ctx->lock){-.-.}, at: perf_event_context_sched_out kernel/events/core.c:3145 [inline]
 #1: 00000000a92c302a (&ctx->lock){-.-.}, at: __perf_event_task_sched_out+0xa49/0x1470 kernel/events/core.c:3237
2 locks held by syz-executor.2/7789:
 #0: 00000000777177a4 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 00000000777177a4 (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
 #1: 00000000fcf63099 (rcu_read_lock){....}, at: trace_sched_stat_runtime include/trace/events/sched.h:428 [inline]
 #1: 00000000fcf63099 (rcu_read_lock){....}, at: update_curr+0x2c3/0x870 kernel/sched/fair.c:857
3 locks held by syz-executor.0/7796:
 #0: 0000000077182a5f (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 0000000077182a5f (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
 #1: 00000000fcf63099 (rcu_read_lock){....}, at: trace_sched_stat_runtime include/trace/events/sched.h:428 [inline]
 #1: 00000000fcf63099 (rcu_read_lock){....}, at: update_curr+0x2c3/0x870 kernel/sched/fair.c:857
 #2: 00000000fcf63099 (rcu_read_lock){....}, at: trace_sched_stat_runtime include/trace/events/sched.h:428 [inline]
 #2: 00000000fcf63099 (rcu_read_lock){....}, at: update_curr+0x2c3/0x870 kernel/sched/fair.c:857
3 locks held by syz-executor.3/7809:
2 locks held by syz-executor.3/7815:
 #0: 0000000075eb6790 (sb_writers#3){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline]
 #0: 0000000075eb6790 (sb_writers#3){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360
IPVS: ftp: loaded support on port[0] = 21
 #1: 00000000dbb50e4d (&type->i_mutex_dir_key#3){++++}, at: inode_lock include/linux/fs.h:748 [inline]
 #1: 00000000dbb50e4d (&type->i_mutex_dir_key#3){++++}, at: do_last fs/namei.c:3324 [inline]
 #1: 00000000dbb50e4d (&type->i_mutex_dir_key#3){++++}, at: path_openat+0x1071/0x2df0 fs/namei.c:3537
1 lock held by syz-executor.5/7823:
1 lock held by systemd-udevd/7820:
 #0: 0000000077182a5f (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 0000000077182a5f (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
2 locks held by syz-executor.2/7845:
3 locks held by syz-executor.1/7846:
 #0: 0000000077182a5f (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 0000000077182a5f (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
 #1: 0000000044629f12 (&cfs_rq->removed.lock){-.-.}, at: update_cfs_rq_load_avg kernel/sched/fair.c:3490 [inline]
 #1: 0000000044629f12 (&cfs_rq->removed.lock){-.-.}, at: update_load_avg kernel/sched/fair.c:3612 [inline]
 #1: 0000000044629f12 (&cfs_rq->removed.lock){-.-.}, at: dequeue_entity+0x52d/0x2800 kernel/sched/fair.c:4058
 #2: 00000000777177a4 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #2: 00000000777177a4 (&rq->lock){-.-.}, at: ttwu_queue kernel/sched/core.c:1841 [inline]
 #2: 00000000777177a4 (&rq->lock){-.-.}, at: try_to_wake_up+0x6d0/0x1050 kernel/sched/core.c:2052
2 locks held by syz-executor.3/7868:
2 locks held by syz-executor.3/7871:
 #0: 0000000075eb6790 (sb_writers#3){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline]
 #0: 0000000075eb6790 (sb_writers#3){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360
 #1: 00000000fcf63099 (rcu_read_lock){....}, at: trace_sched_stat_runtime include/trace/events/sched.h:428 [inline]
 #1: 00000000fcf63099 (rcu_read_lock){....}, at: update_curr+0x2c3/0x870 kernel/sched/fair.c:857
3 locks held by syz-executor.5/7863:

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1569 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
 watchdog+0x991/0xe60 kernel/hung_task.c:287
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 4695 Comm: systemd-journal Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:arch_local_irq_disable arch/x86/include/asm/paravirt.h:794 [inline]
RIP: 0010:arch_local_irq_save arch/x86/include/asm/paravirt.h:807 [inline]
RIP: 0010:kfree+0x64/0x210 mm/slab.c:3816
Code: 00 00 00 48 83 3d 2b 4e 59 08 00 0f 84 80 01 00 00 9c 58 0f 1f 44 00 00 48 83 3d 26 4e 59 08 00 48 89 c3 0f 84 71 01 00 00 fa <66> 0f 1f 44 00 00 e8 e1 78 cf ff 48 89 ef e8 a9 29 93 ff 48 89 ef
RSP: 0018:ffff8880a0897dd0 EFLAGS: 00000082
RAX: 0000000000000286 RBX: 0000000000000286 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 00000000ffffffff RDI: 0000000000000286
RBP: ffff8880a9323580 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffffffff834394da
R13: ffff8880a9d9c2a0 R14: 0000000000000000 R15: 0000000000000000
FS:  00007f48b1e6f8c0(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f48ad99c028 CR3: 00000000a1284000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 aa_free_file_ctx security/apparmor/include/file.h:76 [inline]
 apparmor_file_free_security+0x9a/0xd0 security/apparmor/lsm.c:448
 security_file_free+0x3e/0x70 security/security.c:885
 file_free fs/file_table.c:54 [inline]
 __fput+0x42a/0x890 fs/file_table.c:294
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f48b13fe85d
Code: bb 20 00 00 75 10 b8 02 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 1e f6 ff ff 48 89 04 24 b8 02 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 67 f6 ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007fffc1623ac0 EFLAGS: 00000293 ORIG_RAX: 0000000000000002
RAX: fffffffffffffffe RBX: 00007fffc1623dd0 RCX: 00007f48b13fe85d
RDX: 00000000000001a0 RSI: 0000000000080042 RDI: 0000560ddced7980
RBP: 000000000000000d R08: 00000000000001c0 R09: 00000000ffffffff
R10: 0000000000000069 R11: 0000000000000293 R12: 00000000ffffffff
R13: 0000560ddcecb040 R14: 00007fffc1623d90 R15: 0000560ddcecee80

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/06 10:23 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in invalidate_inode_pages2_range
* Struck through repros no longer work on HEAD.