[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250910181952.GU3289052@noisy.programming.kicks-ass.net>
Date: Wed, 10 Sep 2025 20:19:52 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Andrea Righi <arighi@...dia.com>
Cc: tj@...nel.org, linux-kernel@...r.kernel.org, mingo@...hat.com,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, vschneid@...hat.com, longman@...hat.com,
hannes@...xchg.org, mkoutny@...e.com, void@...ifault.com,
changwoo@...lia.com, cgroups@...r.kernel.org,
sched-ext@...ts.linux.dev, liuwenfang@...or.com, tglx@...utronix.de
Subject: Re: [PATCH 00/14] sched: Support shared runqueue locking
On Wed, Sep 10, 2025 at 07:32:12PM +0200, Andrea Righi wrote:
> I've done a quick test with this patch set applied and I was able to
> trigger this:
>
> [ 49.746281] ============================================
> [ 49.746457] WARNING: possible recursive locking detected
> [ 49.746559] 6.17.0-rc4-virtme #85 Not tainted
> [ 49.746666] --------------------------------------------
> [ 49.746763] stress-ng-race-/5818 is trying to acquire lock:
> [ 49.746856] ffff890e0adacc18 (&dsq->lock){-.-.}-{2:2}, at: dispatch_dequeue+0x125/0x1f0
> [ 49.747052]
> [ 49.747052] but task is already holding lock:
> [ 49.747234] ffff890e0adacc18 (&dsq->lock){-.-.}-{2:2}, at: task_rq_lock+0x6c/0x170
> [ 49.747416]
> [ 49.747416] other info that might help us debug this:
> [ 49.747557] Possible unsafe locking scenario:
> [ 49.747557]
> [ 49.747689] CPU0
> [ 49.747740] ----
> [ 49.747793] lock(&dsq->lock);
> [ 49.747867] lock(&dsq->lock);
> [ 49.747950]
> [ 49.747950] *** DEADLOCK ***
> [ 49.747950]
> [ 49.748086] May be due to missing lock nesting notation
> [ 49.748086]
> [ 49.748197] 3 locks held by stress-ng-race-/5818:
> [ 49.748335] #0: ffff890e0f0fce70 (&p->pi_lock){-.-.}-{2:2}, at: task_rq_lock+0x38/0x170
> [ 49.748474] #1: ffff890e3b6bcc98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x20/0xa0
> [ 49.748652] #2: ffff890e0adacc18 (&dsq->lock){-.-.}-{2:2}, at: task_rq_lock+0x6c/0x170
>
> Reproducer:
>
> $ cd tools/sched_ext
> $ make scx_simple
> $ sudo ./build/bin/scx_simple
> ... and in another shell
> $ stress-ng --race-sched 0
Heh, the selftests thing was bound to not cover everything. I'll have a
poke at it. Thanks!
Powered by blists - more mailing lists