syzbot


INFO: task hung in generic_file_write_iter

Status: fixed on 2019/03/06 07:43
Reported-by: syzbot+9933e4476f365f5d5a1b@syzkaller.appspotmail.com
Fix commit: 04906b2f542c blockdev: Fix livelocks on loop device
First crash: 1488d, last: 1349d
duplicates (7):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
INFO: rcu detected stall in sys_creat 98 1301d 1392d 0/23 closed as dup on 2019/01/20 01:52
INFO: task hung in vfat_lookup 38 1310d 1438d 0/23 closed as dup on 2018/09/05 22:07
INFO: task hung in inode_sleep_on_writeback 8 1309d 1596d 0/23 closed as dup on 2019/02/06 13:32
INFO: task hung in __blkdev_get (2) 11 1311d 1435d 0/23 closed as dup on 2018/09/08 15:48
INFO: task hung in blkdev_put 320 1281d 1707d 0/23 closed as dup on 2018/11/11 08:29
INFO: task hung in do_rmdir (2) 3 1311d 1446d 0/23 closed as dup on 2018/09/11 15:01
INFO: task hung in fat_fallocate 1 1568d 1567d 0/23 closed as dup on 2019/01/20 01:49
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 INFO: task hung in generic_file_write_iter 2 1453d 1454d 0/3 auto-closed as invalid on 2019/02/22 14:09

Sample crash report:
b_state=0x0000002b, b_size=512
device loop0 blocksize: 4096
__find_get_block_slow() failed. block=1, b_blocknr=8
b_state=0x0000002b, b_size=512
device loop0 blocksize: 4096
INFO: task syz-executor0:28944 blocked for more than 140 seconds.
      Not tainted 4.20.0-rc5+ #361
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor0   D25256 28944   6069 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2831 [inline]
 __schedule+0x8cf/0x21d0 kernel/sched/core.c:3472
 schedule+0xfe/0x460 kernel/sched/core.c:3516
 __rwsem_down_write_failed_common+0xc9a/0x15e0 kernel/locking/rwsem-xadd.c:577
 rwsem_down_write_failed+0xe/0x10 kernel/locking/rwsem-xadd.c:606
 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117
 __down_write arch/x86/include/asm/rwsem.h:142 [inline]
 down_write+0xa5/0x130 kernel/locking/rwsem.c:72
 inode_lock include/linux/fs.h:757 [inline]
 generic_file_write_iter+0xe4/0x6b0 mm/filemap.c:3290
 call_write_iter include/linux/fs.h:1857 [inline]
 new_sync_write fs/read_write.c:474 [inline]
 __vfs_write+0x6b8/0x9f0 fs/read_write.c:487
 vfs_write+0x1fc/0x560 fs/read_write.c:549
 ksys_write+0x101/0x260 fs/read_write.c:598
 __do_sys_write fs/read_write.c:610 [inline]
 __se_sys_write fs/read_write.c:607 [inline]
 __x64_sys_write+0x73/0xb0 fs/read_write.c:607
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457569
Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f4c239b6c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569
RDX: 00000000fffffd97 RSI: 0000000020000180 RDI: 0000000000000004
RBP: 000000000072c0e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4c239b76d4
R13: 00000000004c5cf1 R14: 00000000004da0a8 R15: 00000000ffffffff

Showing all locks held in the system:
3 locks held by kworker/u4:1/21:
1 lock held by khungtaskd/1019:
 #0: 00000000bded4237 (rcu_read_lock){....}, at: debug_show_all_locks+0xd0/0x424 kernel/locking/lockdep.c:4379
1 lock held by rsyslogd/5940:
 #0: 00000000af5ba1e7 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x1bb/0x200 fs/file.c:766
2 locks held by getty/6031:
 #0: 0000000080ef624e (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:353
 #1: 00000000a47439da (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x335/0x1e80 drivers/tty/n_tty.c:2154
2 locks held by getty/6032:
 #0: 000000006d416ed3 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:353
 #1: 0000000031d87fe4 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x335/0x1e80 drivers/tty/n_tty.c:2154
2 locks held by getty/6033:
 #0: 00000000112d3dde (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:353
 #1: 0000000016a33b17 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x335/0x1e80 drivers/tty/n_tty.c:2154
2 locks held by getty/6034:
 #0: 0000000056ee614d (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:353
 #1: 00000000c1ec3bc8 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x335/0x1e80 drivers/tty/n_tty.c:2154
2 locks held by getty/6035:
 #0: 00000000b80dc242 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:353
 #1: 0000000013a08d78 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x335/0x1e80 drivers/tty/n_tty.c:2154
2 locks held by getty/6036:
 #0: 000000001ceadacd (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:353
 #1: 00000000fb8eced2 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x335/0x1e80 drivers/tty/n_tty.c:2154
2 locks held by getty/6037:
 #0: 00000000ef7b4f4a (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:353
 #1: 00000000eafee42b (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x335/0x1e80 drivers/tty/n_tty.c:2154
4 locks held by syz-executor0/28925:
3 locks held by syz-executor0/28944:
 #0: 00000000a543f336 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x1bb/0x200 fs/file.c:766
 #1: 00000000f9e7c79f (sb_writers#16){.+.+}, at: file_start_write include/linux/fs.h:2810 [inline]
 #1: 00000000f9e7c79f (sb_writers#16){.+.+}, at: vfs_write+0x42a/0x560 fs/read_write.c:548
 #2: 00000000f357f265 (&sb->s_type->i_mutex_key#22){+.+.}, at: inode_lock include/linux/fs.h:757 [inline]
 #2: 00000000f357f265 (&sb->s_type->i_mutex_key#22){+.+.}, at: generic_file_write_iter+0xe4/0x6b0 mm/filemap.c:3290

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

NMI backtrace for cpu 0
CPU: 0 PID: 1019 Comm: khungtaskd Not tainted 4.20.0-rc5+ #361
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x244/0x39d lib/dump_stack.c:113
 nmi_cpu_backtrace.cold.2+0x5c/0xa1 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1e8/0x22a lib/nmi_backtrace.c:62
 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:205 [inline]
 watchdog+0xb51/0x1060 kernel/hung_task.c:289
 kthread+0x35a/0x440 kernel/kthread.c:246
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352
Sending NMI from CPU 0 to CPUs 1:
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 2.620 msecs
NMI backtrace for cpu 1
CPU: 1 PID: 21 Comm: kworker/u4:1 Not tainted 4.20.0-rc5+ #361
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: writeback wb_workfn (flush-7:0)
RIP: 0010:bytes_is_nonzero mm/kasan/kasan.c:167 [inline]
RIP: 0010:memory_is_nonzero mm/kasan/kasan.c:184 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/kasan.c:210 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/kasan.c:241 [inline]
RIP: 0010:check_memory_region_inline mm/kasan/kasan.c:257 [inline]
RIP: 0010:check_memory_region+0x117/0x1b0 mm/kasan/kasan.c:267
Code: 00 4d 85 c0 75 3e 4d 89 e0 49 29 c0 e9 6c ff ff ff 4d 85 c0 74 ba 48 b8 01 00 00 00 00 fc ff df 4d 01 c8 48 01 d8 41 80 39 00 <74> 08 e9 8c 00 00 00 48 89 d8 4c 39 c0 74 97 80 38 00 48 8d 58 01
RSP: 0018:ffff8881d944d8f0 EFLAGS: 00000246
RAX: ffffed103b5e5b60 RBX: 1ffff1103b5e5b5f RCX: ffffffff816a8282
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8881daf2daf8
RBP: ffff8881d944d908 R08: ffffed103b5e5b60 R09: ffffed103b5e5b5f
R10: ffffed103b5e5b5f R11: ffff8881daf2dafb R12: ffffed103b5e5b60
R13: ffff8881d944d990 R14: ffff8881daf2daf8 R15: ffff8881d944daa0
FS:  0000000000000000(0000) GS:ffff8881daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600400 CR3: 00000001bca89000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272
 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
 rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 kernel/rcu/tree.c:292
 rcu_is_watching+0x10/0x30 kernel/rcu/tree.c:906
 rcu_read_lock_held+0x87/0xc0 kernel/rcu/update.c:277
 xa_entry include/linux/xarray.h:848 [inline]
 xas_descend+0x413/0x510 lib/xarray.c:198
 xas_load+0x145/0x1e0 lib/xarray.c:234
 find_get_entry+0x3ca/0x1120 mm/filemap.c:1415
 pagecache_get_page+0x12f/0xf00 mm/filemap.c:1518
 find_get_page_flags include/linux/pagemap.h:278 [inline]
 __find_get_block_slow fs/buffer.c:205 [inline]
 __find_get_block+0x63a/0xf20 fs/buffer.c:1294
 __getblk_slow fs/buffer.c:1039 [inline]
 __getblk_gfp+0x2b3/0xd50 fs/buffer.c:1320
 __bread_gfp+0x2d/0x310 fs/buffer.c:1354
 sb_bread include/linux/buffer_head.h:307 [inline]
 __fat_write_inode+0x347/0xb60 fs/fat/inode.c:859
 fat_write_inode+0x97/0x180 fs/fat/inode.c:908
 write_inode fs/fs-writeback.c:1176 [inline]
 __writeback_single_inode+0xf56/0x1660 fs/fs-writeback.c:1375
 writeback_sb_inodes+0x71f/0x1210 fs/fs-writeback.c:1580
 __writeback_inodes_wb+0x1b9/0x340 fs/fs-writeback.c:1649
 wb_writeback+0xa73/0xfc0 fs/fs-writeback.c:1758
 wb_check_background_flush fs/fs-writeback.c:1826 [inline]
 wb_do_writeback fs/fs-writeback.c:1914 [inline]
 wb_workfn+0xd65/0x1790 fs/fs-writeback.c:1942
 process_one_work+0xc90/0x1c40 kernel/workqueue.c:2153
 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296
 kthread+0x35a/0x440 kernel/kthread.c:246
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352

Crashes (7):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2018/12/03 13:01 upstream 2595646791c3 819002b0 .config log report
ci-upstream-kasan-gce-root 2018/07/17 18:30 upstream 30b06abfb92b 6d5bd5b5 .config log report
ci-upstream-linux-next-kasan-gce-root 2018/10/28 19:19 linux-next 8c60c36d0b8c 6f9b225a .config log report
ci-upstream-linux-next-kasan-gce-root 2018/10/24 06:38 linux-next 8c60c36d0b8c a8292de9 .config log report
ci-upstream-linux-next-kasan-gce-root 2018/10/07 18:32 linux-next 12ffaa1197f5 8b311eaf .config log report
ci-upstream-linux-next-kasan-gce-root 2018/07/24 11:59 linux-next 89cf55353308 4969639c .config log report
ci-upstream-linux-next-kasan-gce-root 2018/07/22 19:35 linux-next 89cf55353308 8cc079c3 .config log report