ci starts bisection 2023-04-02 11:13:22.889031654 +0000 UTC m=+341343.335379620 bisecting fixing commit since 0840a7914caa14315a3191178a9f72c742477860 building syzkaller on a371c43c33b6f901421f93b655442363c072d251 ensuring issue is reproducible on original commit 0840a7914caa14315a3191178a9f72c742477860 testing commit 0840a7914caa14315a3191178a9f72c742477860 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 0953e9613361c3280ff9bc60337df1dd8ec9c0719dbc1868f9ea826229a7dfb8 run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: exit status NUM run #1: crashed: possible deadlock in rds_wake_sk_sleep run #2: crashed: possible deadlock in rds_wake_sk_sleep run #3: crashed: possible deadlock in rds_wake_sk_sleep run #4: crashed: possible deadlock in rds_wake_sk_sleep run #5: crashed: possible deadlock in rds_wake_sk_sleep run #6: crashed: possible deadlock in rds_wake_sk_sleep run #7: crashed: possible deadlock in rds_wake_sk_sleep run #8: crashed: possible deadlock in rds_wake_sk_sleep run #9: crashed: possible deadlock in rds_wake_sk_sleep run #10: crashed: possible deadlock in rds_wake_sk_sleep run #11: crashed: possible deadlock in rds_wake_sk_sleep run #12: crashed: possible deadlock in rds_wake_sk_sleep run #13: crashed: possible deadlock in rds_wake_sk_sleep run #14: crashed: possible deadlock in rds_wake_sk_sleep run #15: crashed: possible deadlock in rds_wake_sk_sleep run #16: crashed: possible deadlock in rds_wake_sk_sleep run #17: crashed: possible deadlock in rds_wake_sk_sleep run #18: OK run #19: OK testing current HEAD 00c7b5f4ddc5b346df62b757ec73f9357bb452af testing commit 00c7b5f4ddc5b346df62b757ec73f9357bb452af gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 1baf67a6aa99361c9942b2dee8c563b31ed39414d1200923224faadd394a9ce4 run #0: crashed: possible deadlock in rds_wake_sk_sleep run #1: crashed: possible deadlock in rds_wake_sk_sleep run #2: crashed: possible deadlock in rds_wake_sk_sleep run #3: crashed: possible deadlock in rds_wake_sk_sleep run #4: crashed: possible deadlock in rds_wake_sk_sleep run #5: crashed: possible deadlock in rds_wake_sk_sleep run #6: crashed: possible deadlock in rds_wake_sk_sleep run #7: crashed: possible deadlock in rds_wake_sk_sleep run #8: OK run #9: OK revisions tested: 2, total time: 37m8.242674387s (build: 13m34.770100867s, test: 22m42.009844909s) the crash still happens on HEAD commit msg: Merge tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input crash: possible deadlock in rds_wake_sk_sleep ====================================================== WARNING: possible circular locking dependency detected 6.3.0-rc4-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor227/8407 is trying to acquire lock: ffff8880288ed670 (&rs->rs_recv_lock){...-}-{2:2}, at: rds_wake_sk_sleep+0x1a/0xc0 net/rds/af_rds.c:109 but task is already holding lock: ffff88807b543100 (&rm->m_rs_lock){..-.}-{2:2}, at: rds_send_remove_from_sock+0x1e7/0x9a0 net/rds/send.c:628 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&rm->m_rs_lock){..-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 rds_message_purge net/rds/message.c:138 [inline] rds_message_put+0x16d/0xab0 net/rds/message.c:180 rds_clear_recv_queue+0x1c5/0x350 net/rds/recv.c:768 rds_release+0xca/0x350 net/rds/af_rds.c:73 __sock_release+0xbb/0x280 net/socket.c:653 sock_close+0xf/0x20 net/socket.c:1395 __fput+0x1fa/0x9a0 fs/file_table.c:321 task_work_run+0x12b/0x220 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:297 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (&rs->rs_recv_lock){...-}-{2:2}: check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2ec7/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1ab/0x520 kernel/locking/lockdep.c:5634 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0x45/0x90 kernel/locking/spinlock.c:236 rds_wake_sk_sleep+0x1a/0xc0 net/rds/af_rds.c:109 rds_send_remove_from_sock+0x256/0x9a0 net/rds/send.c:634 rds_send_path_drop_acked+0x276/0x360 net/rds/send.c:710 rds_tcp_write_space+0x196/0x5c0 net/rds/tcp_send.c:198 tcp_new_space net/ipv4/tcp_input.c:5483 [inline] tcp_check_space+0xde/0x730 net/ipv4/tcp_input.c:5502 tcp_data_snd_check net/ipv4/tcp_input.c:5511 [inline] tcp_rcv_established+0x75f/0x2020 net/ipv4/tcp_input.c:6019 tcp_v4_do_rcv+0x537/0x800 net/ipv4/tcp_ipv4.c:1721 sk_backlog_rcv include/net/sock.h:1113 [inline] __release_sock+0x113/0x360 net/core/sock.c:2922 release_sock+0x4a/0x170 net/core/sock.c:3489 rds_send_xmit+0x87e/0x2370 net/rds/send.c:422 rds_sendmsg+0x1d90/0x29f0 net/rds/send.c:1381 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xbc/0x150 net/socket.c:747 __sys_sendto+0x1bb/0x290 net/socket.c:2142 __do_sys_sendto net/socket.c:2154 [inline] __se_sys_sendto net/socket.c:2150 [inline] __x64_sys_sendto+0xd8/0x1b0 net/socket.c:2150 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rm->m_rs_lock); lock(&rs->rs_recv_lock); lock(&rm->m_rs_lock); lock(&rs->rs_recv_lock); *** DEADLOCK *** 3 locks held by syz-executor227/8407: #0: ffff88801710c2f0 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1697 [inline] #0: ffff88801710c2f0 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_sock_set_cork+0xe/0x70 net/ipv4/tcp.c:3342 #1: ffff88801710c578 (k-clock-AF_INET){++.-}-{2:2}, at: rds_tcp_write_space+0x20/0x5c0 net/rds/tcp_send.c:184 #2: ffff88807b543100 (&rm->m_rs_lock){..-.}-{2:2}, at: rds_send_remove_from_sock+0x1e7/0x9a0 net/rds/send.c:628 stack backtrace: CPU: 1 PID: 8407 Comm: syz-executor227 Not tainted 6.3.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x60/0xa0 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2ec7/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1ab/0x520 kernel/locking/lockdep.c:5634 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0x45/0x90 kernel/locking/spinlock.c:236 rds_wake_sk_sleep+0x1a/0xc0 net/rds/af_rds.c:109 rds_send_remove_from_sock+0x256/0x9a0 net/rds/send.c:634 rds_send_path_drop_acked+0x276/0x360 net/rds/send.c:710 rds_tcp_write_space+0x196/0x5c0 net/rds/tcp_send.c:198 tcp_new_space net/ipv4/tcp_input.c:5483 [inline] tcp_check_space+0xde/0x730 net/ipv4/tcp_input.c:5502 tcp_data_snd_check net/ipv4/tcp_input.c:5511 [inline] tcp_rcv_established+0x75f/0x2020 net/ipv4/tcp_input.c:6019 tcp_v4_do_rcv+0x537/0x800 net/ipv4/tcp_ipv4.c:1721 sk_backlog_rcv include/net/sock.h:1113 [inline] __release_sock+0x113/0x360 net/core/sock.c:2922 release_sock+0x4a/0x170 net/core/sock.c:3489 rds_send_xmit+0x87e/0x2370 net/rds/send.c:422 rds_sendmsg+0x1d90/0x29f0 net/rds/send.c:1381 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xbc/0x150 net/socket.c:747 __sys_sendto+0x1bb/0x290 net/socket.c:2142 __do_sys_sendto net/socket.c:2154 [inline] __se_sys_sendto net/socket.c:2150 [inline] __x64_sys_sendto+0xd8/0x1b0 net/socket.c:2150 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f968d0d7139 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 15 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f968d084308 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f968d1604c8 RCX: 00007f968d0d7139 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f968d1604c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f968d12d5d0 R13: 00007ffceb72c85f R14: 00007f968d084400 R15: 0000000000022000