INFO: rcu detected stall in blkdev_ioctl

瀏覽次數:23 次
跳到第一則未讀訊息

syzbot

未讀,
2017年12月16日 凌晨2:54:042017/12/16
收件者:ak...@linux-foundation.org、gre...@linuxfoundation.org、h...@zytor.com、kste...@linuxfoundation.org、linux-...@vger.kernel.org、mi...@redhat.com、npi...@gmail.com、pombr...@nexb.com、syzkall...@googlegroups.com、tg...@linutronix.de、x...@kernel.org
Hello,

syzkaller hit the following crash on
82bcf1def3b5f1251177ad47c44f7e17af039b4b
git://git.cmpxchg.org/linux-mmots.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.

Unfortunately, I don't have any reproducer for this bug yet.


netlink: 3 bytes leftover after parsing attributes in process
`syz-executor0'.
INFO: rcu_sched self-detected stall on CPU
0-....: (124999 ticks this GP) idle=23e/1/4611686018427387906
softirq=24882/24882 fqs=31192
(t=125000 jiffies g=14046 c=14045 q=2134)
NMI backtrace for cpu 0
CPU: 0 PID: 7377 Comm: syz-executor6 Not tainted 4.15.0-rc2-mm1+ #39
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x257 lib/dump_stack.c:53
nmi_cpu_backtrace+0x1d2/0x210 lib/nmi_backtrace.c:103
nmi_trigger_cpumask_backtrace+0x122/0x180 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+0x186/0x1da kernel/rcu/tree.c:1375
print_cpu_stall kernel/rcu/tree.c:1524 [inline]
check_cpu_stall.isra.65+0xbb8/0x15b0 kernel/rcu/tree.c:1592
__rcu_pending kernel/rcu/tree.c:3362 [inline]
rcu_pending kernel/rcu/tree.c:3424 [inline]
rcu_check_callbacks+0x238/0xd20 kernel/rcu/tree.c:2764
update_process_times+0x30/0x60 kernel/time/timer.c:1630
tick_sched_handle+0x85/0x160 kernel/time/tick-sched.c:162
tick_sched_timer+0x42/0x120 kernel/time/tick-sched.c:1148
__run_hrtimer kernel/time/hrtimer.c:1211 [inline]
__hrtimer_run_queues+0x349/0xe10 kernel/time/hrtimer.c:1275
hrtimer_interrupt+0x1d4/0x5f0 kernel/time/hrtimer.c:1309
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
smp_apic_timer_interrupt+0x14a/0x700 arch/x86/kernel/apic/apic.c:1050
apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:920
</IRQ>
RIP: 0010:loop_set_fd drivers/block/loop.c:885 [inline]
RIP: 0010:lo_ioctl+0x5d1/0x1b90 drivers/block/loop.c:1358
RSP: 0018:ffff88019353faa0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff11
RAX: 0000000000010000 RBX: dffffc0000000000 RCX: ffffffff838ce561
RDX: 0000000000010000 RSI: ffffc9000341d000 RDI: ffff8801d66966b8
RBP: ffff88019353fb18 R08: 0000000000000001 R09: 1ffff100326a7efd
R10: ffff8801d4a38100 R11: 0000000000000001 R12: ffff8801d6696140
R13: ffff8801d4e9e940 R14: ffff8801cddb21c0 R15: ffff8801d4e9ea98
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0x1759/0x1e00 block/ioctl.c:601
block_ioctl+0xea/0x130 fs/block_dev.c:1860
vfs_ioctl fs/ioctl.c:46 [inline]
do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:686
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x452a39
RSP: 002b:00007fa1f2927c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452a39
RDX: 0000000000000016 RSI: 0000000000004c00 RDI: 0000000000000014
RBP: 000000000000005b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006ee928
R13: 00000000ffffffff R14: 00007fa1f29286d4 R15: 0000000000000000


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.
Please credit me with: Reported-by: syzbot <syzk...@googlegroups.com>

syzbot will keep track of this bug report.
Once a fix for this bug is merged into any tree, reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
config.txt
raw.log

syzbot

未讀,
2018年4月27日 晚上7:49:032018/4/27
收件者:ak...@linux-foundation.org、ax...@kernel.dk、gre...@linuxfoundation.org、h...@zytor.com、kste...@linuxfoundation.org、linux...@vger.kernel.org、linux-...@vger.kernel.org、mi...@redhat.com、npi...@gmail.com、pombr...@nexb.com、syzkall...@googlegroups.com、tg...@linutronix.de、x...@kernel.org
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+369c35474963daf8...@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

Tetsuo Handa

未讀,
2018年4月28日 凌晨4:58:042018/4/28
收件者:syzbot、ax...@kernel.dk、linux...@vger.kernel.org、syzkall...@googlegroups.com、ak...@linux-foundation.org、gre...@linuxfoundation.org、h...@zytor.com、kste...@linuxfoundation.org、linux-...@vger.kernel.org、mi...@redhat.com、npi...@gmail.com、pombr...@nexb.com、tg...@linutronix.de、x...@kernel.org
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?

Tetsuo Handa

未讀,
2018年5月5日 清晨7:57:542018/5/5
收件者:syzbot、ax...@kernel.dk、linux...@vger.kernel.org、syzkall...@googlegroups.com、Jan Kara、ak...@linux-foundation.org、gre...@linuxfoundation.org、h...@zytor.com、kste...@linuxfoundation.org、linux-...@vger.kernel.org、mi...@redhat.com、npi...@gmail.com、pombr...@nexb.com、tg...@linutronix.de、x...@kernel.org
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;
}
----------


Tetsuo Handa

未讀,
2018年5月8日 清晨6:48:252018/5/8
收件者:syzbot、syzkall...@googlegroups.com、Jens Axboe、Jan Kara、Theodore Y. Ts'o
OK. Patch is in ext4.git#loop-fix as 170785a9cc72e8e1.

#syz fix: loop: add recursion validation to LOOP_CHANGE_FD

回覆所有人
回覆作者
轉寄
0 則新訊息