syzbot


kernel BUG in hpage_collapse_scan_file

Status: fixed on 2023/06/08 14:41
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+9578faa5475acb35fa50@syzkaller.appspotmail.com
Fix commit: 2ce0bdfebc74 mm: khugepaged: fix kernel BUG in hpage_collapse_scan_file()
First crash: 630d, last: 585d
Cause bisection: introduced by (bisect log) [release commit]:
commit 3d7cb6b04c3f3115719235cc6866b10326de34cd
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Jul 31 21:03:01 2022 +0000

  Linux 5.19

Crash: WARNING: ODEBUG bug in netdev_run_todo (log)
Repro: C syz .config
  
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
kernel BUG in collapse_file (2) mm C error 27 577d 700d 0/28 closed as dup on 2023/04/14 15:43
Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2] mm: khugepaged: Fix kernel BUG in hpage_collapse_scan_file 11 (11) 2023/04/18 21:28
[PATCH] mm: khugepaged: Fix kernel BUG in hpage_collapse_scan_file 5 (5) 2023/03/30 00:58
[syzbot] [mm?] kernel BUG in hpage_collapse_scan_file 5 (6) 2023/03/13 22:08
Last patch testing requests (9)
Created Duration User Patch Repo Result
2023/04/17 13:54 13m ivan.orlov0322@gmail.com upstream report log
2023/04/16 19:40 22m ivan.orlov0322@gmail.com git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3d7cb6b04c3f3115719235cc6866b10326de34cd OK log
2023/04/16 19:46 6m ivan.orlov0322@gmail.com git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 99cb0dbd47a15 error
2023/03/30 15:12 22m ivan.orlov0322@gmail.com patch upstream OK log
2023/03/29 14:21 23m ivan.orlov0322@gmail.com patch upstream OK log
2023/03/28 20:18 22m ivan.orlov0322@gmail.com patch upstream OK log
2023/03/28 19:14 22m ivan.orlov0322@gmail.com patch upstream OK log
2023/03/28 17:43 14m ivan.orlov0322@gmail.com patch upstream report log
2023/03/27 21:29 14m ivan.orlov0322@gmail.com upstream report log

Sample crash report:
------------[ cut here ]------------
kernel BUG at mm/khugepaged.c:1823!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5097 Comm: syz-executor220 Not tainted 6.2.0-syzkaller-13154-g857f1268a591 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023
RIP: 0010:collapse_file mm/khugepaged.c:1823 [inline]
RIP: 0010:hpage_collapse_scan_file+0x67c8/0x7580 mm/khugepaged.c:2233
Code: 00 00 89 de e8 c9 66 a3 ff 31 ff 89 de e8 c0 66 a3 ff 45 84 f6 0f 85 28 0d 00 00 e8 22 64 a3 ff e9 dc f7 ff ff e8 18 64 a3 ff <0f> 0b f3 0f 1e fa e8 0d 64 a3 ff e9 93 f6 ff ff f3 0f 1e fa 4c 89
RSP: 0018:ffffc90003dff4e0 EFLAGS: 00010093
RAX: ffffffff81e95988 RBX: 00000000000001c1 RCX: ffff8880205b3a80
RDX: 0000000000000000 RSI: 00000000000001c0 RDI: 00000000000001c1
RBP: ffffc90003dff830 R08: ffffffff81e90e67 R09: fffffbfff1a433c3
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffc90003dff6c0 R14: 00000000000001c0 R15: 0000000000000000
FS:  00007fdbae5ee700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdbae6901e0 CR3: 000000007b2dd000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 madvise_collapse+0x721/0xf50 mm/khugepaged.c:2693
 madvise_vma_behavior mm/madvise.c:1086 [inline]
 madvise_walk_vmas mm/madvise.c:1260 [inline]
 do_madvise+0x9e5/0x4680 mm/madvise.c:1439
 __do_sys_madvise mm/madvise.c:1452 [inline]
 __se_sys_madvise mm/madvise.c:1450 [inline]
 __x64_sys_madvise+0xa5/0xb0 mm/madvise.c:1450
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fdbae65dc39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdbae5ee2f8 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
RAX: ffffffffffffffda RBX: 00007fdbae6e64b8 RCX: 00007fdbae65dc39
RDX: 0000000000000019 RSI: 000000000060005f RDI: 0000000020000000
RBP: 00007fdbae6e64b0 R08: 0000000000000001 R09: 0000000000000033
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fdbae5ee300
R13: 0000000000000001 R14: 00007fdbae5ee400 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:collapse_file mm/khugepaged.c:1823 [inline]
RIP: 0010:hpage_collapse_scan_file+0x67c8/0x7580 mm/khugepaged.c:2233
Code: 00 00 89 de e8 c9 66 a3 ff 31 ff 89 de e8 c0 66 a3 ff 45 84 f6 0f 85 28 0d 00 00 e8 22 64 a3 ff e9 dc f7 ff ff e8 18 64 a3 ff <0f> 0b f3 0f 1e fa e8 0d 64 a3 ff e9 93 f6 ff ff f3 0f 1e fa 4c 89
RSP: 0018:ffffc90003dff4e0 EFLAGS: 00010093
RAX: ffffffff81e95988 RBX: 00000000000001c1 RCX: ffff8880205b3a80
RDX: 0000000000000000 RSI: 00000000000001c0 RDI: 00000000000001c1
RBP: ffffc90003dff830 R08: ffffffff81e90e67 R09: fffffbfff1a433c3
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffc90003dff6c0 R14: 00000000000001c0 R15: 0000000000000000
FS:  00007fdbae5ee700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdbae6901e0 CR3: 000000007b2dd000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/03 07:16 upstream 857f1268a591 f8902b57 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in hpage_collapse_scan_file
2023/03/03 07:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 596b6b709632 f8902b57 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in hpage_collapse_scan_file
2023/03/03 06:58 upstream 857f1268a591 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in hpage_collapse_scan_file
* Struck through repros no longer work on HEAD.