Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-11 Thread Vincent Guittot
On Wed, 10 Nov 2021 at 20:50, Sultan Alsawaf wrote: > > On Wed, Nov 10, 2021 at 10:00:35AM +0100, Vincent Guittot wrote: > > Is it the same SCHED_WARN_ON(rq->tmp_alone_branch != > > &rq->leaf_cfs_rq_list); that generates the deadlock on v5.15 too ? > > > > one remaining tmp_alone_branch warning ha

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-11 Thread Petr Mladek
On Wed 2021-11-10 10:37:26, Daniel Vetter wrote: > On Tue, Nov 09, 2021 at 10:38:47PM +0100, Peter Zijlstra wrote: > > On Tue, Nov 09, 2021 at 12:06:48PM -0800, Sultan Alsawaf wrote: > > > Hi, > > > > > > I encountered a printk deadlock on 5.13 which appears to still affect the > > > latest > > >

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-11 Thread John Ogness
On 2021-11-10, Sultan Alsawaf wrote: > On Wed, Nov 10, 2021 at 11:13:37AM +0106, John Ogness wrote: >> Even after we introduce kthread printers, there will still be >> situations where direct printing is used: booting (before kthreads >> exist) and shutdown/suspend/crash situations, when the kthre

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Sultan Alsawaf
On Wed, Nov 10, 2021 at 11:13:37AM +0106, John Ogness wrote: > Even after we introduce kthread printers, there will still be situations > where direct printing is used: booting (before kthreads exist) and > shutdown/suspend/crash situations, when the kthreads may not be > active. Although I'm unaw

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Sultan Alsawaf
On Wed, Nov 10, 2021 at 10:00:35AM +0100, Vincent Guittot wrote: > Is it the same SCHED_WARN_ON(rq->tmp_alone_branch != > &rq->leaf_cfs_rq_list); that generates the deadlock on v5.15 too ? > > one remaining tmp_alone_branch warning has been fixed in v5.15 with > 2630cde26711 ("sched/fair: Add ance

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Daniel Vetter
On Wed, Nov 10, 2021 at 12:20:05PM +0100, Peter Zijlstra wrote: > On Wed, Nov 10, 2021 at 11:50:38AM +0100, Petr Mladek wrote: > > On Tue 2021-11-09 12:06:48, Sultan Alsawaf wrote: > > > Hi, > > > > > > I encountered a printk deadlock on 5.13 which appears to still affect the > > > latest > > > k

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Peter Zijlstra
On Wed, Nov 10, 2021 at 11:50:38AM +0100, Petr Mladek wrote: > On Tue 2021-11-09 12:06:48, Sultan Alsawaf wrote: > > Hi, > > > > I encountered a printk deadlock on 5.13 which appears to still affect the > > latest > > kernel. The deadlock occurs due to printk being used while having the > > curr

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Daniel Vetter
On Wed, Nov 10, 2021 at 11:13:37AM +0106, John Ogness wrote: > On 2021-11-10, Daniel Vetter wrote: > > I'm a bit out of the loop but from lwn articles my understanding is > > that part of upstreaming from -rt we no longer have the explicit "I'm > > a safe console for direct printing" opt-in. Which

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread John Ogness
On 2021-11-10, Daniel Vetter wrote: > I'm a bit out of the loop but from lwn articles my understanding is > that part of upstreaming from -rt we no longer have the explicit "I'm > a safe console for direct printing" opt-in. Which I get from a > backwards compat pov, but I still think for at least

printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Sultan Alsawaf
Hi, I encountered a printk deadlock on 5.13 which appears to still affect the latest kernel. The deadlock occurs due to printk being used while having the current CPU's runqueue locked, and the underlying framebuffer console attempting to lock the same runqueue when printk tries to flush the log b

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Daniel Vetter
On Tue, Nov 09, 2021 at 10:38:47PM +0100, Peter Zijlstra wrote: > On Tue, Nov 09, 2021 at 12:06:48PM -0800, Sultan Alsawaf wrote: > > Hi, > > > > I encountered a printk deadlock on 5.13 which appears to still affect the > > latest > > kernel. The deadlock occurs due to printk being used while hav

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Vincent Guittot
On Tue, 9 Nov 2021 at 22:38, Peter Zijlstra wrote: > > On Tue, Nov 09, 2021 at 12:06:48PM -0800, Sultan Alsawaf wrote: > > Hi, > > > > I encountered a printk deadlock on 5.13 which appears to still affect the > > latest > > kernel. The deadlock occurs due to printk being used while having the >

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-09 Thread Peter Zijlstra
On Tue, Nov 09, 2021 at 12:06:48PM -0800, Sultan Alsawaf wrote: > Hi, > > I encountered a printk deadlock on 5.13 which appears to still affect the > latest > kernel. The deadlock occurs due to printk being used while having the current > CPU's runqueue locked, and the underlying framebuffer cons