ci starts bisection 2022-11-07 06:09:27.017706033 +0000 UTC m=+296892.568034900 bisecting fixing commit since f022814633e1c600507b3a99691b4d624c2813f0 building syzkaller on 89bc860804252dbacb8c2bea60b9204859f4afd7 ensuring issue is reproducible on original commit f022814633e1c600507b3a99691b4d624c2813f0 testing commit f022814633e1c600507b3a99691b4d624c2813f0 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: dac2066699622b5c0bdc42c19c3d8018fe0a5c7fff3e947a1e0c3bb57fc3c99f run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: failed to write control pipe: write |NUM: broken pipe run #1: crashed: INFO: task hung in lock_sock_nested run #2: crashed: INFO: task hung in lock_sock_nested run #3: crashed: INFO: task hung in lock_sock_nested run #4: crashed: INFO: task hung in lock_sock_nested run #5: crashed: INFO: task hung in lock_sock_nested run #6: crashed: INFO: task hung in lock_sock_nested run #7: crashed: INFO: task hung in lock_sock_nested run #8: crashed: INFO: task hung in lock_sock_nested run #9: crashed: INFO: task hung in lock_sock_nested run #10: crashed: INFO: task hung in lock_sock_nested run #11: crashed: INFO: task hung in lock_sock_nested run #12: crashed: INFO: task hung in lock_sock_nested run #13: crashed: INFO: task hung in lock_sock_nested run #14: crashed: INFO: task hung in lock_sock_nested run #15: crashed: INFO: task hung in lock_sock_nested run #16: crashed: INFO: task hung in lock_sock_nested run #17: crashed: INFO: task hung in lock_sock_nested run #18: crashed: INFO: task hung in lock_sock_nested run #19: crashed: INFO: task hung in lock_sock_nested testing current HEAD f0c4d9fc9cc9462659728d168387191387e903cc testing commit f0c4d9fc9cc9462659728d168387191387e903cc gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 159a1190d1da9b88993b7e0d6d27c290dd68c753dc2339f3b4321fdb102be00b all runs: crashed: possible deadlock in rfcomm_sk_state_change revisions tested: 2, total time: 25m51.642411362s (build: 14m51.585794926s, test: 10m9.87779276s) the crash still happens on HEAD commit msg: Linux 6.1-rc4 crash: possible deadlock in rfcomm_sk_state_change ====================================================== WARNING: possible circular locking dependency detected 6.1.0-rc4-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/4083 is trying to acquire lock: ffff888078b7c130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1721 [inline] ffff888078b7c130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sk_state_change+0x51/0x280 net/bluetooth/rfcomm/sock.c:73 but task is already holding lock: ffff88801bd55528 (&d->lock){+.+.}-{3:3}, at: __rfcomm_dlc_close+0x1ed/0x3e0 net/bluetooth/rfcomm/core.c:487 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&d->lock){+.+.}-{3:3}: lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 __rfcomm_dlc_close+0x1ed/0x3e0 net/bluetooth/rfcomm/core.c:487 rfcomm_dlc_close+0xf0/0x180 net/bluetooth/rfcomm/core.c:520 __rfcomm_sock_close+0xf5/0x1d0 net/bluetooth/rfcomm/sock.c:220 rfcomm_sock_shutdown+0x98/0x1c0 net/bluetooth/rfcomm/sock.c:907 rfcomm_sock_release+0x4b/0x100 net/bluetooth/rfcomm/sock.c:928 __sock_release net/socket.c:650 [inline] sock_close+0xcc/0x230 net/socket.c:1365 __fput+0x339/0x710 fs/file_table.c:320 task_work_run+0x227/0x2b0 kernel/task_work.c:179 get_signal+0x115d/0x1310 kernel/signal.c:2635 arch_do_signal_or_restart+0x8d/0x6f0 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #1 (rfcomm_mutex){+.+.}-{3:3}: lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 rfcomm_dlc_open+0x20/0x50 net/bluetooth/rfcomm/core.c:425 rfcomm_sock_connect+0x222/0x3f0 net/bluetooth/rfcomm/sock.c:413 __sys_connect_file net/socket.c:1976 [inline] __sys_connect+0x234/0x260 net/socket.c:1993 __do_sys_connect net/socket.c:2003 [inline] __se_sys_connect net/socket.c:2000 [inline] __x64_sys_connect+0x71/0x80 net/socket.c:2000 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x50 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain+0x184a/0x6470 kernel/locking/lockdep.c:3831 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 lock_sock_nested+0x3a/0xd0 net/core/sock.c:3447 lock_sock include/net/sock.h:1721 [inline] rfcomm_sk_state_change+0x51/0x280 net/bluetooth/rfcomm/sock.c:73 __rfcomm_dlc_close+0x230/0x3e0 net/bluetooth/rfcomm/core.c:489 rfcomm_dlc_close+0xf0/0x180 net/bluetooth/rfcomm/core.c:520 __rfcomm_sock_close+0xf5/0x1d0 net/bluetooth/rfcomm/sock.c:220 rfcomm_sock_shutdown+0x98/0x1c0 net/bluetooth/rfcomm/sock.c:907 rfcomm_sock_release+0x4b/0x100 net/bluetooth/rfcomm/sock.c:928 __sock_release net/socket.c:650 [inline] sock_close+0xcc/0x230 net/socket.c:1365 __fput+0x339/0x710 fs/file_table.c:320 task_work_run+0x227/0x2b0 kernel/task_work.c:179 get_signal+0x115d/0x1310 kernel/signal.c:2635 arch_do_signal_or_restart+0x8d/0x6f0 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Chain exists of: sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM --> rfcomm_mutex --> &d->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&d->lock); lock(rfcomm_mutex); lock(&d->lock); lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM); *** DEADLOCK *** 3 locks held by syz-executor.0/4083: #0: ffff888073cc7a10 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff888073cc7a10 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: __sock_release net/socket.c:649 [inline] #0: ffff888073cc7a10 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: sock_close+0x88/0x230 net/socket.c:1365 #1: ffffffff8cc25888 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_close+0x2d/0x180 net/bluetooth/rfcomm/core.c:507 #2: ffff88801bd55528 (&d->lock){+.+.}-{3:3}, at: __rfcomm_dlc_close+0x1ed/0x3e0 net/bluetooth/rfcomm/core.c:487 stack backtrace: CPU: 1 PID: 4083 Comm: syz-executor.0 Not tainted 6.1.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x163/0x213 lib/dump_stack.c:106 check_noncircular+0x2f9/0x3b0 kernel/locking/lockdep.c:2177 check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain+0x184a/0x6470 kernel/locking/lockdep.c:3831 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 lock_sock_nested+0x3a/0xd0 net/core/sock.c:3447 lock_sock include/net/sock.h:1721 [inline] rfcomm_sk_state_change+0x51/0x280 net/bluetooth/rfcomm/sock.c:73 __rfcomm_dlc_close+0x230/0x3e0 net/bluetooth/rfcomm/core.c:489 rfcomm_dlc_close+0xf0/0x180 net/bluetooth/rfcomm/core.c:520 __rfcomm_sock_close+0xf5/0x1d0 net/bluetooth/rfcomm/sock.c:220 rfcomm_sock_shutdown+0x98/0x1c0 net/bluetooth/rfcomm/sock.c:907 rfcomm_sock_release+0x4b/0x100 net/bluetooth/rfcomm/sock.c:928 __sock_release net/socket.c:650 [inline] sock_close+0xcc/0x230 net/socket.c:1365 __fput+0x339/0x710 fs/file_table.c:320 task_work_run+0x227/0x2b0 kernel/task_work.c:179 get_signal+0x115d/0x1310 kernel/signal.c:2635 arch_do_signal_or_restart+0x8d/0x6f0 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0b91489049 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0b925ff168 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffffc RBX: 00007f0b9159bf60 RCX: 00007f0b91489049 RDX: 0000000000000080 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007f0b914e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc83ebf75f R14: 00007f0b925ff300 R15: 0000000000022000