bisecting fixing commit since aec3002d07fd2564cd32e56f126fa6db14a168bb
building syzkaller on 907bf74686129436f81aa40336ee89f7cc01b0b4
testing commit aec3002d07fd2564cd32e56f126fa6db14a168bb
compiler: gcc version 8.4.1 20210217 (GCC)
kernel signature: 6eb8eeaedb68e9397b47190d3dd8befb619e9b9853f2fe717e8c30ae9c1c2ff6
all runs: crashed: WARNING in perf_group_attach
testing current HEAD 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1
testing commit 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1
compiler: gcc version 8.4.1 20210217 (GCC)
kernel signature: e95eea07eccf8eebd3c0d34abb2e352bb9741113757a2f0eaed572b36e73136e
all runs: crashed: WARNING in perf_group_attach
revisions tested: 2, total time: 31m55.30891462s (build: 24m38.570065225s, test: 6m24.445794969s)
the crash still happens on HEAD
commit msg: Linux 4.19.204
crash: WARNING in perf_group_attach
IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready
8021q: adding VLAN 0 to HW filter on device batadv0
WARNING: CPU: 0 PID: 7100 at kernel/events/core.c:1840 perf_group_attach+0x3b1/0x470 kernel/events/core.c:1832
Modules linked in:
CPU: 0 PID: 7100 Comm: syz-executor.1 Not tainted 4.19.204-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:perf_group_attach+0x3b1/0x470 kernel/events/core.c:1840
Code: ec 10 4c 39 e3 75 d7 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 0e 59 1d 00 e9 c8 fc ff ff e8 04 59 1d 00 e9 fe fc ff ff <0f> 0b e9 75 fd ff ff e8 13 59 1d 00 eb c1 e8 0c 59 1d 00 e9 6d fc
RSP: 0000:ffff8881f6807ec0 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: ffff8881d9e52b40 RCX: 1ffff1103b3ca692
RDX: 1ffff1103b3ca6bb RSI: ffff8881f6831460 RDI: ffff8881d9e535d8
RBP: ffff8881f6807ef0 R08: ffffffff890a7018 R09: 0000000000000006
R10: fffffbfff1214e01 R11: 0000000000000001 R12: ffff8881d9e533c0
R13: ffffe8ffffc11bd0 R14: 0000000000000000 R15: ffff8881f6831448
FS: 00007fadff2a1700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b826de5700 CR3: 00000001dbba4005 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 000000000011060a
Call Trace:
add_event_to_ctx kernel/events/core.c:2399 [inline]
__perf_install_in_context+0x3f6/0x880 kernel/events/core.c:2540
remote_function kernel/events/core.c:87 [inline]
remote_function+0xff/0x180 kernel/events/core.c:67
flush_smp_call_function_queue+0x10e/0x3d0 kernel/smp.c:243
generic_smp_call_function_single_interrupt+0xe/0x20 kernel/smp.c:192
smp_call_function_single_interrupt+0xa0/0x440 arch/x86/kernel/smp.c:304
call_function_single_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:916
RIP: 0033:0x460c99
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fadff2a1218 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff04
RAX: 0000000000000001 RBX: 000000000052bfb0 RCX: 0000000000460c99
RDX: 00000000004b2232 RSI: 0000000000000081 RDI: 000000000052bfb4
RBP: 000000000052bfa8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000246 R12: 000000000052bfb4
R13: 00007ffffac3460f R14: 00007fadff2a1300 R15: 0000000000022000
irq event stamp: 112
hardirqs last enabled at (111): [] trace_hardirqs_on_thunk+0x1a/0x1c
hardirqs last disabled at (112): [] trace_hardirqs_off_thunk+0x1a/0x1c
softirqs last enabled at (0): [] copy_process.part.34+0x179c/0x76d0 kernel/fork.c:1855
softirqs last disabled at (0): [<0000000000000000>] (null)
---[ end trace 6473b8eaa51023b2 ]---
WARNING: CPU: 0 PID: 3051 at kernel/events/core.c:1999 INIT_LIST_HEAD include/linux/list.h:29 [inline]
WARNING: CPU: 0 PID: 3051 at kernel/events/core.c:1999 list_del_init include/linux/list.h:160 [inline]
WARNING: CPU: 0 PID: 3051 at kernel/events/core.c:1999 perf_event_ctx_deactivate kernel/events/core.c:1175 [inline]
WARNING: CPU: 0 PID: 3051 at kernel/events/core.c:1999 event_sched_out.isra.99+0x69b/0x970 kernel/events/core.c:2026
Modules linked in:
CPU: 0 PID: 3051 Comm: kworker/0:2 Tainted: G W 4.19.204-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_power_efficient gc_worker
RIP: 0010:event_sched_out.isra.99+0x69b/0x970 kernel/events/core.c:1999
Code: 89 9d c0 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 5d 02 00 00 49 89 9d c8 00 00 00 e9 39 fd ff ff <0f> 0b e9 ac f9 ff ff 65 48 8b 1c 25 40 ee 01 00 48 8d bb 84 08 00
RSP: 0000:ffff8881f6807dd8 EFLAGS: 00010083
RAX: dffffc0000000000 RBX: ffff8881d9e52b40 RCX: ffffe8ffffc11bd0
RDX: 1ffff1103b3ca6bb RSI: ffffe8ffffc11d68 RDI: ffff8881d9e535d8
RBP: ffff8881f6807e28 R08: ffffed103b3ca5a4 R09: 1ffff1103ed050a1
R10: ffffed103b3ca5a3 R11: ffff8881d9e52d1f R12: ffffe8ffffc11bd0
R13: ffffe8ffffc11bd0 R14: ffff8881d9e533c0 R15: ffff8881d9e533c0
FS: 0000000000000000(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb2ad3eb000 CR3: 000000000806d004 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 000000000011060a
Call Trace:
group_sched_out.part.100+0x17b/0x1f0 kernel/events/core.c:2053
group_sched_out kernel/events/core.c:2042 [inline]
ctx_sched_out+0x6a0/0x980 kernel/events/core.c:2964
cpu_ctx_sched_out kernel/events/core.c:3254 [inline]
ctx_resched+0xc4/0xe0 kernel/events/core.c:2479
__perf_install_in_context+0x40d/0x880 kernel/events/core.c:2541
remote_function kernel/events/core.c:87 [inline]
remote_function+0xff/0x180 kernel/events/core.c:67
flush_smp_call_function_queue+0x10e/0x3d0 kernel/smp.c:243
generic_smp_call_function_single_interrupt+0xe/0x20 kernel/smp.c:192
smp_call_function_single_interrupt+0xa0/0x440 arch/x86/kernel/smp.c:304
call_function_single_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:916
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline]
RIP: 0010:seqcount_lockdep_reader_access include/linux/seqlock.h:83 [inline]
RIP: 0010:read_seqcount_begin include/linux/seqlock.h:164 [inline]
RIP: 0010:nf_conntrack_get_ht include/net/netfilter/nf_conntrack.h:302 [inline]
RIP: 0010:gc_worker+0x788/0xbb0 net/netfilter/nf_conntrack_core.c:1225
Code: c7 88 01 12 88 48 89 f8 48 c1 e8 03 42 80 3c 28 00 0f 85 c7 03 00 00 48 83 3d 9b 8b df 02 00 0f 84 1d 01 00 00 48 89 df 57 9d <0f> 1f 44 00 00 e9 db fa ff ff e8 e9 d4 1e fc 84 c0 0f 85 fb f9 ff
RSP: 0000:ffff8881e6687c78 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff04
RAX: 1ffffffff1024031 RBX: 0000000000000286 RCX: 1ffff1103ccbcd1a
RDX: 0000000000000000 RSI: ffff8881e65e68d8 RDI: 0000000000000286
RBP: ffff8881e6687d58 R08: ffff8881e65e68d0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: fffffbfff1024032
R13: dffffc0000000000 R14: 0000000000005c29 R15: 0000000000005c29
process_one_work+0x830/0x1670 kernel/workqueue.c:2153
worker_thread+0x85/0xb60 kernel/workqueue.c:2296
kthread+0x347/0x410 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
irq event stamp: 345758
hardirqs last enabled at (345757): [] seqcount_lockdep_reader_access include/linux/seqlock.h:83 [inline]
hardirqs last enabled at (345757): [] read_seqcount_begin include/linux/seqlock.h:164 [inline]
hardirqs last enabled at (345757): [] nf_conntrack_get_ht include/net/netfilter/nf_conntrack.h:302 [inline]
hardirqs last enabled at (345757): [] gc_worker+0x75c/0xbb0 net/netfilter/nf_conntrack_core.c:1225
hardirqs last disabled at (345758): [] trace_hardirqs_off_thunk+0x1a/0x1c
softirqs last enabled at (343900): [] spin_unlock_bh include/linux/spinlock.h:374 [inline]
softirqs last enabled at (343900): [] __nf_nat_cleanup_conntrack+0x12c/0x190 net/netfilter/nf_nat_core.c:647
softirqs last disabled at (343898): [] spin_lock_bh include/linux/spinlock.h:334 [inline]
softirqs last disabled at (343898): [] __nf_nat_cleanup_conntrack+0x5f/0x190 net/netfilter/nf_nat_core.c:645
---[ end trace 6473b8eaa51023b3 ]---
WARNING: CPU: 0 PID: 7092 at kernel/events/core.c:1943 perf_group_detach+0x65f/0x970 kernel/events/core.c:1900
Modules linked in:
CPU: 0 PID: 7092 Comm: syz-executor.1 Tainted: G W 4.19.204-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:perf_group_detach+0x65f/0x970 kernel/events/core.c:1943
Code: b8 be ff ff ff ff 48 8d 78 20 e8 5c 4d d7 ff 85 c0 0f 85 38 fa ff ff 48 c7 c7 20 fd f0 86 e8 60 0b ff 04 0f 0b e9 25 fa ff ff <0f> 0b e9 62 fb ff ff 49 8d 7c 24 10 48 b8 00 00 00 00 00 fc ff df
RSP: 0018:ffff8881d94b76c0 EFLAGS: 00010083
RAX: ffffed103b3ca5ab RBX: ffff8881d9e533c0 RCX: ffffe8ffffc11bd0
RDX: ffffe8ffffc11ce0 RSI: ffff8881dc780ae0 RDI: ffff8881d9e535d8
RBP: ffff8881d94b7738 R08: 0000000000000000 R09: ffff8881dc780ae0
R10: ffff8881d9e533e0 R11: ffffe8ffffc11ce8 R12: dffffc0000000000
R13: ffff8881d9e52b40 R14: ffff8881f6831440 R15: ffff8881d9e52b40
FS: 00007fadff2c2700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb2ad3eb000 CR3: 00000001dbba4001 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 000000000111062a
Call Trace:
__perf_remove_from_context+0x1d4/0x440 kernel/events/core.c:2084
event_function+0x2bb/0x3d0 kernel/events/core.c:248
remote_function kernel/events/core.c:87 [inline]
remote_function+0xff/0x180 kernel/events/core.c:67
generic_exec_single+0x1f5/0x390 kernel/smp.c:153
smp_call_function_single+0xe5/0x370 kernel/smp.c:299
cpu_function_call kernel/events/core.c:147 [inline]
event_function_call+0x35e/0x3c0 kernel/events/core.c:275
perf_remove_from_context+0x85/0x140 kernel/events/core.c:2113
perf_event_release_kernel+0x12c/0xc10 kernel/events/core.c:4607
perf_release+0x32/0x50 kernel/events/core.c:4703
__fput+0x249/0x7f0 fs/file_table.c:278
____fput+0x9/0x10 fs/file_table.c:309
task_work_run+0x108/0x180 kernel/task_work.c:113
get_signal+0x13a8/0x19e0 kernel/signal.c:2400
do_signal+0x87/0x1960 arch/x86/kernel/signal.c:799
exit_to_usermode_loop+0x114/0x200 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x460c99
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fadff2c21a8 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: 0000000000000005 RBX: 000000000052bf00 RCX: 0000000000460c99
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000000
RBP: 0000000000000005 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000004f43e0 R14: 00000000004b2242 R15: 00007fadff2c26bc
irq event stamp: 412
hardirqs last enabled at (411): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline]
hardirqs last enabled at (411): [] _raw_spin_unlock_irq+0x27/0x80 kernel/locking/spinlock.c:192
hardirqs last disabled at (412): [] generic_exec_single+0x1ef/0x390 kernel/smp.c:152
softirqs last enabled at (350): [] __do_softirq+0x62d/0x919 kernel/softirq.c:318
softirqs last disabled at (311): [] invoke_softirq kernel/softirq.c:372 [inline]
softirqs last disabled at (311): [] irq_exit+0x17f/0x1c0 kernel/softirq.c:412
---[ end trace 6473b8eaa51023b4 ]---
list_add corruption. prev->next should be next (ffffe8ffffc11ce0), but was ffff8881f6831550. (prev=ffff8881f3b274e0).
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:28!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 7099 Comm: syz-executor.2 Tainted: G W 4.19.204-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_add_valid.cold.0+0x23/0x25 lib/list_debug.c:26
Code: c8 ff e9 33 c1 78 fc 48 89 d9 48 c7 c7 c0 65 1f 87 e8 c4 6e fa ff 0f 0b 48 89 f1 48 c7 c7 80 66 1f 87 48 89 de e8 b0 6e fa ff <0f> 0b 4c 89 e2 48 89 de 48 c7 c7 c0 67 1f 87 e8 9c 6e fa ff 0f 0b
RSP: 0018:ffff8881ddd4f698 EFLAGS: 00010082
RAX: 0000000000000075 RBX: ffffe8ffffc11ce0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff871f64c0 RDI: ffffffff89c866e0
RBP: ffff8881ddd4f6b0 R08: ffffed103ed05079 R09: ffffed103ed05078
R10: ffffed103ed05078 R11: ffff8881f68283c7 R12: ffff8881d9e522e0
R13: ffff8881dc780ac0 R14: ffffe8ffffc11ce0 R15: ffff8881dc780ac0
FS: 00007f248eb12700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb2ad3eb000 CR3: 00000001d74d1002 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000001010622
Call Trace:
__list_add include/linux/list.h:60 [inline]
list_add_tail include/linux/list.h:93 [inline]
perf_group_detach+0x3ff/0x970 kernel/events/core.c:1939
__perf_remove_from_context+0x1d4/0x440 kernel/events/core.c:2084
event_function+0x2bb/0x3d0 kernel/events/core.c:248
remote_function kernel/events/core.c:87 [inline]
remote_function+0xff/0x180 kernel/events/core.c:67
generic_exec_single+0x1f5/0x390 kernel/smp.c:153
smp_call_function_single+0xe5/0x370 kernel/smp.c:299
cpu_function_call kernel/events/core.c:147 [inline]
event_function_call+0x35e/0x3c0 kernel/events/core.c:275
perf_remove_from_context+0x85/0x140 kernel/events/core.c:2113
perf_event_release_kernel+0x12c/0xc10 kernel/events/core.c:4607
perf_release+0x32/0x50 kernel/events/core.c:4703
__fput+0x249/0x7f0 fs/file_table.c:278
____fput+0x9/0x10 fs/file_table.c:309
task_work_run+0x108/0x180 kernel/task_work.c:113
get_signal+0x13a8/0x19e0 kernel/signal.c:2400
do_signal+0x87/0x1960 arch/x86/kernel/signal.c:799
exit_to_usermode_loop+0x114/0x200 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x460c99
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f248eb121a8 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: 0000000000000005 RBX: 000000000052bfa8 RCX: 0000000000460c99
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 00000000200000c0
RBP: 0000000000000005 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000004f43c8 R14: 00000000004b2232 R15: 00007f248eb126bc
Modules linked in:
---[ end trace 6473b8eaa51023b5 ]---
RIP: 0010:__list_add_valid.cold.0+0x23/0x25 lib/list_debug.c:26
Code: c8 ff e9 33 c1 78 fc 48 89 d9 48 c7 c7 c0 65 1f 87 e8 c4 6e fa ff 0f 0b 48 89 f1 48 c7 c7 80 66 1f 87 48 89 de e8 b0 6e fa ff <0f> 0b 4c 89 e2 48 89 de 48 c7 c7 c0 67 1f 87 e8 9c 6e fa ff 0f 0b
RSP: 0018:ffff8881ddd4f698 EFLAGS: 00010082
RAX: 0000000000000075 RBX: ffffe8ffffc11ce0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff871f64c0 RDI: ffffffff89c866e0
RBP: ffff8881ddd4f6b0 R08: ffffed103ed05079 R09: ffffed103ed05078
R10: ffffed103ed05078 R11: ffff8881f68283c7 R12: ffff8881d9e522e0
R13: ffff8881dc780ac0 R14: ffffe8ffffc11ce0 R15: ffff8881dc780ac0
FS: 00007f248eb12700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb2ad3eb000 CR3: 00000001d74d1002 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000001010622
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 88 01 mov %al,(%rcx)
2: 12 88 48 89 f8 48 adc 0x48f88948(%rax),%cl
8: c1 e8 03 shr $0x3,%eax
b: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
10: 0f 85 c7 03 00 00 jne 0x3dd
16: 48 83 3d 9b 8b df 02 cmpq $0x0,0x2df8b9b(%rip) # 0x2df8bb9
1d: 00
1e: 0f 84 1d 01 00 00 je 0x141
24: 48 89 df mov %rbx,%rdi
27: 57 push %rdi
28: 9d popfq
* 29: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction
2e: e9 db fa ff ff jmpq 0xfffffb0e
33: e8 e9 d4 1e fc callq 0xfc1ed521
38: 84 c0 test %al,%al
3a: 0f .byte 0xf
3b: 85 fb test %edi,%ebx
3d: f9 stc
3e: ff .byte 0xff