syzbot


BUG: unable to handle kernel paging request in bch2_btree_cache_scan

Status: moderation: reported on 2024/05/28 08:12
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+e9f97b25380b2cba519f@syzkaller.appspotmail.com
First crash: 19d, last: 15d

Sample crash report:
BUG: unable to handle page fault for address: ffffe8ffac5f8070
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 1543f067 P4D 1543f067 PUD 19d9a067 PMD 617e1067 PTE 0
Oops: Oops: 0002 [#1] PREEMPT SMP KASAN NOPTI
CPU: 1 PID: 111 Comm: kswapd0 Not tainted 6.10.0-rc1-syzkaller-00027-g4a4be1ad3a6e #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:bch2_btree_cache_scan+0x492/0x1150 fs/bcachefs/btree_cache.c:463
Code: 48 89 fa 48 c1 ea 03 0d ff ff fb ff 21 43 2c 48 b8 00 00 00 00 00 fc ff df 80 3c 02 00 0f 85 9c 0b 00 00 49 8b 86 f8 b6 04 00 <65> 48 ff 40 38 48 b8 00 00 00 00 00 fc ff df 48 8b 54 24 50 48 c1
RSP: 0018:ffffc90000e476b0 EFLAGS: 00010246
RAX: 0000607f804f8038 RBX: ffff88801a4ac880 RCX: 0000000000000000
RDX: 1ffff1100c3b96df RSI: ffffffff83e66797 RDI: ffff888061dcb6f8
RBP: ffff888061d81a48 R08: 0000000000000001 R09: fffff520001c8ebf
R10: ffffc90000e475ff R11: 0000000000000000 R12: ffff888061d81c70
R13: ffff888061d81a48 R14: ffff888061d80000 R15: 0000000000000004
FS:  0000000000000000(0000) GS:ffff88802c100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffe8ffac5f8070 CR3: 000000001cd5e000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435
 shrink_slab+0x18a/0x1310 mm/shrinker.c:662
 shrink_one+0x493/0x7c0 mm/vmscan.c:4790
 shrink_many mm/vmscan.c:4851 [inline]
 lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4951
 shrink_node mm/vmscan.c:5910 [inline]
 kswapd_shrink_node mm/vmscan.c:6720 [inline]
 balance_pgdat+0x1105/0x1970 mm/vmscan.c:6911
 kswapd+0x5ea/0xbf0 mm/vmscan.c:7180
 kthread+0x2c1/0x3a0 kernel/kthread.c:389
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
CR2: ffffe8ffac5f8070
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_btree_cache_scan+0x492/0x1150 fs/bcachefs/btree_cache.c:463
Code: 48 89 fa 48 c1 ea 03 0d ff ff fb ff 21 43 2c 48 b8 00 00 00 00 00 fc ff df 80 3c 02 00 0f 85 9c 0b 00 00 49 8b 86 f8 b6 04 00 <65> 48 ff 40 38 48 b8 00 00 00 00 00 fc ff df 48 8b 54 24 50 48 c1
RSP: 0018:ffffc90000e476b0 EFLAGS: 00010246
RAX: 0000607f804f8038 RBX: ffff88801a4ac880 RCX: 0000000000000000
RDX: 1ffff1100c3b96df RSI: ffffffff83e66797 RDI: ffff888061dcb6f8
RBP: ffff888061d81a48 R08: 0000000000000001 R09: fffff520001c8ebf
R10: ffffc90000e475ff R11: 0000000000000000 R12: ffff888061d81c70
R13: ffff888061d81a48 R14: ffff888061d80000 R15: 0000000000000004
FS:  0000000000000000(0000) GS:ffff88802c100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffe8ffac5f8070 CR3: 000000001cd5e000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 89 fa             	mov    %rdi,%rdx
   3:	48 c1 ea 03          	shr    $0x3,%rdx
   7:	0d ff ff fb ff       	or     $0xfffbffff,%eax
   c:	21 43 2c             	and    %eax,0x2c(%rbx)
   f:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  16:	fc ff df
  19:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
  1d:	0f 85 9c 0b 00 00    	jne    0xbbf
  23:	49 8b 86 f8 b6 04 00 	mov    0x4b6f8(%r14),%rax
* 2a:	65 48 ff 40 38       	incq   %gs:0x38(%rax) <-- trapping instruction
  2f:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  36:	fc ff df
  39:	48 8b 54 24 50       	mov    0x50(%rsp),%rdx
  3e:	48                   	rex.W
  3f:	c1                   	.byte 0xc1

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/31 02:51 upstream 4a4be1ad3a6e c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: unable to handle kernel paging request in bch2_btree_cache_scan
2024/05/26 14:09 upstream c13320499ba0 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: unable to handle kernel paging request in bch2_btree_cache_scan
* Struck through repros no longer work on HEAD.