INFO: task hung in vivid_stop_generating_vid_cap

16 views
Skip to first unread message

syzbot

unread,
Apr 10, 2019, 10:38:08 PM4/10/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 4d552acf Linux 4.19.34
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=149bec5b200000
kernel config: https://syzkaller.appspot.com/x/.config?x=c95a88291f095edd
dashboard link: https://syzkaller.appspot.com/bug?extid=0dd901f5638f18daa476
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

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

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+0dd901...@syzkaller.appspotmail.com

protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
INFO: task syz-executor.1:21583 blocked for more than 140 seconds.
Not tainted 4.19.34 #2
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.1 D28216 21583 8219 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x817/0x1d00 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
schedule_timeout+0x8ca/0xfd0 kernel/time/timer.c:1780
do_wait_for_common kernel/sched/completion.c:83 [inline]
__wait_for_common kernel/sched/completion.c:104 [inline]
wait_for_common kernel/sched/completion.c:115 [inline]
wait_for_completion+0x29c/0x440 kernel/sched/completion.c:136
kthread_stop+0x116/0x6d0 kernel/kthread.c:550
vivid_stop_generating_vid_cap+0x1e0/0x6e2
drivers/media/platform/vivid/vivid-kthread-cap.c:922
vid_cap_stop_streaming+0x8a/0xe0
drivers/media/platform/vivid/vivid-vid-cap.c:256
__vb2_queue_cancel+0xb4/0x970
drivers/media/common/videobuf2/videobuf2-core.c:1662
vb2_core_streamoff+0x60/0x140
drivers/media/common/videobuf2/videobuf2-core.c:1796
__vb2_cleanup_fileio+0x78/0x170
drivers/media/common/videobuf2/videobuf2-core.c:2323
vb2_core_queue_release+0x20/0x80
drivers/media/common/videobuf2/videobuf2-core.c:2050
vb2_queue_release drivers/media/common/videobuf2/videobuf2-v4l2.c:671
[inline]
_vb2_fop_release+0x1cf/0x2a0
drivers/media/common/videobuf2/videobuf2-v4l2.c:842
vb2_fop_release+0x75/0xc0
drivers/media/common/videobuf2/videobuf2-v4l2.c:856
vivid_fop_release+0x18e/0x430 drivers/media/platform/vivid/vivid-core.c:474
v4l2_release+0xfb/0x1a0 drivers/media/v4l2-core/v4l2-dev.c:448
__fput+0x2df/0x8b0 fs/file_table.c:278
____fput+0x16/0x20 fs/file_table.c:309
task_work_run+0x14a/0x1c0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:193 [inline]
exit_to_usermode_loop+0x273/0x2c0 arch/x86/entry/common.c:166
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x52d/0x610 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4120b1
Code: 05 53 75 48 00 48 89 04 24 48 c7 44 24 08 02 00 00 00 e8 b2 9b 01 00
e8 ed 92 01 00 48 8d 05 51 c3 48 00 48 89 04 24 48 c7 44 <24> 08 06 00 00
00 48 8b 44 24 60 48 89 44 24 10 48 8b 44 24 68 48
RSP: 002b:00007ffc57cd0130 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00000000004120b1
RDX: 0000001b2d620000 RSI: 0000000000740278 RDI: 0000000000000003
RBP: 000000000073c900 R08: 00000000ffc1511e R09: 00000000ffc15122
R10: 00007ffc57cd0200 R11: 0000000000000293 R12: ffffffffffffffff
R13: 00000000000dd4cd R14: 00000000000003e8 R15: 000000000073bf0c

Showing all locks held in the system:
1 lock held by khungtaskd/1033:
#0: 000000009d4ebe72 (rcu_read_lock){....}, at:
debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4438
2 locks held by getty/8172:
#0: 0000000042d8132f (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000008c4bbd8e (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8173:
#0: 0000000086933ad1 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000752d3ccf (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8174:
#0: 00000000d84c42db (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000004d4d1e48 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8175:
#0: 000000004115992b (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000071f3899f (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8176:
#0: 000000003bc2068b (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000009f0c0c4d (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8177:
#0: 00000000ec82daaa (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000002f41f3d9 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8178:
#0: 000000005d5c854a (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000005a08337f (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1033 Comm: khungtaskd Not tainted 4.19.34 #2
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
nmi_cpu_backtrace.cold+0x63/0xa4 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1b0/0x1f8 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:202 [inline]
watchdog+0x9c6/0xec0 kernel/hung_task.c:263
kthread+0x357/0x430 kernel/kthread.c:246
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt+0x2/0x10
arch/x86/include/asm/irqflags.h:57


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Apr 11, 2019, 8:40:13 AM4/11/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 1ec8f1f0 Linux 4.14.111
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1270b5ed200000
kernel config: https://syzkaller.appspot.com/x/.config?x=fdadf290ea9fc6f9
dashboard link: https://syzkaller.appspot.com/bug?extid=42f5ab4cf1e172a10d2c
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

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

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+42f5ab...@syzkaller.appspotmail.com

INFO: task syz-executor.2:11040 blocked for more than 140 seconds.
Not tainted 4.14.111 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.2 D28528 11040 7071 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2807 [inline]
__schedule+0x7be/0x1cf0 kernel/sched/core.c:3383
schedule+0x92/0x1c0 kernel/sched/core.c:3427
schedule_timeout+0x93d/0xe10 kernel/time/timer.c:1721
do_wait_for_common kernel/sched/completion.c:91 [inline]
__wait_for_common kernel/sched/completion.c:112 [inline]
wait_for_common kernel/sched/completion.c:123 [inline]
wait_for_completion+0x27c/0x420 kernel/sched/completion.c:144
kthread_stop+0xda/0x650 kernel/kthread.c:530
vivid_stop_generating_vid_cap+0x1b9/0x664
drivers/media/platform/vivid/vivid-kthread-cap.c:934
vid_cap_stop_streaming+0x7c/0xd0
drivers/media/platform/vivid/vivid-vid-cap.c:273
__vb2_queue_cancel+0xa6/0x8a0 drivers/media/v4l2-core/videobuf2-core.c:1655
vb2_core_streamoff+0x52/0x110 drivers/media/v4l2-core/videobuf2-core.c:1788
__vb2_cleanup_fileio+0x78/0x150
drivers/media/v4l2-core/videobuf2-core.c:2313
vb2_core_queue_release+0x1d/0x80
drivers/media/v4l2-core/videobuf2-core.c:2040
vb2_queue_release drivers/media/v4l2-core/videobuf2-v4l2.c:669 [inline]
_vb2_fop_release+0x1cf/0x2a0 drivers/media/v4l2-core/videobuf2-v4l2.c:840
vb2_fop_release+0x75/0xc0 drivers/media/v4l2-core/videobuf2-v4l2.c:854
vivid_fop_release+0x180/0x3f0 drivers/media/platform/vivid/vivid-core.c:486
v4l2_release+0xfb/0x190 drivers/media/v4l2-core/v4l2-dev.c:446
__fput+0x277/0x7a0 fs/file_table.c:210
____fput+0x16/0x20 fs/file_table.c:244
task_work_run+0x119/0x190 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:191 [inline]
exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:267 [inline]
do_syscall_64+0x4a9/0x630 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4120b1
RSP: 002b:00007fff6de13ab0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00000000004120b1
RDX: 0000001b2d420000 RSI: 0000000000740160 RDI: 0000000000000003
RBP: 000000000073c900 R08: 0000000015c23545 R09: 0000000015c23549
R10: 00007fff6de13b80 R11: 0000000000000293 R12: ffffffffffffffff
R13: 000000000001fe61 R14: 00000000000003e8 R15: 000000000073bf0c

Showing all locks held in the system:
1 lock held by khungtaskd/1009:
#0: (tasklist_lock){.+.+}, at: [<ffffffff81486028>]
debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
2 locks held by getty/7024:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7025:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7026:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7027:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7028:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7029:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7030:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 1009 Comm: khungtaskd Not tainted 4.14.111 #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:194 [inline]
watchdog+0x5d8/0xb80 kernel/hung_task.c:250
kthread+0x31c/0x430 kernel/kthread.c:232
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2819 Comm: kworker/u4:5 Not tainted 4.14.111 #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: bat_events batadv_nc_worker
task: ffff88809e39c000 task.stack: ffff88809dc68000
RIP: 0010:lock_acquire+0x198/0x430 kernel/locking/lockdep.c:3996
RSP: 0018:ffff88809dc6fc90 EFLAGS: 00000807
RAX: dffffc0000000000 RBX: ffff88809e39c000 RCX: 000000002e890d4b
RDX: 0000000000000000 RSI: ffff88809e39c8d0 RDI: ffff88809e39c87c
RBP: ffff88809dc6fcd8 R08: 0000000000000000 R09: ffff88809e39c8f0
R10: ffff88809e39c8d0 R11: ffff88809e39c000 R12: ffffffff8778ed60
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000002
FS: 0000000000000000(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000b8c7e0 CR3: 00000000a8b83000 CR4: 00000000001406f0
Call Trace:
rcu_lock_acquire include/linux/rcupdate.h:244 [inline]
rcu_read_lock include/linux/rcupdate.h:631 [inline]
batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:416 [inline]
batadv_nc_worker+0x107/0x6d0 net/batman-adv/network-coding.c:726
process_one_work+0x868/0x1610 kernel/workqueue.c:2114
worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248
kthread+0x31c/0x430 kernel/kthread.c:232
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402
Code: ff ff 48 b8 00 00 00 00 00 fc ff df 65 48 8b 1c 25 40 ee 01 00 48 8d
bb 7c 08 00 00 48 83 c4 20 48 89 fa 48 c1 ea 03 0f b6 14 02 <48> 89 f8 83
e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 17 02 00 00

syzbot

unread,
Apr 13, 2019, 8:52:10 AM4/13/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 1ec8f1f0 Linux 4.14.111
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=109a4ad3200000
kernel config: https://syzkaller.appspot.com/x/.config?x=fdadf290ea9fc6f9
dashboard link: https://syzkaller.appspot.com/bug?extid=42f5ab4cf1e172a10d2c
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1751d9af200000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ca87bb200000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+42f5ab...@syzkaller.appspotmail.com

INFO: task syz-executor049:7230 blocked for more than 140 seconds.
Not tainted 4.14.111 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor049 D28528 7230 7223 0x80000002
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x7df/0x2c10 kernel/exit.c:874
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x443b98
RSP: 002b:00007fffebee86e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b98
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c3510 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor049:7355 blocked for more than 140 seconds.
Not tainted 4.14.111 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor049 D28528 7355 7227 0x80000002
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x7df/0x2c10 kernel/exit.c:874
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x443b98
RSP: 002b:00007fffebee86e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b98
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c3510 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor049:7359 blocked for more than 140 seconds.
Not tainted 4.14.111 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor049 D28528 7359 7226 0x80000002
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x7df/0x2c10 kernel/exit.c:874
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x443b98
RSP: 002b:00007fffebee86e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b98
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c3510 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor049:7464 blocked for more than 140 seconds.
Not tainted 4.14.111 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor049 D28528 7464 7222 0x80000002
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x7df/0x2c10 kernel/exit.c:874
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x443b98
RSP: 002b:00007fffebee86e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b98
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c3510 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor049:7467 blocked for more than 140 seconds.
Not tainted 4.14.111 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor049 D28528 7467 7225 0x80000002
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x7df/0x2c10 kernel/exit.c:874
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x443b98
RSP: 002b:00007fffebee86e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b98
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c3510 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1003:
#0: (tasklist_lock){.+.+}, at: [<ffffffff81486028>]
debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
1 lock held by rsyslogd/7076:
#0: (&f->f_pos_lock){+.+.}, at: [<ffffffff8193df4b>]
__fdget_pos+0xab/0xd0 fs/file.c:769
2 locks held by getty/7198:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7199:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7200:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7201:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7202:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7203:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7204:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861a89e3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83107006>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 1003 Comm: khungtaskd Not tainted 4.14.111 #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:194 [inline]
watchdog+0x5d8/0xb80 kernel/hung_task.c:250
kthread+0x31c/0x430 kernel/kthread.c:232
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at pc 0xffffffff861a94c2

syzbot

unread,
May 7, 2019, 9:46:10 PM5/7/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 1656b145 Linux 4.19.40
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1065008ca00000
kernel config: https://syzkaller.appspot.com/x/.config?x=b4629ebda8b4170b
dashboard link: https://syzkaller.appspot.com/bug?extid=0dd901f5638f18daa476
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13748bb4a00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17b614e8a00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+0dd901...@syzkaller.appspotmail.com

INFO: task syz-executor407:8036 blocked for more than 140 seconds.
Not tainted 4.19.40 #9
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor407 D28216 8036 8035 0x80000002
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x813/0x1d00 kernel/sched/core.c:3474
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x933/0x2fa0 kernel/exit.c:876
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443b78
Code: Bad RIP value.
RSP: 002b:00007ffccc2796a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor407:8160 blocked for more than 140 seconds.
Not tainted 4.19.40 #9
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor407 D28216 8160 8031 0x80000002
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x813/0x1d00 kernel/sched/core.c:3474
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x933/0x2fa0 kernel/exit.c:876
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443b78
Code: 64 69 73 63 61 72 64 69 6e 67 20 6d 65 73 73 61 67 65 00 00 00 00 00
00 00 00 41 64 64 65 64 20 6e 65 77 20 65 6e 74 72 79 20 <25> 64 20 66 6f
72 20 66 69 6c 65 20 63 61 63 68 65 2c 20 66 69 6c
RSP: 002b:00007ffccc2796a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor407:8164 blocked for more than 140 seconds.
Not tainted 4.19.40 #9
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor407 D28216 8164 8032 0x80000002
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x813/0x1d00 kernel/sched/core.c:3474
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x933/0x2fa0 kernel/exit.c:876
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443b78
Code: 64 69 73 63 61 72 64 69 6e 67 20 6d 65 73 73 61 67 65 00 00 00 00 00
00 00 00 41 64 64 65 64 20 6e 65 77 20 65 6e 74 72 79 20 <25> 64 20 66 6f
72 20 66 69 6c 65 20 63 61 63 68 65 2c 20 66 69 6c
RSP: 002b:00007ffccc2796a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor407:8173 blocked for more than 140 seconds.
Not tainted 4.19.40 #9
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor407 D27584 8173 8030 0x80000002
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x813/0x1d00 kernel/sched/core.c:3474
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x933/0x2fa0 kernel/exit.c:876
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443b78
Code: 64 69 73 63 61 72 64 69 6e 67 20 6d 65 73 73 61 67 65 00 00 00 00 00
00 00 00 41 64 64 65 64 20 6e 65 77 20 65 6e 74 72 79 20 <25> 64 20 66 6f
72 20 66 69 6c 65 20 63 61 63 68 65 2c 20 66 69 6c
RSP: 002b:00007ffccc2796a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor407:8309 blocked for more than 140 seconds.
Not tainted 4.19.40 #9
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor407 D28216 8309 8034 0x80000002
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x813/0x1d00 kernel/sched/core.c:3474
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x933/0x2fa0 kernel/exit.c:876
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443b78
Code: 64 69 73 63 61 72 64 69 6e 67 20 6d 65 73 73 61 67 65 00 00 00 00 00
00 00 00 41 64 64 65 64 20 6e 65 77 20 65 6e 74 72 79 20 <25> 64 20 66 6f
72 20 66 69 6c 65 20 63 61 63 68 65 2c 20 66 69 6c
RSP: 002b:00007ffccc2796a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
2 locks held by ksoftirqd/0/9:
#0: 0000000017b51b5d (&rq->lock){-.-.}, at: rq_lock
kernel/sched/sched.h:1821 [inline]
#0: 0000000017b51b5d (&rq->lock){-.-.}, at: __schedule+0x1f8/0x1d00
kernel/sched/core.c:3412
#1: 0000000051461550 (rcu_read_lock){....}, at: trace_sched_stat_runtime
include/trace/events/sched.h:423 [inline]
#1: 0000000051461550 (rcu_read_lock){....}, at: update_curr+0x2ce/0x8a0
kernel/sched/fair.c:828
1 lock held by khungtaskd/1032:
#0: 0000000051461550 (rcu_read_lock){....}, at:
debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4435
1 lock held by rsyslogd/7880:
#0: 000000000ab628ce (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110
fs/file.c:767
2 locks held by getty/8002:
#0: 000000002b6e20aa (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000005d0ff065 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8003:
#0: 000000007c11ae8e (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000007a5e92df (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8004:
#0: 00000000c091c44e (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000bd3bdd5f (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8005:
#0: 00000000ef1e488c (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000fc0d83d2 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8006:
#0: 000000008f7de511 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000084638674 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8007:
#0: 00000000e51efc54 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000ac9c6ab2 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/8008:
#0: 00000000064afc1b (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000086c02416 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 1032 Comm: khungtaskd Not tainted 4.19.40 #9
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
nmi_cpu_backtrace.cold+0x63/0xa4 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1b0/0x1f8 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
watchdog+0x9df/0xee0 kernel/hung_task.c:287
kthread+0x357/0x430 kernel/kthread.c:246
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at native_safe_halt+0x2/0x10
arch/x86/include/asm/irqflags.h:57

syzbot

unread,
Dec 30, 2019, 7:47:01 PM12/30/19
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit 467052f6ea5a51524992e43f02b543550495c391
Author: Alexander Popov <alex....@linux.com>
Date: Sun Nov 3 22:17:19 2019 +0000

media: vivid: Fix wrong locking that causes race conditions on
streaming stop

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15758885e00000
start commit: ef244c30 Linux 4.19.81
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=a3e67c0671e5c5e7
dashboard link: https://syzkaller.appspot.com/bug?extid=0dd901f5638f18daa476
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1721abcce00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=151d1658e00000

If the result looks correct, please mark the bug fixed by replying with:

#syz fix: media: vivid: Fix wrong locking that causes race conditions on
streaming stop

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages