bisecting cause commit starting from 3a62c333497b164868fdcd241842a1dd4e331825 building syzkaller on b599f2fcc734e2183016a340d4f6fc2891d8e41f testing commit 3a62c333497b164868fdcd241842a1dd4e331825 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: 734dfd5396631a138bf4f845501f325288c9ffbb5bc0b66ac9b9b5ed3c87b049 run #0: crashed: BUG: please report to dccp@vger.kernel.org => prev = NUM, last = NUM at net/dccp/ccids/lib/packet_history.c:LINE/tfrc_rx run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK reproducer seems to be flaky testing release v5.13 testing commit 62fb9874f5da54fdb243003b386128037319b219 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: 909f5b513362d755e99068620c19525cb2afd91ca8725228219fd46574a48866 all runs: OK # git bisect start 3a62c333497b164868fdcd241842a1dd4e331825 62fb9874f5da54fdb243003b386128037319b219 Bisecting: 8578 revisions left to test after this (roughly 13 steps) [9f7b640f001f9781e0803fb60e7b3e7f2f1a1757] Merge tag 'xfs-5.14-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux testing commit 9f7b640f001f9781e0803fb60e7b3e7f2f1a1757 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: 7443be28a8398b0b57413616c11ec58accdc10292b2353a0ca89ea15d82941e9 run #0: basic kernel testing failed: BUG: sleeping function called from invalid context in stack_depot_save run #1: crashed: BUG: sleeping function called from invalid context in lock_sock_nested run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 9f7b640f001f9781e0803fb60e7b3e7f2f1a1757 Bisecting: 3074 revisions left to test after this (roughly 12 steps) [dbe69e43372212527abf48609aba7fc39a6daa27] Merge tag 'net-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next testing commit dbe69e43372212527abf48609aba7fc39a6daa27 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: cdbd29145174428b2b5610140a48ffd76475909eeac26e8ac8d3b85e9b83150a all runs: OK # git bisect good dbe69e43372212527abf48609aba7fc39a6daa27 Bisecting: 1511 revisions left to test after this (roughly 11 steps) [334200bf52f0637a5ab8331c557dfcecbb9c30fa] Merge tag 'drm-msm-next-2021-06-23b' of https://gitlab.freedesktop.org/drm/msm into drm-next testing commit 334200bf52f0637a5ab8331c557dfcecbb9c30fa compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: f6ea27f1196e7cdbf1f45138e46e1651c643cbd969bc8f8ce62ed6c86fba88d5 all runs: OK # git bisect good 334200bf52f0637a5ab8331c557dfcecbb9c30fa Bisecting: 794 revisions left to test after this (roughly 10 steps) [3dbdb38e286903ec220aaf1fb29a8d94297da246] Merge branch 'for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup testing commit 3dbdb38e286903ec220aaf1fb29a8d94297da246 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: abb8c8a0b0816e12045e5d2a50771c1965399aa7bea1c11105ab9b641088b2e6 all runs: OK # git bisect good 3dbdb38e286903ec220aaf1fb29a8d94297da246 Bisecting: 461 revisions left to test after this (roughly 9 steps) [4cad67197989c81417810b89f09a3549b75a2441] Merge tag 'asm-generic-unaligned-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic testing commit 4cad67197989c81417810b89f09a3549b75a2441 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: cf09d3998b802fb57cc6c3d0e822935d55bbb2bf2f0d67e4b94ed7fe9a12a60a run #0: crashed: BUG: please report to dccp@vger.kernel.org => prev = NUM, last = NUM at net/dccp/ccids/lib/packet_history.c:LINE/tfrc_rx run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 4cad67197989c81417810b89f09a3549b75a2441 Bisecting: 166 revisions left to test after this (roughly 7 steps) [ad65dcef3a87c24d6c6156eae5e7b47311d6e3cf] lib: uninline simple_strtoull() testing commit ad65dcef3a87c24d6c6156eae5e7b47311d6e3cf compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: fdfd77961d9d2554014d585b434ab4c93807710ac32df4d798467cc7335b9a04 all runs: OK # git bisect good ad65dcef3a87c24d6c6156eae5e7b47311d6e3cf Bisecting: 83 revisions left to test after this (roughly 6 steps) [1fcc57b7e51e4366f074c7d186ccc6c99a627a51] perf evsel: Adjust hybrid event and global event mixed group testing commit 1fcc57b7e51e4366f074c7d186ccc6c99a627a51 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: 8f2ef96c1e0fd9be1f8c6383b0d77f4fd900496d73ced58933cb980cee0befee all runs: OK # git bisect good 1fcc57b7e51e4366f074c7d186ccc6c99a627a51 Bisecting: 41 revisions left to test after this (roughly 5 steps) [ec4c00fedbf3e713776d2776e88a7e4bc61b7efc] perf dlfilter: Add object_code() to perf_dlfilter_fns testing commit ec4c00fedbf3e713776d2776e88a7e4bc61b7efc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: d37708f029a203cc131d63dbcc638036ccdd89fcde8ec594add8cfd82bfe10fc run #0: basic kernel testing failed: BUG: sleeping function called from invalid context in stack_depot_save run #1: basic kernel testing failed: possible deadlock in fs_reclaim_acquire run #2: crashed: BUG: sleeping function called from invalid context in lock_sock_nested run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad ec4c00fedbf3e713776d2776e88a7e4bc61b7efc Bisecting: 20 revisions left to test after this (roughly 4 steps) [630519014c7b5abc544d93e07ad6e9328098bf68] perf arm-spe: Convert event kernel time to counter value testing commit 630519014c7b5abc544d93e07ad6e9328098bf68 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: d37708f029a203cc131d63dbcc638036ccdd89fcde8ec594add8cfd82bfe10fc all runs: OK # git bisect good 630519014c7b5abc544d93e07ad6e9328098bf68 Bisecting: 10 revisions left to test after this (roughly 3 steps) [0323dea3185a5ca347a5add7cae56ad37465338d] perf cs-etm: Delay decode of non-timeless data until cs_etm__flush_events() testing commit 0323dea3185a5ca347a5add7cae56ad37465338d compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: d37708f029a203cc131d63dbcc638036ccdd89fcde8ec594add8cfd82bfe10fc run #0: crashed: BUG: sleeping function called from invalid context in lock_sock_nested run #1: crashed: BUG: sleeping function called from invalid context in lock_sock_nested run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 0323dea3185a5ca347a5add7cae56ad37465338d Bisecting: 4 revisions left to test after this (roughly 2 steps) [14c6ef2b559688e04bec376e0778d9484dc9bd4d] tools include UAPI: Update linux/mount.h copy testing commit 14c6ef2b559688e04bec376e0778d9484dc9bd4d compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: d37708f029a203cc131d63dbcc638036ccdd89fcde8ec594add8cfd82bfe10fc run #0: basic kernel testing failed: BUG: sleeping function called from invalid context in stack_depot_save run #1: basic kernel testing failed: possible deadlock in fs_reclaim_acquire run #2: crashed: BUG: sleeping function called from invalid context in lock_sock_nested run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad 14c6ef2b559688e04bec376e0778d9484dc9bd4d Bisecting: 2 revisions left to test after this (roughly 1 step) [afb5e9e47faf53e0f557e22979076dc1a94ef3d7] perf arm-spe: Bail out if the trace is later than perf event testing commit afb5e9e47faf53e0f557e22979076dc1a94ef3d7 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: d37708f029a203cc131d63dbcc638036ccdd89fcde8ec594add8cfd82bfe10fc run #0: crashed: BUG: sleeping function called from invalid context in lock_sock_nested run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect bad afb5e9e47faf53e0f557e22979076dc1a94ef3d7 Bisecting: 0 revisions left to test after this (roughly 0 steps) [85498f756f015e3ae89dbe0c94480ad76929752a] perf arm-spe: Assign kernel time to synthesized event testing commit 85498f756f015e3ae89dbe0c94480ad76929752a compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: d37708f029a203cc131d63dbcc638036ccdd89fcde8ec594add8cfd82bfe10fc run #0: basic kernel testing failed: possible deadlock in fs_reclaim_acquire run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK # git bisect good 85498f756f015e3ae89dbe0c94480ad76929752a afb5e9e47faf53e0f557e22979076dc1a94ef3d7 is the first bad commit commit afb5e9e47faf53e0f557e22979076dc1a94ef3d7 Author: Leo Yan Date: Wed May 19 15:19:38 2021 +0800 perf arm-spe: Bail out if the trace is later than perf event It's possible that record in Arm SPE trace is later than perf event and vice versa. This asks to correlate the perf events and Arm SPE synthesized events to be processed in the manner of correct timing. To achieve the time ordering, this patch reverses the flow, it firstly calls arm_spe_sample() and then calls arm_spe_decode(). By comparing the timestamp value and detect the perf event is coming earlier than Arm SPE trace data, it bails out from the decoding loop, the last record is pushed into auxtrace stack and is deferred to generate sample. To track the timestamp, everytime it updates timestamp for the latest record. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Dave Martin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210519071939.1598923-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/arm-spe.c | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) culprit signature: d37708f029a203cc131d63dbcc638036ccdd89fcde8ec594add8cfd82bfe10fc parent signature: d37708f029a203cc131d63dbcc638036ccdd89fcde8ec594add8cfd82bfe10fc Reproducer flagged being flaky revisions tested: 15, total time: 4h9m35.866687506s (build: 1h50m42.529121329s, test: 2h17m9.95320401s) first bad commit: afb5e9e47faf53e0f557e22979076dc1a94ef3d7 perf arm-spe: Bail out if the trace is later than perf event recipients (to): ["acme@redhat.com" "james.clark@arm.com" "leo.yan@linaro.org"] recipients (cc): [] crash: BUG: sleeping function called from invalid context in lock_sock_nested BUG: sleeping function called from invalid context at net/core/sock.c:3064 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 8834, name: syz-executor.4 1 lock held by syz-executor.4/8834: #0: ffffffff8c1f0980 (hci_sk_list.lock){++++}-{2:2}, at: hci_sock_dev_event+0x374/0x5c0 net/bluetooth/hci_sock.c:763 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 8834 Comm: syz-executor.4 Not tainted 5.13.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:96 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:9153 lock_sock_nested+0x1e/0xf0 net/core/sock.c:3064 lock_sock include/net/sock.h:1610 [inline] hci_sock_dev_event+0x3ea/0x5c0 net/bluetooth/hci_sock.c:765 hci_unregister_dev+0x29b/0xfb0 net/bluetooth/hci_core.c:4013 vhci_release+0x62/0xd0 drivers/bluetooth/hci_vhci.c:340 __fput+0x209/0x870 fs/file_table.c:280 task_work_run+0xc0/0x160 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0x9fe/0x24e0 kernel/exit.c:825 do_group_exit+0xe7/0x290 kernel/exit.c:922 __do_sys_exit_group kernel/exit.c:933 [inline] __se_sys_exit_group kernel/exit.c:931 [inline] __x64_sys_exit_group+0x35/0x40 kernel/exit.c:931 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+0x44/0xae RIP: 0033:0x4665e9 Code: Unable to access opcode bytes at RIP 0x4665bf. RSP: 002b:00007ffef746acc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007ffef746b488 RCX: 00000000004665e9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000043 RBP: 0000000000000000 R08: 0000000000000025 R09: 00007ffef746b488 R10: 00000000ffffffff R11: 0000000000000246 R12: 00000000004bef74 R13: 0000000000000010 R14: 0000000000000000 R15: 0000000000400538 ======================================================