syzbot


possible deadlock in rtnl_lock (5)
Status: fixed on 2018/05/08 18:30
Reported-by: syzbot+a46d6abf9d56b1365a72@syzkaller.appspotmail.com
Fix commit: 5c64576a7789 ipvs: fix rtnl_lock lockups caused by start_sync_thread
First crash: 1522d, last: 1492d
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
WARNING: possible recursive locking detected C 12 1504d 1506d 0/22 closed as dup on 2018/04/11 14:05
similar bugs (9):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 possible deadlock in rtnl_lock C 4676 948d 1141d 0/2 public: reported C repro on 2019/04/12 00:00
upstream possible deadlock in rtnl_lock (3) C 3633 1569d 1570d 4/22 fixed on 2018/02/07 13:48
linux-4.19 possible deadlock in rtnl_lock C error 31 621d 872d 0/1 upstream: reported C repro on 2020/01/06 01:18
upstream possible deadlock in rtnl_lock (4) C 73333 1552d 1569d 4/22 fixed on 2018/02/26 20:04
upstream possible deadlock in rtnl_lock (6) C done error 551 811d 1053d 0/22 upstream: reported C repro on 2019/07/08 19:37
android-49 possible deadlock in rtnl_lock C 2906 1371d 1522d 0/3 closed as invalid on 2019/04/05 05:43
upstream possible deadlock in rtnl_lock C 15711 1576d 1632d 4/22 fixed on 2018/02/01 04:00
upstream possible deadlock in rtnl_lock (2) C 10369 1572d 1575d 4/22 fixed on 2018/02/04 23:45
linux-4.14 possible deadlock in rtnl_lock C inconclusive 312 730d 872d 0/1 upstream: reported C repro on 2020/01/06 01:45

Sample crash report:
IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0
IPVS: stopping backup sync thread 4576 ...
IPVS: sync thread started: state = BACKUP, mcast_ifn = lo, syncid = 0, id = 0

============================================
WARNING: possible recursive locking detected
4.17.0-rc1+ #10 Not tainted
--------------------------------------------
syzkaller616458/4568 is trying to acquire lock:
00000000eefca8ba (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74

but task is already holding lock:
00000000eefca8ba (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(rtnl_mutex);
  lock(rtnl_mutex);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syzkaller616458/4568:
 #0: 00000000eefca8ba (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74
 #1: 000000009c632cd2 (ipvs->sync_mutex){+.+.}, at: do_ip_vs_set_ctl+0x562/0x1d30 net/netfilter/ipvs/ip_vs_ctl.c:2388

stack backtrace:
CPU: 0 PID: 4568 Comm: syzkaller616458 Not tainted 4.17.0-rc1+ #10
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+0x1b9/0x294 lib/dump_stack.c:113
 print_deadlock_bug kernel/locking/lockdep.c:1761 [inline]
 check_deadlock kernel/locking/lockdep.c:1805 [inline]
 validate_chain kernel/locking/lockdep.c:2401 [inline]
 __lock_acquire.cold.62+0x18c/0x55b kernel/locking/lockdep.c:3431
 lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920
 __mutex_lock_common kernel/locking/mutex.c:756 [inline]
 __mutex_lock+0x16d/0x17f0 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74
 ip_mc_drop_socket+0x8f/0x270 net/ipv4/igmp.c:2643
 inet_release+0x4e/0x1f0 net/ipv4/af_inet.c:413
 sock_release+0x96/0x1b0 net/socket.c:594
 start_sync_thread+0xdc3/0x2d40 net/netfilter/ipvs/ip_vs_sync.c:1924
 do_ip_vs_set_ctl+0x59c/0x1d30 net/netfilter/ipvs/ip_vs_ctl.c:2389
 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
 nf_setsockopt+0x7d/0xd0 net/netfilter/nf_sockopt.c:115
 ip_setsockopt+0xd8/0xf0 net/ipv4/ip_sockglue.c:1253
 tcp_setsockopt+0x93/0xe0 net/ipv4/tcp.c:2890
 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3039
 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903
 __do_sys_setsockopt net/socket.c:1914 [inline]
 __se_sys_setsockopt net/socket.c:1911 [inline]
 __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911
 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446a29
RSP: 002b:00007f8243a68db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000006e29e4 RCX: 0000000000446a29
RDX: 000000000000048b RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00000000006e29e0 R08: 0000000000000018 R09: 0000000000000000
R10: 0000000020000040 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe7398449f R14: 00007f8243a699c0 R15: 00000000006e2b60
IPVS: stopping backup sync thread 4559 ...

Crashes (1009):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2018/04/21 07:47 upstream 83beed7b2b26 ca03d688 .config log report syz C
ci-upstream-kasan-gce 2018/04/20 21:05 upstream 43f70c960180 cc402841 .config log report syz C
ci-upstream-kasan-gce 2018/04/20 18:21 upstream 43f70c960180 cc402841 .config log report syz C
ci-upstream-kasan-gce-root 2018/04/16 04:18 upstream 71b8ebbf3d7b 7a67784c .config log report syz C
ci-upstream-kasan-gce-root 2018/04/16 00:36 upstream 71b8ebbf3d7b 7a67784c .config log report syz C
ci-upstream-kasan-gce-root 2018/04/15 20:24 upstream 18b7fd1c93e5 7a67784c .config log report syz C
ci-upstream-kasan-gce-root 2018/04/15 18:09 upstream 18b7fd1c93e5 7a67784c .config log report syz C
ci-upstream-kasan-gce 2018/04/15 17:26 upstream 18b7fd1c93e5 7a67784c .config log report syz C
ci-upstream-kasan-gce-root 2018/04/15 14:57 upstream 18b7fd1c93e5 7a67784c .config log report syz C
ci-upstream-kasan-gce-root 2018/04/15 12:35 upstream 18b7fd1c93e5 7a67784c .config log report syz C
ci-upstream-kasan-gce 2018/04/15 07:13 upstream 18b7fd1c93e5 7a67784c .config log report syz C
ci-upstream-kasan-gce 2018/04/14 23:03 upstream 48023102b707 7a67784c .config log report syz C
ci-upstream-kasan-gce-root 2018/04/14 20:56 upstream 48023102b707 7a67784c .config log report syz C
ci-upstream-kasan-gce 2018/04/14 16:48 upstream 48023102b707 7a67784c .config log report syz C
ci-upstream-kasan-gce 2018/04/14 14:02 upstream 48023102b707 7a67784c .config log report syz C
ci-upstream-kasan-gce 2018/04/14 07:49 upstream 1bad9ce155a7 7a67784c .config log report syz C
ci-upstream-kasan-gce-root 2018/03/29 20:29 upstream 0b412605ef5f d47f0ed6 .config log report syz C
ci-upstream-kasan-gce 2018/03/29 20:16 upstream 0b412605ef5f d47f0ed6 .config log report syz C
ci-upstream-kasan-gce-root 2018/03/27 21:06 upstream 3eb2ce825ea1 bf5e585c .config log report syz C
ci-upstream-kasan-gce 2018/03/27 20:55 upstream 3eb2ce825ea1 bf5e585c .config log report syz C
ci-upstream-kasan-gce 2018/03/27 07:43 upstream 3eb2ce825ea1 0ca7878b .config log report syz C
ci-upstream-kasan-gce-root 2018/03/27 02:01 upstream 3eb2ce825ea1 0ca7878b .config log report syz C
ci-upstream-net-kasan-gce 2018/04/23 04:32 net-next 48d7a07ba355 d23fcf6c .config log report syz C
ci-upstream-net-kasan-gce 2018/04/22 08:41 net-next 0638eb573cde d23fcf6c .config log report syz C
ci-upstream-net-kasan-gce 2018/04/20 05:45 net-next bda73d4ec943 eae05cb0 .config log report syz C
ci-upstream-net-kasan-gce 2018/04/18 20:20 net-next 0565de29cbd6 829f0234 .config log report syz C
ci-upstream-net-kasan-gce 2018/04/18 15:47 net-next 0565de29cbd6 52643b44 .config log report syz C
ci-upstream-net-kasan-gce 2018/04/15 06:57 net-next 5d1365940a68 7a67784c .config log report syz C
ci-upstream-net-kasan-gce 2018/04/14 23:10 net-next 5d1365940a68 7a67784c .config log report syz C
ci-upstream-net-kasan-gce 2018/04/14 07:50 net-next 5d1365940a68 7a67784c .config log report syz C
ci-upstream-net-kasan-gce 2018/03/29 19:51 net-next 56455e0998dd d47f0ed6 .config log report syz C
ci-upstream-net-kasan-gce 2018/03/28 11:40 net-next 5d22d47b9ed9 bf5e585c .config log report syz C
ci-upstream-kasan-gce-root 2018/04/24 19:19 upstream 6d08b06e67cd 37e76fe2 .config log report syz
ci-upstream-kasan-gce-root 2018/04/21 03:30 upstream 83beed7b2b26 ca03d688 .config log report syz
ci-upstream-kasan-gce-root 2018/04/15 08:37 upstream 18b7fd1c93e5 7a67784c .config log report syz
ci-upstream-kasan-gce-root 2018/04/14 22:46 upstream 48023102b707 7a67784c .config log report syz
ci-upstream-kasan-gce-root 2018/03/29 23:30 upstream 0b412605ef5f d47f0ed6 .config log report syz
ci-upstream-kasan-gce 2018/03/29 19:45 upstream 0b412605ef5f d47f0ed6 .config log report syz
ci-upstream-kasan-gce-386 2018/03/27 19:28 upstream 3eb2ce825ea1 bf5e585c .config log report syz
ci-upstream-kasan-gce-386 2018/03/27 08:53 upstream 3eb2ce825ea1 0ca7878b .config log report syz
ci-upstream-kasan-gce 2018/04/21 00:03 upstream 43f70c960180 cc402841 .config log report
ci-upstream-kasan-gce 2018/04/20 20:07 upstream 43f70c960180 cc402841 .config log report
ci-upstream-kasan-gce 2018/04/20 17:20 upstream 43f70c960180 cc402841 .config log report
ci-upstream-kasan-gce 2018/04/20 15:49 upstream 87ef12027b9b cc402841 .config log report
ci-upstream-kasan-gce 2018/04/20 13:44 upstream 87ef12027b9b cc402841 .config log report
ci-upstream-kasan-gce 2018/04/20 11:30 upstream 87ef12027b9b eae05cb0 .config log report
ci-upstream-kasan-gce 2018/04/20 09:50 upstream 87ef12027b9b eae05cb0 .config log report
ci-upstream-kasan-gce 2018/04/20 04:23 upstream 87ef12027b9b eae05cb0 .config log report
ci-upstream-kasan-gce 2018/04/20 02:43 upstream 87ef12027b9b eae05cb0 .config log report
ci-upstream-kasan-gce 2018/04/19 19:52 upstream 87ef12027b9b 3642839c .config log report
ci-upstream-kasan-gce 2018/04/19 18:50 upstream 87ef12027b9b 3642839c .config log report
ci-upstream-kasan-gce 2018/04/19 16:27 upstream 87ef12027b9b 3642839c .config log report
ci-upstream-kasan-gce 2018/04/19 14:55 upstream 87ef12027b9b 3642839c .config log report
ci-upstream-kasan-gce 2018/04/19 10:47 upstream 87ef12027b9b d1b2ef69 .config log report
ci-upstream-kasan-gce 2018/04/19 07:14 upstream 87ef12027b9b 829f0234 .config log report
ci-upstream-kasan-gce 2018/04/19 04:24 upstream 87ef12027b9b 829f0234 .config log report
ci-upstream-kasan-gce 2018/04/19 03:17 upstream 87ef12027b9b 829f0234 .config log report
ci-upstream-kasan-gce 2018/04/18 22:52 upstream a27fc14219f2 829f0234 .config log report
ci-upstream-kasan-gce 2018/04/18 08:09 upstream a27fc14219f2 52643b44 .config log report
ci-upstream-kasan-gce 2018/04/16 23:43 upstream a27fc14219f2 b80fd3b5 .config log report
ci-upstream-kasan-gce 2018/04/16 13:45 upstream 60cc43fc8884 802ac912 .config log report
ci-upstream-kasan-gce 2018/04/16 09:00 upstream 71b8ebbf3d7b 7a67784c .config log report
ci-upstream-kasan-gce 2018/04/15 09:44 upstream 18b7fd1c93e5 7a67784c .config log report
ci-upstream-kasan-gce 2018/04/15 01:13 upstream 18b7fd1c93e5 7a67784c .config log report
ci-upstream-kasan-gce 2018/04/14 10:33 upstream 1bad9ce155a7 7a67784c .config log report
ci-upstream-kasan-gce 2018/04/14 04:56 upstream 1bad9ce155a7 7a67784c .config log report
ci-upstream-kasan-gce 2018/04/14 01:02 upstream 1bad9ce155a7 7a67784c .config log report
ci-upstream-kasan-gce-root 2018/04/01 10:53 upstream 10b84daddbec 0174c6c8 .config log report
ci-upstream-kasan-gce-root 2018/03/26 18:54 upstream 3eb2ce825ea1 0ca7878b .config log report
ci-upstream-kasan-gce-386 2018/04/01 15:43 upstream 10b84daddbec 0a78e248 .config log report
ci-upstream-kasan-gce-386 2018/03/26 17:18 upstream 3eb2ce825ea1 0ca7878b .config log report
ci-upstream-net-kasan-gce 2018/04/25 03:36 net-next 9c20b9372fba 37e76fe2 .config log report
ci-upstream-net-kasan-gce 2018/04/25 01:57 net-next 9c20b9372fba 37e76fe2 .config log report
ci-upstream-net-kasan-gce 2018/04/24 21:17 net-next 9c20b9372fba 37e76fe2 .config log report
ci-upstream-net-kasan-gce 2018/04/24 18:06 net-next 9c20b9372fba 37e76fe2 .config log report
ci-upstream-net-kasan-gce 2018/04/24 16:06 net-next 9c20b9372fba 2bf86f40 .config log report
ci-upstream-net-kasan-gce 2018/04/24 14:03 net-next 9c20b9372fba 2bf86f40 .config log report
ci-upstream-net-kasan-gce 2018/04/24 12:04 net-next b300fcf883ac e7e85d36 .config log report
ci-upstream-net-kasan-gce 2018/04/24 08:28 net-next b300fcf883ac e7e85d36 .config log report
ci-upstream-net-kasan-gce 2018/04/24 02:23 net-next a56e6bcd34b5 0d8e591c .config log report
ci-upstream-net-kasan-gce 2018/04/24 00:28 net-next a56e6bcd34b5 0d8e591c .config log report
ci-upstream-net-kasan-gce 2018/04/23 22:20 net-next a56e6bcd34b5 0d8e591c .config log report
ci-upstream-net-kasan-gce 2018/04/23 16:05 net-next a56e6bcd34b5 0d8e591c .config log report
ci-upstream-net-kasan-gce 2018/04/23 02:54 net-next 48d7a07ba355 d23fcf6c .config log report
ci-upstream-net-kasan-gce 2018/04/22 22:18 net-next e0ada51db907 d23fcf6c .config log report
ci-upstream-net-kasan-gce 2018/04/21 01:57 net-next cf1a1e07fc8b ca03d688 .config log report
ci-upstream-net-kasan-gce 2018/04/19 21:22 net-next 415787d7799f 3642839c .config log report
ci-upstream-net-kasan-gce 2018/04/13 22:32 net-next 5d1365940a68 7a67784c .config log report
ci-upstream-net-kasan-gce 2018/04/02 19:36 net-next 159f02977b2f 676bd07e .config log report