syzbot


kernel BUG in insert_state

Status: auto-obsoleted due to no activity on 2023/07/03 23:50
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+7cab7cbfd44f07a9a6bb@syzkaller.appspotmail.com
First crash: 434d, last: 379d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in insert_state 0 (1) 2023/01/13 16:50
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in insert_state (2) btrfs C error done 7 51d 206d 0/26 upstream: reported C repro on 2023/08/26 04:14

Sample crash report:
RBP: 00007fdcdb17b1d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffcfe41d1df R14: 00007fdcdb17b300 R15: 0000000000022000
 </TASK>
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:379!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 30611 Comm: syz-executor.2 Not tainted 6.2.0-syzkaller-13563-gf915322fe014 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:set_state_bits fs/btrfs/extent-io-tree.c:379 [inline]
RIP: 0010:insert_state+0x38d/0x390 fs/btrfs/extent-io-tree.c:401
Code: 25 2a fe e9 25 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 42 fd ff ff 48 89 df e8 5d 25 2a fe e9 35 fd ff ff e8 23 b6 d3 fd <0f> 0b 90 66 0f 1f 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 40 44
RSP: 0018:ffffc900154771e8 EFLAGS: 00010246
RAX: ffffffff83b90b8d RBX: 00000000fffffff4 RCX: 0000000000040000
RDX: ffffc9000c7e5000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffff88802950a300 R08: ffffffff83b9096b R09: 00000000ffffffff
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000001000
R13: 0000000000000800 R14: 0000000000001fff R15: dffffc0000000000
FS:  00007fdcdb17b700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001300 CR3: 0000000021fdf000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __set_extent_bit+0x1228/0x1ce0 fs/btrfs/extent-io-tree.c:1136
 set_record_extent_bits+0x56/0x90 fs/btrfs/extent-io-tree.c:1690
 qgroup_reserve_data+0x27f/0xaa0 fs/btrfs/qgroup.c:3777
 btrfs_qgroup_reserve_data+0x2e/0xc0 fs/btrfs/qgroup.c:3820
 btrfs_check_data_free_space+0x149/0x240 fs/btrfs/delalloc-space.c:154
 btrfs_delalloc_reserve_space+0x37/0x200 fs/btrfs/delalloc-space.c:467
 btrfs_page_mkwrite+0x300/0xc90 fs/btrfs/inode.c:8132
 do_page_mkwrite+0x1a1/0x600 mm/memory.c:2925
 wp_page_shared mm/memory.c:3274 [inline]
 do_wp_page+0x501/0x3620 mm/memory.c:3356
 handle_pte_fault mm/memory.c:4927 [inline]
 __handle_mm_fault mm/memory.c:5051 [inline]
 handle_mm_fault+0x23a0/0x51c0 mm/memory.c:5197
 do_user_addr_fault arch/x86/mm/fault.c:1407 [inline]
 handle_page_fault arch/x86/mm/fault.c:1498 [inline]
 exc_page_fault+0x685/0x8a0 arch/x86/mm/fault.c:1554
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0010:copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:166
Code: d1 f3 a4 31 c0 0f 01 ca c3 8d 0c ca 89 ca eb 2c 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa 0f 01 cb 83 fa 40 72 34 89 d1 <f3> a4 31 c0 0f 01 ca c3 89 ca eb 06 66 0f 1f 44 00 00 83 f8 12 74
RSP: 0018:ffffc90015477c10 EFLAGS: 00050206
RAX: ffffffff843e4201 RBX: 00007fffffffef70 RCX: 0000000000000090
RDX: 0000000000000090 RSI: ffffc90015477c80 RDI: 0000000020001300
RBP: ffffc90015477db0 R08: dffffc0000000000 R09: fffff52002a8efa2
R10: 0000000000000002 R11: dffffc0000000001 R12: 0000000000000090
R13: ffffc90015477dec R14: 0000000020001300 R15: ffffc90015477c80
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
 _copy_to_user+0xed/0x130 lib/usercopy.c:41
 copy_to_user include/linux/uaccess.h:169 [inline]
 cp_new_stat+0x544/0x6d0 fs/stat.c:412
 __do_sys_newfstat fs/stat.c:459 [inline]
 __se_sys_newfstat fs/stat.c:453 [inline]
 __x64_sys_newfstat+0xf7/0x140 fs/stat.c:453
 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:0x7fdcda48c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007fdcdb17b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000005
RAX: ffffffffffffffda RBX: 00007fdcda5ac120 RCX: 00007fdcda48c0f9
RDX: 0000000000000000 RSI: 0000000020001300 RDI: 000000000000000d
RBP: 00007fdcdb17b1d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffcfe41d1df R14: 00007fdcdb17b300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:set_state_bits fs/btrfs/extent-io-tree.c:379 [inline]
RIP: 0010:insert_state+0x38d/0x390 fs/btrfs/extent-io-tree.c:401
Code: 25 2a fe e9 25 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 42 fd ff ff 48 89 df e8 5d 25 2a fe e9 35 fd ff ff e8 23 b6 d3 fd <0f> 0b 90 66 0f 1f 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 40 44
RSP: 0018:ffffc900154771e8 EFLAGS: 00010246
RAX: ffffffff83b90b8d RBX: 00000000fffffff4 RCX: 0000000000040000
RDX: ffffc9000c7e5000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffff88802950a300 R08: ffffffff83b9096b R09: 00000000ffffffff
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000001000
R13: 0000000000000800 R14: 0000000000001fff R15: dffffc0000000000
FS:  00007fdcdb17b700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001300 CR3: 0000000021fdf000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	d1 f3                	shl    %ebx
   2:	a4                   	movsb  %ds:(%rsi),%es:(%rdi)
   3:	31 c0                	xor    %eax,%eax
   5:	0f 01 ca             	clac
   8:	c3                   	retq
   9:	8d 0c ca             	lea    (%rdx,%rcx,8),%ecx
   c:	89 ca                	mov    %ecx,%edx
   e:	eb 2c                	jmp    0x3c
  10:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  17:	00 00 00
  1a:	66 90                	xchg   %ax,%ax
  1c:	f3 0f 1e fa          	endbr64
  20:	0f 01 cb             	stac
  23:	83 fa 40             	cmp    $0x40,%edx
  26:	72 34                	jb     0x5c
  28:	89 d1                	mov    %edx,%ecx
* 2a:	f3 a4                	rep movsb %ds:(%rsi),%es:(%rdi) <-- trapping instruction
  2c:	31 c0                	xor    %eax,%eax
  2e:	0f 01 ca             	clac
  31:	c3                   	retq
  32:	89 ca                	mov    %ecx,%edx
  34:	eb 06                	jmp    0x3c
  36:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
  3c:	83 f8 12             	cmp    $0x12,%eax
  3f:	74                   	.byte 0x74

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/05 23:50 upstream f915322fe014 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state
2023/01/09 16:16 upstream 1fe4fd6f5cad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state
2023/01/25 07:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2e84eedb182e 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state
* Struck through repros no longer work on HEAD.