syzbot


KCSAN: data-race in attach_to_pi_owner / futex_wait_queue_me

Status: closed as invalid on 2019/11/19 13:54
Subsystems: kasan
[Documentation on labels]
First crash: 1603d, last: 1603d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in attach_to_pi_owner / futex_wait_queue_me (4) kernel 3 1342d 1374d 0/26 auto-closed as invalid on 2020/08/28 22:57
upstream KCSAN: data-race in attach_to_pi_owner / futex_wait_queue_me (2) kernel 2 1574d 1575d 0/26 auto-closed as invalid on 2020/02/14 17:46
upstream KCSAN: data-race in attach_to_pi_owner / futex_wait_queue_me (3) kernel 3 1443d 1501d 0/26 auto-closed as invalid on 2020/06/18 14:03
upstream KCSAN: data-race in attach_to_pi_owner / futex_wait_queue_me (5) kernel 1 1251d 1251d 0/26 auto-closed as invalid on 2020/11/28 10:56
upstream KCSAN: data-race in attach_to_pi_owner / futex_wait_queue_me (6) kernel 1 1197d 1197d 0/26 auto-closed as invalid on 2021/01/21 10:32
upstream KCSAN: data-race in attach_to_pi_owner / futex_wait_queue_me (7) kernel 1 1056d 1056d 0/26 auto-closed as invalid on 2021/06/11 04:30

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

write to 0xffff888121bac064 of 4 bytes by task 13253 on cpu 1:
 freezer_count include/linux/freezer.h:121 [inline]
 freezable_schedule include/linux/freezer.h:173 [inline]
 futex_wait_queue_me+0x1a2/0x290 kernel/futex.c:2627
 futex_wait_requeue_pi.constprop.0+0x2d0/0xa10 kernel/futex.c:3265
 do_futex+0x1cc/0x18d0 kernel/futex.c:3664
 __do_sys_futex kernel/futex.c:3705 [inline]
 __se_sys_futex kernel/futex.c:3673 [inline]
 __x64_sys_futex+0x2cd/0x3f0 kernel/futex.c:3673
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888121bac064 of 4 bytes by task 13294 on cpu 0:
 attach_to_pi_owner+0x83/0x420 kernel/futex.c:1250
 lookup_pi_state kernel/futex.c:1325 [inline]
 futex_requeue+0xfb9/0x12d0 kernel/futex.c:2069
 do_futex+0x2f7/0x18d0 kernel/futex.c:3667
 __do_sys_futex kernel/futex.c:3705 [inline]
 __se_sys_futex kernel/futex.c:3673 [inline]
 __x64_sys_futex+0x2cd/0x3f0 kernel/futex.c:3673
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 13294 Comm: syz-executor.0 Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 13294 Comm: syz-executor.0 Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0xf5/0x159 lib/dump_stack.c:113
 panic+0x210/0x640 kernel/panic.c:221
 kcsan_report.cold+0xc/0xe kernel/kcsan/report.c:302
 kcsan_setup_watchpoint+0x3fe/0x410 kernel/kcsan/core.c:357
 check_access kernel/kcsan/core.c:409 [inline]
 __tsan_read4+0x145/0x1f0 kernel/kcsan/core.c:529
 attach_to_pi_owner+0x83/0x420 kernel/futex.c:1250
 lookup_pi_state kernel/futex.c:1325 [inline]
 futex_requeue+0xfb9/0x12d0 kernel/futex.c:2069
 do_futex+0x2f7/0x18d0 kernel/futex.c:3667
 __do_sys_futex kernel/futex.c:3705 [inline]
 __se_sys_futex kernel/futex.c:3673 [inline]
 __x64_sys_futex+0x2cd/0x3f0 kernel/futex.c:3673
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45a219
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f593b306c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 000000000045a219
RDX: 0000000000000001 RSI: 000000000000000c RDI: 000000002000cffc
RBP: 000000000075bfc8 R08: 0000000020048000 R09: 0000000000000000
R10: 0000000020000a00 R11: 0000000000000246 R12: 00007f593b3076d4
R13: 00000000004c0ea5 R14: 00000000004d3ca0 R15: 00000000ffffffff
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/07 02:26 https://github.com/google/ktsan.git kcsan 94c006602e13 da505f84 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.