Re: INFO: task hung in blkdev_issue_flush (2)

From: Bart Van Assche
Date: Tue Jul 02 2019 - 12:01:15 EST


On 7/2/19 8:27 AM, syzbot wrote:
Showing all locks held in the system:
1 lock held by khungtaskd/1043:
Â#0: 00000000f7c610b3 (rcu_read_lock){....}, at: debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:5149
2 locks held by rsyslogd/8451:
Â#0: 00000000dfc1566f (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110 fs/file.c:801
Â#1: 0000000054220207 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1168 [inline]
Â#1: 0000000054220207 (&rq->lock){-.-.}, at: __schedule+0x1f5/0x1560 kernel/sched/core.c:3397
2 locks held by getty/8541:
Â#0: 000000004ff543bd (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
Â#1: 000000002a3905f3 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/8542:
Â#0: 000000006e67fcec (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
Â#1: 00000000ee71e4f3 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/8543:
Â#0: 00000000bd0907a0 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
Â#1: 000000000876abce (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/8544:
Â#0: 00000000710d6f7d (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
Â#1: 00000000af289586 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/8545:
Â#0: 000000003399e62d (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
Â#1: 00000000ee97f91a (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/8546:
Â#0: 00000000ff2274c6 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
Â#1: 00000000b96c5a9f (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/8547:
Â#0: 000000005165f028 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
Â#1: 00000000e89d5b4a (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156

Since the tty layer does not call any block layer code, does this mean that the root cause is in the tty code instead of in the block layer?

Bart.