syzbot


KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event

Status: moderation: reported on 2023/12/10 00:06
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+994f06249d6c05d7376d@syzkaller.appspotmail.com
First crash: 116d, last: 6d11h

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

write to 0xffffffff8611edf0 of 4 bytes by interrupt on cpu 1:
 tick_sched_do_timer kernel/time/tick-sched.c:205 [inline]
 tick_nohz_highres_handler+0x2ad/0x2c0 kernel/time/tick-sched.c:1512
 __run_hrtimer kernel/time/hrtimer.c:1689 [inline]
 __hrtimer_run_queues+0x210/0x5d0 kernel/time/hrtimer.c:1753
 hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1815
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline]
 __sysvec_apic_timer_interrupt+0x52/0x190 arch/x86/kernel/apic/apic.c:1082
 sysvec_apic_timer_interrupt+0x6a/0x80 arch/x86/kernel/apic/apic.c:1076
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649
 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+0x20/0x30 drivers/acpi/processor_idle.c:112
 acpi_idle_do_entry+0x19/0x30 drivers/acpi/processor_idle.c:573
 acpi_idle_enter+0x96/0xb0 drivers/acpi/processor_idle.c:707
 cpuidle_enter_state+0xd1/0x270 drivers/cpuidle/cpuidle.c:267
 cpuidle_enter+0x40/0x60 drivers/cpuidle/cpuidle.c:388
 call_cpuidle kernel/sched/idle.c:134 [inline]
 cpuidle_idle_call kernel/sched/idle.c:215 [inline]
 do_idle+0x194/0x230 kernel/sched/idle.c:312
 cpu_startup_entry+0x24/0x30 kernel/sched/idle.c:410
 start_secondary+0x82/0x90 arch/x86/kernel/smpboot.c:336
 secondary_startup_64_no_verify+0x15f/0x16b

read to 0xffffffff8611edf0 of 4 bytes by task 0 on cpu 0:
 tick_nohz_next_event+0x1f1/0x2d0 kernel/time/tick-sched.c:873
 tick_nohz_get_sleep_length+0x134/0x2c0 kernel/time/tick-sched.c:1264
 menu_select+0x81a/0x1060 drivers/cpuidle/governors/menu.c:286
 cpuidle_select+0x41/0x50 drivers/cpuidle/cpuidle.c:359
 cpuidle_idle_call kernel/sched/idle.c:208 [inline]
 do_idle+0x160/0x230 kernel/sched/idle.c:312
 cpu_startup_entry+0x24/0x30 kernel/sched/idle.c:410
 rest_init+0xf3/0x100 init/main.c:730
 arch_call_rest_init+0x9/0x10 init/main.c:827
 start_kernel+0x57d/0x5e0 init/main.c:1072
 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:555
 x86_64_start_kernel+0x94/0xa0 arch/x86/kernel/head64.c:536
 secondary_startup_64_no_verify+0x15f/0x16b

value changed: 0xffffffff -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.8.0-rc5-syzkaller-00297-gf2e367d6ad3b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/24 19:25 upstream f2e367d6ad3b 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2024/02/21 03:36 upstream fca7526b7d89 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2024/01/20 19:21 upstream 125514880ddd 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2024/01/17 23:01 upstream 1b1934dbbdcf 915053c7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2024/01/11 14:50 upstream de927f6c0b07 00f3cc59 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2023/12/18 05:01 upstream 0e389834672c 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2023/12/10 11:16 upstream c527f5606aa5 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2023/12/08 22:05 upstream 5e3f5b81de80 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2023/12/03 21:54 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2023/11/25 18:08 upstream b46ae77f6787 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2023/11/15 15:14 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
2023/11/07 05:10 upstream be3ca57cfb77 83211397 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tick_nohz_highres_handler / tick_nohz_next_event
* Struck through repros no longer work on HEAD.