syzbot


INFO: task hung in __fdget_pos

Status: closed as invalid on 2018/03/27 11:08
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+95c363082187fdacaf6c@syzkaller.appspotmail.com
First crash: 2215d, last: 2215d
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 INFO: task hung in __fdget_pos 2 2036d 2048d 0/2 auto-closed as invalid on 2019/03/21 05:21
linux-6.1 INFO: task hung in __fdget_pos 1 193d 193d 0/3 auto-obsoleted due to no activity on 2024/01/16 13:13
android-49 INFO: task hung in __fdget_pos 22 2037d 2168d 0/3 auto-closed as invalid on 2019/03/20 03:41
upstream INFO: task hung in __fdget_pos (4) fs syz error 86 2d03h 229d 0/26 upstream: reported syz repro on 2023/09/03 04:11
upstream INFO: task hung in __fdget_pos (3) fs 3 923d 940d 0/26 auto-closed as invalid on 2022/01/07 10:38
android-414 INFO: task hung in __fdget_pos 1 1905d 1835d 0/1 auto-closed as invalid on 2019/07/30 11:39
linux-5.15 INFO: task hung in __fdget_pos (2) 1 4d20h 4d20h 0/3 upstream: reported on 2024/04/14 16:46
linux-5.15 INFO: task hung in __fdget_pos 1 385d 385d 0/3 auto-obsoleted due to no activity on 2023/07/29 10:54
upstream INFO: task hung in __fdget_pos (2) fs 36 1928d 2152d 0/26 closed as dup on 2018/10/27 13:29

Sample crash report:
Buffer I/O error on dev loop0, logical block 0, async page read
kworker/dying (160) used greatest stack depth: 13032 bytes left
INFO: task syz-executor0:6176 blocked for more than 120 seconds.
      Not tainted 4.16.0-rc7+ #277
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor0   D25104  6176   4099 0x20020004
Call Trace:
 context_switch kernel/sched/core.c:2862 [inline]
 __schedule+0x8fb/0x1ec0 kernel/sched/core.c:3440
 schedule+0xf5/0x430 kernel/sched/core.c:3499
 schedule_preempt_disabled+0x10/0x20 kernel/sched/core.c:3557
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0xaad/0x1a80 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 __fdget_pos+0x12b/0x190 fs/file.c:765
 fdget_pos include/linux/file.h:67 [inline]
 SYSC_write fs/read_write.c:584 [inline]
 SyS_write+0x77/0x220 fs/read_write.c:581
 do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline]
 do_fast_syscall_32+0x3ec/0xf9f arch/x86/entry/common.c:392
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7feec99
RSP: 002b:00000000f77ea09c EFLAGS: 00000286 ORIG_RAX: 0000000000000004
RAX: ffffffffffffffda RBX: 0000000000000016 RCX: 0000000020000240
RDX: 000000000000000e RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
2 locks held by khungtaskd/801:
 #0:  (rcu_read_lock){....}, at: [<0000000059b374fd>] check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline]
 #0:  (rcu_read_lock){....}, at: [<0000000059b374fd>] watchdog+0x1c5/0xd60 kernel/hung_task.c:249
 #1:  (tasklist_lock){.+.+}, at: [<00000000179bebb9>] debug_show_all_locks+0xd3/0x3d0 kernel/locking/lockdep.c:4470
4 locks held by kworker/0:2/1893:
 #0:  ((wq_completion)"memcg_kmem_cache"){+.+.}, at: [<0000000062d98656>] work_static include/linux/workqueue.h:198 [inline]
 #0:  ((wq_completion)"memcg_kmem_cache"){+.+.}, at: [<0000000062d98656>] set_work_data kernel/workqueue.c:619 [inline]
 #0:  ((wq_completion)"memcg_kmem_cache"){+.+.}, at: [<0000000062d98656>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
 #0:  ((wq_completion)"memcg_kmem_cache"){+.+.}, at: [<0000000062d98656>] process_one_work+0xb12/0x1bb0 kernel/workqueue.c:2084
 #1:  ((work_completion)(&cw->work)){+.+.}, at: [<00000000e7bdb3de>] process_one_work+0xb89/0x1bb0 kernel/workqueue.c:2088
 #2:  (cpu_hotplug_lock.rw_sem){++++}, at: [<0000000005a8a127>] get_online_cpus include/linux/cpu.h:124 [inline]
 #2:  (cpu_hotplug_lock.rw_sem){++++}, at: [<0000000005a8a127>] memcg_create_kmem_cache+0x16/0x170 mm/slab_common.c:619
 #3:  (slab_mutex){+.+.}, at: [<0000000064dc0d56>] memcg_create_kmem_cache+0x24/0x170 mm/slab_common.c:622
1 lock held by rsyslogd/3939:
 #0:  (&f->f_pos_lock){+.+.}, at: [<00000000eaf07a09>] __fdget_pos+0x12b/0x190 fs/file.c:765
2 locks held by getty/4030:
 #0:  (&tty->ldisc_sem){++++}, at: [<0000000051d7d8b1>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<0000000001680536>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131
2 locks held by getty/4031:
 #0:  (&tty->ldisc_sem){++++}, at: [<0000000051d7d8b1>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<0000000001680536>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131
2 locks held by getty/4032:
 #0:  (&tty->ldisc_sem){++++}, at: [<0000000051d7d8b1>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<0000000001680536>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131
2 locks held by getty/4033:
 #0:  (&tty->ldisc_sem){++++}, at: [<0000000051d7d8b1>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<0000000001680536>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131
2 locks held by getty/4034:
 #0:  (&tty->ldisc_sem){++++}, at: [<0000000051d7d8b1>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<0000000001680536>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131
2 locks held by getty/4035:
 #0:  (&tty->ldisc_sem){++++}, at: [<0000000051d7d8b1>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<0000000001680536>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131
2 locks held by getty/4036:
 #0:  (&tty->ldisc_sem){++++}, at: [<0000000051d7d8b1>] ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<0000000001680536>] n_tty_read+0x2ef/0x1a40 drivers/tty/n_tty.c:2131
4 locks held by kworker/1:5/8210:
 #0:  ((wq_completion)"memcg_kmem_cache"){+.+.}, at: [<0000000062d98656>] work_static include/linux/workqueue.h:198 [inline]
 #0:  ((wq_completion)"memcg_kmem_cache"){+.+.}, at: [<0000000062d98656>] set_work_data kernel/workqueue.c:619 [inline]
 #0:  ((wq_completion)"memcg_kmem_cache"){+.+.}, at: [<0000000062d98656>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
 #0:  ((wq_completion)"memcg_kmem_cache"){+.+.}, at: [<0000000062d98656>] process_one_work+0xb12/0x1bb0 kernel/workqueue.c:2084
 #1:  ((work_completion)(&cw->work)){+.+.}, at: [<00000000e7bdb3de>] process_one_work+0xb89/0x1bb0 kernel/workqueue.c:2088
 #2:  (cpu_hotplug_lock.rw_sem){++++}, at: [<0000000005a8a127>] get_online_cpus include/linux/cpu.h:124 [inline]
 #2:  (cpu_hotplug_lock.rw_sem){++++}, at: [<0000000005a8a127>] memcg_create_kmem_cache+0x16/0x170 mm/slab_common.c:619
 #3:  (slab_mutex){+.+.}, at: [<0000000064dc0d56>] memcg_create_kmem_cache+0x24/0x170 mm/slab_common.c:622
3 locks held by kworker/0:6/8342:
 #0:  ((wq_completion)"events"){+.+.}, at: [<0000000062d98656>] work_static include/linux/workqueue.h:198 [inline]
 #0:  ((wq_completion)"events"){+.+.}, at: [<0000000062d98656>] set_work_data kernel/workqueue.c:619 [inline]
 #0:  ((wq_completion)"events"){+.+.}, at: [<0000000062d98656>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
 #0:  ((wq_completion)"events"){+.+.}, at: [<0000000062d98656>] process_one_work+0xb12/0x1bb0 kernel/workqueue.c:2084
 #1:  (slab_caches_to_rcu_destroy_work){+.+.}, at: [<00000000e7bdb3de>] process_one_work+0xb89/0x1bb0 kernel/workqueue.c:2088
 #2:  (slab_mutex){+.+.}, at: [<0000000076bf341f>] slab_caches_to_rcu_destroy_workfn+0x25/0xc0 mm/slab_common.c:556
4 locks held by kworker/1:9/20224:
 #0:  ((wq_completion)"cgroup_destroy"){+.+.}, at: [<0000000062d98656>] work_static include/linux/workqueue.h:198 [inline]
 #0:  ((wq_completion)"cgroup_destroy"){+.+.}, at: [<0000000062d98656>] set_work_data kernel/workqueue.c:619 [inline]
 #0:  ((wq_completion)"cgroup_destroy"){+.+.}, at: [<0000000062d98656>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
 #0:  ((wq_completion)"cgroup_destroy"){+.+.}, at: [<0000000062d98656>] process_one_work+0xb12/0x1bb0 kernel/workqueue.c:2084
 #1:  ((work_completion)(&css->destroy_work)#3){+.+.}, at: [<00000000e7bdb3de>] process_one_work+0xb89/0x1bb0 kernel/workqueue.c:2088
 #2:  (cpu_hotplug_lock.rw_sem){++++}, at: [<000000007f6372c5>] get_online_cpus include/linux/cpu.h:124 [inline]
 #2:  (cpu_hotplug_lock.rw_sem){++++}, at: [<000000007f6372c5>] memcg_destroy_kmem_caches+0xf/0x80 mm/slab_common.c:771
 #3:  (slab_mutex){+.+.}, at: [<000000006fbd677c>] memcg_destroy_kmem_caches+0x24/0x80 mm/slab_common.c:774
1 lock held by syz-executor0/6176:
 #0:  (&f->f_pos_lock){+.+.}, at: [<00000000eaf07a09>] __fdget_pos+0x12b/0x190 fs/file.c:765
3 locks held by syz-executor0/6177:
 #0:  (&f->f_pos_lock){+.+.}, at: [<00000000eaf07a09>] __fdget_pos+0x12b/0x190 fs/file.c:765
 #1:  (sb_writers#10){.+.+}, at: [<00000000bbd51665>] file_start_write include/linux/fs.h:2709 [inline]
 #1:  (sb_writers#10){.+.+}, at: [<00000000bbd51665>] vfs_write+0x407/0x510 fs/read_write.c:543
 #2:  (&of->mutex){+.+.}, at: [<000000000c3fc602>] kernfs_fop_write+0x208/0x440 fs/kernfs/file.c:307
3 locks held by syz-executor0/6184:
 #0:  (&f->f_pos_lock){+.+.}, at: [<00000000eaf07a09>] __fdget_pos+0x12b/0x190 fs/file.c:765
 #1:  (sb_writers#10){.+.+}, at: [<00000000bbd51665>] file_start_write include/linux/fs.h:2709 [inline]
 #1:  (sb_writers#10){.+.+}, at: [<00000000bbd51665>] vfs_write+0x407/0x510 fs/read_write.c:543
 #2:  (&of->mutex){+.+.}, at: [<000000000c3fc602>] kernfs_fop_write+0x208/0x440 fs/kernfs/file.c:307

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

NMI backtrace for cpu 0
CPU: 0 PID: 801 Comm: khungtaskd Not tainted 4.16.0-rc7+ #277
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x24d lib/dump_stack.c:53
 nmi_cpu_backtrace+0x1d2/0x210 lib/nmi_backtrace.c:103
 nmi_trigger_cpumask_backtrace+0x123/0x180 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:138 [inline]
 check_hung_task kernel/hung_task.c:132 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:190 [inline]
 watchdog+0x90c/0xd60 kernel/hung_task.c:249
 kthread+0x33c/0x400 kernel/kthread.c:238
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 17 Comm: kworker/1:0 Not tainted 4.16.0-rc7+ #277
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events rht_deferred_worker
RIP: 0010:lookup_object lib/debugobjects.c:133 [inline]
RIP: 0010:debug_object_activate+0x29d/0x730 lib/debugobjects.c:434
RSP: 0018:ffff8801d9b5ef30 EFLAGS: 00000806
RAX: 1ffff10030b1ba65 RBX: ffff8801858dd310 RCX: ffffffff86f155c0
RDX: dffffc0000000000 RSI: 1ffffffff0f615e3 RDI: ffff8801858dd328
RBP: ffff8801d9b5f000 R08: ffffffff8861b088 R09: 0000000000000082
R10: ffff8801d9b5ede0 R11: 0000000000000000 R12: ffff8801d9b5ef70
R13: 1ffff1003b36bdea R14: ffffffff877029e8 R15: 0000000000000042
FS:  0000000000000000(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3627fa4000 CR3: 0000000006e22006 CR4: 00000000001606e0
DR0: 0000000020000000 DR1: 0000000020000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
 debug_work_activate kernel/workqueue.c:493 [inline]
 __queue_work+0x163/0x1230 kernel/workqueue.c:1382
 queue_work_on+0x16a/0x1c0 kernel/workqueue.c:1488
 queue_work include/linux/workqueue.h:488 [inline]
 schedule_work include/linux/workqueue.h:546 [inline]
 rht_deferred_worker+0x2ba/0x1cd0 lib/rhashtable.c:436
 process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113
 worker_thread+0x223/0x1990 kernel/workqueue.c:2247
 kthread+0x33c/0x400 kernel/kthread.c:238
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406
Code: 89 d8 48 c1 e8 03 80 3c 10 00 0f 85 9d 03 00 00 48 8b 1b 48 85 db 0f 84 87 00 00 00 48 8d 7b 18 41 83 c7 01 48 89 f8 48 c1 e8 03 <80> 3c 10 00 0f 85 36 03 00 00 4c 3b 73 18 75 c4 4c 8d 63 10 48 

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/26 12:52 upstream 3eb2ce825ea1 e033c1f1 .config console log report ci-upstream-kasan-gce-386
* Struck through repros no longer work on HEAD.