igt@kms_fbcon_fbt@psr-suspend - incomplete - pstore logs - is trying to acquire lock at: down_trylock, but task is already holding lock at: raw_spin_rq_lock_nested
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6999/shard-iclb4/igt@kms_fbcon_fbt@psr-suspend.html https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6999/shard-iclb4/pstore21-1650920458_Panic_1.txt
<0>[ 336.452907] Kernel panic - not syncing: EXT4-fs (device sda2): panic forced after error
<4>[ 336.453296] ------------[ cut here ]------------
<4>[ 336.453318]
<4>[ 336.453319] ======================================================
<4>[ 336.453320] WARNING: possible circular locking dependency detected
<4>[ 336.453322] 5.18.0-rc4-CI_DRM_11550-g56b089ae03ef+ #1 Not tainted
<4>[ 336.453325] ------------------------------------------------------
<4>[ 336.453326] kworker/5:1H/103 is trying to acquire lock:
<4>[ 336.453328] ffffffff82734458 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0xa/0x30
<4>[ 336.453342]
<4>[ 336.453342] but task is already holding lock:
<4>[ 336.453343] ffff88849fdbb798 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x1b/0x30
<4>[ 336.453353]
<4>[ 336.453353] which lock already depends on the new lock.
<4>[ 336.453353]
<4>[ 336.453354]
<4>[ 336.453354] the existing dependency chain (in reverse order) is:
<4>[ 336.453355]
<4>[ 336.453355] -> #2 (&rq->__lock){-.-.}-{2:2}:
<4>[ 336.453360] _raw_spin_lock_nested+0x2d/0x40
<4>[ 336.453365] raw_spin_rq_lock_nested+0x1b/0x30
<4>[ 336.453370] task_fork_fair+0x43/0x170
<4>[ 336.453375] sched_cgroup_fork+0xec/0x130
<4>[ 336.453378] copy_process+0x127b/0x1c80
<4>[ 336.453382] kernel_clone+0x98/0x730
<4>[ 336.453386] kernel_thread+0x50/0x70
<4>[ 336.453390] rest_init+0x1d/0x260
<4>[ 336.453395] start_kernel+0x66b/0x692
<4>[ 336.453400] secondary_startup_64_no_verify+0xc3/0xcb
<4>[ 336.453405]
<4>[ 336.453405] -> #1 (&p->pi_lock){-.-.}-{2:2}:
<4>[ 336.453409] _raw_spin_lock_irqsave+0x33/0x50
<4>[ 336.453413] try_to_wake_up+0x6b/0x830
<4>[ 336.453419] up+0x3b/0x50
<4>[ 336.453422] __up_console_sem+0x58/0x70
<4>[ 336.453427] console_unlock+0x370/0x590
<4>[ 336.453432] do_con_write+0x63f/0xa00
<4>[ 336.453436] con_write+0xa/0x20
<4>[ 336.453440] do_output_char+0x115/0x1e0
<4>[ 336.453445] n_tty_write+0x20e/0x510
<4>[ 336.453450] file_tty_write.isra.27+0x14c/0x340
<4>[ 336.453454] do_iter_readv_writev+0x130/0x190
<4>[ 336.453460] do_iter_write+0x6c/0x190
<4>[ 336.453465] vfs_writev+0x97/0x290
<4>[ 336.453470] do_writev+0x63/0x100
<4>[ 336.453474] do_syscall_64+0x37/0x80
<4>[ 336.453478] entry_SYSCALL_64_after_hwframe+0x44/0xae
<4>[ 336.453483]
<4>[ 336.453483] -> #0 ((console_sem).lock){-.-.}-{2:2}:
<4>[ 336.453487] __lock_acquire+0x15ad/0x2940
<4>[ 336.453492] lock_acquire+0xd3/0x310
<4>[ 336.453497] _raw_spin_lock_irqsave+0x33/0x50
<4>[ 336.453500] down_trylock+0xa/0x30
<4>[ 336.453504] __down_trylock_console_sem+0x25/0xa0
<4>[ 336.453509] console_trylock+0xe/0x60
<4>[ 336.453513] vprintk_emit+0x133/0x370
<4>[ 336.453518] _printk+0x53/0x6a
<4>[ 336.453523] __warn_printk+0x41/0x82
<4>[ 336.453528] native_smp_send_reschedule+0x2f/0x40
<4>[ 336.453533] check_preempt_curr+0x44/0x90
<4>[ 336.453538] ttwu_do_wakeup+0x14/0x230
<4>[ 336.453543] try_to_wake_up+0x257/0x830
<4>[ 336.453548] wake_bit_function+0x2e/0x60
<4>[ 336.453553] __wake_up_common+0x81/0x1a0
<4>[ 336.453559] __wake_up_common_lock+0x75/0xb0
<4>[ 336.453564] __wake_up_bit+0x4e/0x70
<4>[ 336.453568] end_buffer_write_sync+0x1b/0x40
<4>[ 336.453573] end_bio_bh_io_sync+0x1e/0x40
<4>[ 336.453577] blk_update_request+0x10d/0x4b0
<4>[ 336.453583] blk_mq_end_request+0x15/0x100
<4>[ 336.453587] blk_flush_complete_seq+0xde/0x320
<4>[ 336.453591] mq_flush_data_end_io+0x7d/0xf0
<4>[ 336.453594] blk_mq_dispatch_rq_list+0x62f/0x8e0
<4>[ 336.453599] __blk_mq_sched_dispatch_requests+0xad/0x130
<4>[ 336.453603] blk_mq_sched_dispatch_requests+0x2e/0x60
<4>[ 336.453606] __blk_mq_run_hw_queue+0x6b/0x1c0
<4>[ 336.453611] __blk_mq_delay_run_hw_queue+0x18b/0x1d0
<4>[ 336.453616] blk_mq_run_hw_queues+0x76/0xf0
<4>[ 336.453620] blk_mq_requeue_work+0x14b/0x170
<4>[ 336.453625] process_one_work+0x272/0x5c0
<4>[ 336.453629] worker_thread+0x37/0x370
<4>[ 336.453633] kthread+0xed/0x120
<4>[ 336.453636] ret_from_fork+0x1f/0x30
<4>[ 336.453639]
<4>[ 336.453639] other info that might help us debug this:
<4>[ 336.453639]
<4>[ 336.453640] Chain exists of:
<4>[ 336.453640] (console_sem).lock --> &p->pi_lock --> &rq->__lock
<4>[ 336.453640]
<4>[ 336.453645] Possible unsafe locking scenario:
<4>[ 336.453645]
<4>[ 336.453646] CPU0 CPU1
<4>[ 336.453647] ---- ----
<4>[ 336.453648] lock(&rq->__lock);
<4>[ 336.453650] lock(&p->pi_lock);
<4>[ 336.453653] lock(&rq->__lock);
<4>[ 336.453655] lock((console_sem).lock);
<4>[ 336.453657]
<4>[ 336.453657] *** DEADLOCK ***`
Edited by LAKSHMINARAYANA VUDUM