[moderation] [perf?] KCSAN: data-race in __perf_event_read_value / perf_event_set_state (2)

3 views
Skip to first unread message

syzbot

unread,
Oct 19, 2024, 8:41:34 AM10/19/24
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3d5ad2d4eca3 Merge tag 'bpf-fixes' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14044430580000
kernel config: https://syzkaller.appspot.com/x/.config?x=fd83253b74c9c570
dashboard link: https://syzkaller.appspot.com/bug?extid=bbc432eb1c7b22f9e855
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ac...@kernel.org adrian...@intel.com alexander...@linux.intel.com iro...@google.com jo...@kernel.org kan....@linux.intel.com linux-...@vger.kernel.org linux-pe...@vger.kernel.org mark.r...@arm.com mi...@redhat.com namh...@kernel.org pet...@infradead.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9d112e37e26b/disk-3d5ad2d4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d8f036bdcdb7/vmlinux-3d5ad2d4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/61727d52db48/bzImage-3d5ad2d4.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+bbc432...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __perf_event_read_value / perf_event_set_state

write to 0xffff88810485f4e8 of 8 bytes by task 8299 on cpu 0:
perf_event_update_time kernel/events/core.c:675 [inline]
perf_event_set_state+0x1a1/0x3f0 kernel/events/core.c:694
event_sched_out+0x2c8/0x4a0 kernel/events/core.c:2335
group_sched_out kernel/events/core.c:2359 [inline]
__pmu_ctx_sched_out+0x3aa/0x4e0 kernel/events/core.c:3339
ctx_sched_out+0x267/0x2c0 kernel/events/core.c:3420
task_ctx_sched_out kernel/events/core.c:2739 [inline]
perf_event_context_sched_out kernel/events/core.c:3664 [inline]
__perf_event_task_sched_out+0x411/0xfe0 kernel/events/core.c:3763
perf_event_task_sched_out include/linux/perf_event.h:1519 [inline]
prepare_task_switch kernel/sched/core.c:5126 [inline]
context_switch kernel/sched/core.c:5269 [inline]
__schedule+0x931/0x940 kernel/sched/core.c:6682
__schedule_loop kernel/sched/core.c:6759 [inline]
schedule+0x55/0xc0 kernel/sched/core.c:6774
futex_wait_queue kernel/futex/waitwake.c:370 [inline]
__futex_wait+0x141/0x290 kernel/futex/waitwake.c:669
futex_wait+0x99/0x1c0 kernel/futex/waitwake.c:697
do_futex+0x276/0x370 kernel/futex/syscalls.c:102
__do_sys_futex kernel/futex/syscalls.c:179 [inline]
__se_sys_futex+0x25d/0x3a0 kernel/futex/syscalls.c:160
__x64_sys_futex+0x78/0x90 kernel/futex/syscalls.c:160
x64_sys_call+0x23c4/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:203
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810485f4e8 of 8 bytes by task 8322 on cpu 1:
__perf_event_read_value+0xba/0x1c0 kernel/events/core.c:5608
perf_read_one kernel/events/core.c:5763 [inline]
__perf_read kernel/events/core.c:5816 [inline]
perf_read+0x174/0x4a0 kernel/events/core.c:5833
loop_rw_iter+0x237/0x360
io_iter_do_read io_uring/rw.c:773 [inline]
__io_read+0xa5a/0xaf0 io_uring/rw.c:865
io_read+0x1e/0x60 io_uring/rw.c:943
io_issue_sqe+0x150/0xcc0 io_uring/io_uring.c:1739
io_wq_submit_work+0x474/0x5f0 io_uring/io_uring.c:1848
io_worker_handle_work+0x486/0x9d0 io_uring/io-wq.c:601
io_wq_worker+0x286/0x820 io_uring/io-wq.c:655
ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x00000000059b617a -> 0x00000000059b9f48

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 8322 Comm: iou-wrk-8299 Tainted: G W 6.12.0-rc3-syzkaller-00389-g3d5ad2d4eca3 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Nov 23, 2024, 7:41:14 AM11/23/24
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages