syzbot


INFO: rcu detected stall in sys_setxattr (2)

Status: fixed on 2023/02/24 13:50
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+10a16d1c43580983f6a2@syzkaller.appspotmail.com
Fix commit: 0014edaedfd8 fs: unset MNT_WRITE_HOLD on failure
First crash: 730d, last: 730d
Cause bisection: introduced by (bisect log) :
commit e257039f0fc7da36ac3a522ef9a5cb4ae7852e67
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Tue Mar 1 04:04:20 2022 +0000

  mount_setattr(): clean the control flow and calling conventions

Crash: INFO: rcu detected stall in sys_setxattr (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] fs: unset MNT_WRITE_HOLD on failure 3 (3) 2022/04/21 14:43
[syzbot] INFO: rcu detected stall in sys_setxattr (2) 2 (4) 2022/04/20 12:44
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_setxattr fs 1 1814d 1814d 0/26 auto-closed as invalid on 2019/10/25 10:41
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/04/20 12:26 17m brauner@kernel.org git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git fs.mount_setattr.cleanup OK
2022/04/20 00:28 17m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ b2d229d4ddb1 OK

Sample crash report:
rcu: INFO: rcu_preempt self-detected stall on CPU
rcu: 	0-....: (10499 ticks this GP) idle=201/1/0x4000000000000000 softirq=5136/5136 fqs=5218 
	(t=10500 jiffies g=4333 q=26)
NMI backtrace for cpu 0
CPU: 0 PID: 3617 Comm: syz-executor393 Not tainted 5.18.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1e6/0x230 lib/nmi_backtrace.c:62
 trigger_single_cpu_backtrace include/linux/nmi.h:164 [inline]
 rcu_dump_cpu_stacks+0x262/0x3f0 kernel/rcu/tree_stall.h:343
 print_cpu_stall kernel/rcu/tree_stall.h:639 [inline]
 check_cpu_stall kernel/rcu/tree_stall.h:723 [inline]
 rcu_pending kernel/rcu/tree.c:3923 [inline]
 rcu_sched_clock_irq.cold+0xa1/0x8d6 kernel/rcu/tree.c:2625
 update_process_times+0x16d/0x200 kernel/time/timer.c:1788
 tick_sched_handle+0x9b/0x180 kernel/time/tick-sched.c:243
 tick_sched_timer+0xee/0x120 kernel/time/tick-sched.c:1473
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x1c0/0xe50 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x31c/0x790 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0x146/0x530 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:__mnt_want_write+0xdd/0x2e0 fs/namespace.c:348
Code: 00 02 00 00 89 de e8 02 83 9d ff 85 db 74 42 48 b8 00 00 00 00 00 fc ff df 4d 89 ec 49 c1 ec 03 49 01 c4 e8 c5 80 9d ff f3 90 <41> 0f b6 04 24 84 c0 74 08 3c 03 0f 8e 99 01 00 00 8b 5d 10 31 ff
RSP: 0018:ffffc9000395fdf0 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000200 RCX: 0000000000000000
RDX: ffff888023229d00 RSI: ffffffff81db98ab RDI: 0000000000000003
RBP: ffff888022aa84a0 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff81db98d0 R11: 1ffffffff1efce21 R12: ffffed1004555096
R13: ffff888022aa84b0 R14: ffff888022aa84d0 R15: 0000000000000000
 mnt_want_write+0x13d/0x3e0 fs/namespace.c:394
 path_setxattr+0xb2/0x1c0 fs/xattr.c:593
 __do_sys_setxattr fs/xattr.c:611 [inline]
 __se_sys_setxattr fs/xattr.c:607 [inline]
 __x64_sys_setxattr+0xc0/0x160 fs/xattr.c:607
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f6fcfb02ce9
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:00007f6fcfa932f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 00007f6fcfb8a4b0 RCX: 00007f6fcfb02ce9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000200
RBP: 00007f6fcfb58084 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 695f70756f72672c R14: 695f726573752c30 R15: 00007f6fcfb8a4b8
 </TASK>
----------------
Code disassembly (best guess):
   0:	00 02                	add    %al,(%rdx)
   2:	00 00                	add    %al,(%rax)
   4:	89 de                	mov    %ebx,%esi
   6:	e8 02 83 9d ff       	callq  0xff9d830d
   b:	85 db                	test   %ebx,%ebx
   d:	74 42                	je     0x51
   f:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  16:	fc ff df
  19:	4d 89 ec             	mov    %r13,%r12
  1c:	49 c1 ec 03          	shr    $0x3,%r12
  20:	49 01 c4             	add    %rax,%r12
  23:	e8 c5 80 9d ff       	callq  0xff9d80ed
  28:	f3 90                	pause
* 2a:	41 0f b6 04 24       	movzbl (%r12),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	74 08                	je     0x3b
  33:	3c 03                	cmp    $0x3,%al
  35:	0f 8e 99 01 00 00    	jle    0x1d4
  3b:	8b 5d 10             	mov    0x10(%rbp),%ebx
  3e:	31 ff                	xor    %edi,%edi

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/04/19 05:40 upstream b2d229d4ddb1 8bcc32a6 .config console log report syz C ci-upstream-kasan-gce INFO: rcu detected stall in sys_setxattr
2022/04/19 02:19 upstream b2d229d4ddb1 8bcc32a6 .config console log report syz C ci-upstream-kasan-gce-smack-root INFO: rcu detected stall in sys_setxattr
2022/04/18 22:27 upstream b2d229d4ddb1 8bcc32a6 .config console log report info ci-upstream-kasan-gce-smack-root INFO: rcu detected stall in sys_setxattr
* Struck through repros no longer work on HEAD.