All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: INFO: rcu detected stall in blkdev_ioctl
       [not found] <94eb2c05a38090aaeb0560706bb5@google.com>
@ 2018-04-27 23:49 ` syzbot
  2018-04-28  8:57   ` Tetsuo Handa
  0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2018-04-27 23:49 UTC (permalink / raw)
  To: akpm, axboe, gregkh, hpa, kstewart, linux-block, linux-kernel,
	mingo, npiggin, pombredanne, syzkaller-bugs, tglx, x86

syzbot has found reproducer for the following crash on upstream commit
d8a332730e757129e70675679f2b2a03f1ecf65e (Fri Apr 27 17:39:38 2018 +0000)
Merge tag 'char-misc-4.17-rc3' of  
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
syzbot dashboard link:  
https://syzkaller.appspot.com/bug?extid=369c35474963daf8f8eea897ecf33cb6ad6c7ea2

So far this crash happened 132 times on linux-next, mmots, upstream.
C reproducer: https://syzkaller.appspot.com/x/repro.c?id=5968408013176832
syzkaller reproducer:  
https://syzkaller.appspot.com/x/repro.syz?id=5497672618213376
Raw console output:  
https://syzkaller.appspot.com/x/log.txt?id=4900987307294720
Kernel config:  
https://syzkaller.appspot.com/x/.config?id=7043958930931867332
compiler: gcc (GCC) 8.0.1 20180413 (experimental)

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:  
syzbot+369c35474963daf8f8eea897ecf33cb6ad6c7ea2@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed.

random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
INFO: rcu_sched self-detected stall on CPU
	0-....: (124998 ticks this GP) idle=45e/1/4611686018427387906  
softirq=9820/9820 fqs=31227
	 (t=125000 jiffies g=4939 c=4938 q=43)
NMI backtrace for cpu 0
CPU: 0 PID: 4515 Comm: syz-executor699 Not tainted 4.17.0-rc2+ #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Call Trace:
  <IRQ>
  __dump_stack lib/dump_stack.c:77 [inline]
  dump_stack+0x1b9/0x294 lib/dump_stack.c:113
  nmi_cpu_backtrace.cold.4+0x19/0xce lib/nmi_backtrace.c:103
  nmi_trigger_cpumask_backtrace+0x151/0x192 lib/nmi_backtrace.c:62
  arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
  trigger_single_cpu_backtrace include/linux/nmi.h:156 [inline]
  rcu_dump_cpu_stacks+0x175/0x1c2 kernel/rcu/tree.c:1376
  print_cpu_stall kernel/rcu/tree.c:1525 [inline]
  check_cpu_stall.isra.61.cold.80+0x36c/0x59a kernel/rcu/tree.c:1593
  __rcu_pending kernel/rcu/tree.c:3356 [inline]
  rcu_pending kernel/rcu/tree.c:3401 [inline]
  rcu_check_callbacks+0x21b/0xad0 kernel/rcu/tree.c:2763
  update_process_times+0x2d/0x70 kernel/time/timer.c:1636
  tick_sched_handle+0x9f/0x180 kernel/time/tick-sched.c:173
  tick_sched_timer+0x45/0x130 kernel/time/tick-sched.c:1283
  __run_hrtimer kernel/time/hrtimer.c:1386 [inline]
  __hrtimer_run_queues+0x3e3/0x10a0 kernel/time/hrtimer.c:1448
  hrtimer_interrupt+0x286/0x650 kernel/time/hrtimer.c:1506
  local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
  smp_apic_timer_interrupt+0x15d/0x710 arch/x86/kernel/apic/apic.c:1050
  apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863
  </IRQ>
RIP: 0010:is_loop_device drivers/block/loop.c:713 [inline]
RIP: 0010:loop_set_fd drivers/block/loop.c:901 [inline]
RIP: 0010:lo_ioctl+0x1bb4/0x2130 drivers/block/loop.c:1397
RSP: 0018:ffff8801b37d7948 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: ffff8801d2930d80 RCX: ffffffff84b2b784
RDX: 0000000000000007 RSI: 0000000000000007 RDI: 0000000000000005
RBP: ffff8801b37d79c0 R08: ffff8801b2d52500 R09: ffffed003b5c46c2
R10: 0000000000000003 R11: 0000000000000001 R12: 0000000000000000
R13: ffff8801d4ff7418 R14: ffff8801b70936e0 R15: ffff8801b7093600
  __blkdev_driver_ioctl block/ioctl.c:303 [inline]
  blkdev_ioctl+0x9b6/0x2020 block/ioctl.c:601
  block_ioctl+0xee/0x130 fs/block_dev.c:1877
  vfs_ioctl fs/ioctl.c:46 [inline]
  file_ioctl fs/ioctl.c:500 [inline]
  do_vfs_ioctl+0x1cf/0x16a0 fs/ioctl.c:684
  ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
  __do_sys_ioctl fs/ioctl.c:708 [inline]
  __se_sys_ioctl fs/ioctl.c:706 [inline]
  __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:706
  do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
  entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443e59
RSP: 002b:00007fff93b51bd8 EFLAGS: 00000217 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 6f6f6c2f7665642f RCX: 0000000000443e59
RDX: 0000000000000007 RSI: 0000000000004c00 RDI: 0000000000000008
RBP: 702f74656e2f666c R08: 00000000004002e0 R09: 00000000004002e0
R10: 0000000000000000 R11: 0000000000000217 R12: 65732f636f72702f
R13: 0000000000401b90 R14: 0000000000000000 R15: 0000000000000000

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: INFO: rcu detected stall in blkdev_ioctl
  2018-04-27 23:49 ` INFO: rcu detected stall in blkdev_ioctl syzbot
@ 2018-04-28  8:57   ` Tetsuo Handa
  2018-05-05 11:57     ` Tetsuo Handa
  0 siblings, 1 reply; 3+ messages in thread
From: Tetsuo Handa @ 2018-04-28  8:57 UTC (permalink / raw)
  To: syzbot, axboe, linux-block, syzkaller-bugs
  Cc: akpm, gregkh, hpa, kstewart, linux-kernel, mingo, npiggin,
	pombredanne, tglx, x86

Like I noted in a patch at

https://groups.google.com/d/msg/syzkaller-bugs/2Rw8-OM6IbM/PzdobV8kAgAJ

loop module is not thread safe. Can we use more global lock?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: INFO: rcu detected stall in blkdev_ioctl
  2018-04-28  8:57   ` Tetsuo Handa
@ 2018-05-05 11:57     ` Tetsuo Handa
  0 siblings, 0 replies; 3+ messages in thread
From: Tetsuo Handa @ 2018-05-05 11:57 UTC (permalink / raw)
  To: syzbot, axboe, linux-block, syzkaller-bugs, Jan Kara
  Cc: akpm, gregkh, hpa, kstewart, linux-kernel, mingo, npiggin,
	pombredanne, tglx, x86

If various stall reports regarding loop_set_fd() are hitting below sequence, a patch
was proposed at https://groups.google.com/d/msg/syzkaller-bugs/5pzXJ8yQFR0/vWeRytaQBAAJ .

----------
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/loop.h>

int main(int argc, char *argv[])
{
        const int fd = open("/tmp/file", O_RDWR | O_CREAT | O_TRUNC, 0600);
        const int fd0 = open("/dev/loop0", O_RDONLY);
        const int fd1 = open("/dev/loop1", O_RDONLY);
        ioctl(fd0, LOOP_SET_FD, fd);
        ioctl(fd0, LOOP_CHANGE_FD, fd0);
        ioctl(fd1, LOOP_SET_FD, fd0);
        return 0;
}
----------

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-05 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <94eb2c05a38090aaeb0560706bb5@google.com>
2018-04-27 23:49 ` INFO: rcu detected stall in blkdev_ioctl syzbot
2018-04-28  8:57   ` Tetsuo Handa
2018-05-05 11:57     ` Tetsuo Handa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.