syzbot


KCSAN: data-race in tick_nohz_handler / tick_nohz_handler

Status: moderation: reported on 2024/03/12 20:04
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+6ba4d2cbe64c744dd151@syzkaller.appspotmail.com
First crash: 35d, last: 7d04h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in tick_nohz_handler / tick_nohz_handler

write to 0xffffffff865332f0 of 4 bytes by interrupt on cpu 1:
 tick_sched_do_timer kernel/time/tick-sched.c:224 [inline]
 tick_nohz_handler+0x2bc/0x2d0 kernel/time/tick-sched.c:287
 __run_hrtimer kernel/time/hrtimer.c:1692 [inline]
 __hrtimer_run_queues+0x214/0x5e0 kernel/time/hrtimer.c:1756
 hrtimer_interrupt+0x210/0x7b0 kernel/time/hrtimer.c:1818
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
 __sysvec_apic_timer_interrupt+0x5c/0x1a0 arch/x86/kernel/apic/apic.c:1049
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
 sysvec_apic_timer_interrupt+0x6e/0x80 arch/x86/kernel/apic/apic.c:1043
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:86 [inline]
 acpi_safe_halt+0x21/0x30 drivers/acpi/processor_idle.c:112
 acpi_idle_do_entry+0x1d/0x30 drivers/acpi/processor_idle.c:573
 acpi_idle_enter+0x96/0xb0 drivers/acpi/processor_idle.c:707
 cpuidle_enter_state+0xcf/0x270 drivers/cpuidle/cpuidle.c:267
 cpuidle_enter+0x40/0x70 drivers/cpuidle/cpuidle.c:388
 call_cpuidle kernel/sched/idle.c:155 [inline]
 cpuidle_idle_call kernel/sched/idle.c:236 [inline]
 do_idle+0x195/0x230 kernel/sched/idle.c:332
 cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:430
 start_secondary+0x94/0xa0 arch/x86/kernel/smpboot.c:313
 common_startup_64+0x12c/0x137

read to 0xffffffff865332f0 of 4 bytes by interrupt on cpu 0:
 tick_sched_do_timer kernel/time/tick-sched.c:220 [inline]
 tick_nohz_handler+0x3d/0x2d0 kernel/time/tick-sched.c:287
 __run_hrtimer kernel/time/hrtimer.c:1692 [inline]
 __hrtimer_run_queues+0x214/0x5e0 kernel/time/hrtimer.c:1756
 hrtimer_interrupt+0x210/0x7b0 kernel/time/hrtimer.c:1818
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
 __sysvec_apic_timer_interrupt+0x5c/0x1a0 arch/x86/kernel/apic/apic.c:1049
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
 sysvec_apic_timer_interrupt+0x6e/0x80 arch/x86/kernel/apic/apic.c:1043
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:86 [inline]
 acpi_safe_halt+0x21/0x30 drivers/acpi/processor_idle.c:112
 acpi_idle_do_entry+0x1d/0x30 drivers/acpi/processor_idle.c:573
 acpi_idle_enter+0x96/0xb0 drivers/acpi/processor_idle.c:707
 cpuidle_enter_state+0xcf/0x270 drivers/cpuidle/cpuidle.c:267
 cpuidle_enter+0x40/0x70 drivers/cpuidle/cpuidle.c:388
 call_cpuidle kernel/sched/idle.c:155 [inline]
 cpuidle_idle_call kernel/sched/idle.c:236 [inline]
 do_idle+0x195/0x230 kernel/sched/idle.c:332
 cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:430
 rest_init+0xef/0xf0 init/main.c:732
 start_kernel+0x57c/0x5e0 init/main.c:1074
 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507
 x86_64_start_kernel+0x94/0xa0 arch/x86/kernel/head64.c:488
 common_startup_64+0x12c/0x137

value changed: 0xffffffff -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W          6.9.0-rc3-syzkaller-00011-g20cb38a7af88 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/09 16:02 upstream 20cb38a7af88 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/04/06 22:32 upstream f2f80ac80987 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/26 06:32 upstream 928a87efa423 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/25 11:05 upstream 4cece7649650 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/23 19:42 upstream 484193fecd2b 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/23 04:03 upstream bfa8f18691ed 4b6cdce6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/20 15:42 upstream a4145ce1e7bc 5b7d42ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/19 12:02 upstream b3603fcb79b1 e104824c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/17 04:32 upstream 741e9d668aa5 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/13 22:34 upstream 61387b8dcf1d f919f202 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
2024/03/12 20:03 upstream 855684c7d938 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_handler / tick_nohz_handler
* Struck through repros no longer work on HEAD.