syzbot


INFO: task hung in rdma_destroy_id (2)

Status: upstream: reported C repro on 2022/12/07 05:36
Reported-by: syzbot+90634e20baba61838a8a@syzkaller.appspotmail.com
First crash: 585d, last: 534d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in rdma_destroy_id C done 2 1307d 1337d 1/1 fixed on 2021/01/14 15:11
upstream INFO: task hung in rdma_destroy_id rdma 6 1565d 1594d 0/27 closed as dup on 2020/03/09 17:21

Sample crash report:
INFO: task syz-executor330:4291 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-executor330 D28368  4291   8112 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
 schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
 do_wait_for_common kernel/sched/completion.c:83 [inline]
 __wait_for_common kernel/sched/completion.c:104 [inline]
 wait_for_common+0x29c/0x470 kernel/sched/completion.c:115
 rdma_destroy_id+0x4c9/0x950 drivers/infiniband/core/cma.c:1750
 ucma_close+0x140/0x360 drivers/infiniband/core/ucma.c:1819
 __fput+0x2ce/0x890 fs/file_table.c:278
 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:0x7f6f63e69f03
Code: Bad RIP value.
RSP: 002b:00007ffd09d4d1f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f6f63e69f03
RDX: 0000000000000048 RSI: 0000000020000240 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007ffd09d4d220 R09: 00007ffd09d4d220
R10: 00007ffd09d4d220 R11: 0000000000000246 R12: 00007ffd09d4d218
R13: 00007ffd09d4d250 R14: 00007ffd09d4d230 R15: 00000000000013c0
INFO: task syz-executor330:4921 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-executor330 D28368  4921   8109 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
 schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
 do_wait_for_common kernel/sched/completion.c:83 [inline]
 __wait_for_common kernel/sched/completion.c:104 [inline]
 wait_for_common+0x29c/0x470 kernel/sched/completion.c:115
 rdma_destroy_id+0x4c9/0x950 drivers/infiniband/core/cma.c:1750
 ucma_close+0x140/0x360 drivers/infiniband/core/ucma.c:1819
 __fput+0x2ce/0x890 fs/file_table.c:278
 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:0x7f6f63e69f03
Code: Bad RIP value.
RSP: 002b:00007ffd09d4d1f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f6f63e69f03
RDX: 0000000000000048 RSI: 0000000020000240 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007ffd09d4d220 R09: 00007ffd09d4d220
R10: 00007ffd09d4d220 R11: 0000000000000246 R12: 00007ffd09d4d218
R13: 00007ffd09d4d250 R14: 00007ffd09d4d230 R15: 00000000000013e6
INFO: task syz-executor330:20847 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-executor330 D28368 20847   8115 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
 schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
 do_wait_for_common kernel/sched/completion.c:83 [inline]
 __wait_for_common kernel/sched/completion.c:104 [inline]
 wait_for_common+0x29c/0x470 kernel/sched/completion.c:115
 rdma_destroy_id+0x4c9/0x950 drivers/infiniband/core/cma.c:1750
 ucma_close+0x140/0x360 drivers/infiniband/core/ucma.c:1819
 __fput+0x2ce/0x890 fs/file_table.c:278
 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:0x7f6f63e69f03
Code: Bad RIP value.
RSP: 002b:00007ffd09d4d1f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f6f63e69f03
RDX: 0000000000000048 RSI: 0000000020000240 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007ffd09d4d220 R09: 00007ffd09d4d220
R10: 00007ffd09d4d220 R11: 0000000000000246 R12: 00007ffd09d4d218
R13: 00007ffd09d4d250 R14: 00007ffd09d4d230 R15: 0000000000001bd7

Showing all locks held in the system:
1 lock held by ksoftirqd/1/18:
 #0: 00000000a719046e (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 00000000a719046e (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
1 lock held by khungtaskd/1570:
 #0: 0000000084e2d5d8 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7811:
 #0: 00000000fbf24c6b (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
4 locks held by syz-executor330/8113:
 #0: 00000000a719046e (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 00000000a719046e (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
 #1: 00000000a8d8c557 (tk_core.seq){----}, at: current_kernel_time64 include/linux/timekeeping.h:277 [inline]
 #1: 00000000a8d8c557 (tk_core.seq){----}, at: current_time+0x6f/0x1c0 fs/inode.c:2162
 #2: 000000008b87dc0b (pool_lock){-.-.}, at: __free_object+0x17/0x1e0 lib/debugobjects.c:251
 #3: 00000000b03ecc46 (&mm->context.lock){+.+.}, at: ldt_dup_context+0x38/0x260 arch/x86/kernel/ldt.c:367
1 lock held by cron/14961:
 #0: 0000000010803314 (&type->i_mutex_dir_key#3){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline]
 #0: 0000000010803314 (&type->i_mutex_dir_key#3){++++}, at: do_last fs/namei.c:3326 [inline]
 #0: 0000000010803314 (&type->i_mutex_dir_key#3){++++}, at: path_openat+0x17ec/0x2df0 fs/namei.c:3537
1 lock held by syz-executor330/14967:
 #0: 00000000a719046e (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 00000000a719046e (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455

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

NMI backtrace for cpu 0
CPU: 0 PID: 1570 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
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: 14991 Comm: syz-executor330 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:debug_lockdep_rcu_enabled+0x0/0xe0 kernel/rcu/update.c:253
Code: ff ff 48 89 ef e8 90 c4 47 00 e9 fa fd ff ff 48 89 ef e8 83 c4 47 00 e9 62 fe ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <48> c7 c0 44 e0 26 8b 53 48 ba 00 00 00 00 00 fc ff df 48 89 c1 83
RSP: 0000:ffff88809642fb70 EFLAGS: 00000246
RAX: ffff88809c9fe1c0 RBX: 0000000000000000 RCX: ffffffff818d0dbf
RDX: 0000000000000000 RSI: 00000000000012c2 RDI: ffffffff8872a8e0
RBP: ffffffff8872a8e0 R08: ffffffffffffffe8 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000440549 R12: 00000000000012c2
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88809642fd48
FS:  0000555555657300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000050 CR3: 00000000a195d000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ___might_sleep+0x15/0x2b0 kernel/sched/core.c:6157
 process_huge_page mm/memory.c:4802 [inline]
 clear_huge_page+0x98/0x460 mm/memory.c:4863
 __do_huge_pmd_anonymous_page mm/huge_memory.c:583 [inline]
 do_huge_pmd_anonymous_page+0xbb5/0x1e60 mm/huge_memory.c:740
 create_huge_pmd mm/memory.c:4066 [inline]
 __handle_mm_fault+0x289c/0x41c0 mm/memory.c:4270
 handle_mm_fault+0x436/0xb10 mm/memory.c:4336
 __do_page_fault+0x68e/0xd60 arch/x86/mm/fault.c:1412
 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1205
RIP: 0033:0x7f6f63e69738
Code: 01 00 00 00 48 8d 35 2d 89 08 00 e8 92 06 00 00 66 0f 6f 05 3a 8c 08 00 45 31 c0 48 b8 72 64 6d 61 5f 63 6d 00 b9 02 00 00 00 <48> 89 04 25 50 00 00 20 31 c0 ba 40 00 00 20 0f 29 04 25 40 00 00
RSP: 002b:00007ffd09d4d200 EFLAGS: 00010246
RAX: 006d635f616d6472 RBX: 00000000001185ac RCX: 0000000000000002
RDX: 0000000000000012 RSI: 00007f6f63ef2046 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffd09d4cc70
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd09d4d218
R13: 00007ffd09d4d250 R14: 00007ffd09d4d230 R15: 0000000000008214

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/27 17:18 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in rdma_destroy_id
2023/01/27 14:06 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in rdma_destroy_id
2022/12/07 05:36 linux-4.19.y 3f8a27f9e27b d88f3abb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in rdma_destroy_id
* Struck through repros no longer work on HEAD.