linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wander Lairson Costa <wander@redhat.com>
To: luca abeni <luca.abeni@santannapisa.it>
Cc: Daniel Bristot de Oliveira <bristot@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Stafford Horne <shorne@gmail.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Andy Lutomirski <luto@kernel.org>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Andrei Vagin <avagin@gmail.com>,
	open list <linux-kernel@vger.kernel.org>,
	Paul McKenney <paulmck@kernel.org>
Subject: Re: [PATCH v2 1/4] sched/task: Add the put_task_struct_atomic_safe function
Date: Fri, 24 Feb 2023 10:02:40 -0300	[thread overview]
Message-ID: <20230224130240.dzbtk7w564heup3d@fedora> (raw)
In-Reply-To: <20230224094648.69cfa411@luca64>

On Fri, Feb 24, 2023 at 09:46:48AM +0100, luca abeni wrote:
> On Wed, 22 Feb 2023 22:00:34 +0100
> luca abeni <luca.abeni@santannapisa.it> wrote:
> 
> > On Wed, 22 Feb 2023 15:42:37 -0300
> > Wander Lairson Costa <wander@redhat.com> wrote:
> > [...]
> > > > I triggered this "BUG: Invalid wait context" with a 5.15.76
> > > > kernel, without PREEMPT_RT. I can reproduce it easily on a
> > > > KVM-based VM; if more information or tests are needed, let me
> > > > know. 
> > > 
> > > Does it happen in linux-6.1 or linux-6.2?  
> > 
> > I only tried with 5.15.76... I am going to test 6.2 and I'll let you
> > know ASAP.
> 
> For various reasons it took more time than expected, but I managed to
> reproduce the bug with 6.2... Here are the relevant kernel messages:
> 
> [ 1246.556100] =============================
> [ 1246.559104] [ BUG: Invalid wait context ]
> [ 1246.562270] 6.2.0 #4 Not tainted
> [ 1246.564854] -----------------------------
> [ 1246.567260] swapper/3/0 is trying to lock:
> [ 1246.568665] ffff8c2c7ebb2c10 (&c->lock){..-.}-{3:3}, at: put_cpu_partial+0x24/0x1c0
> [ 1246.571325] other info that might help us debug this:
> [ 1246.573045] context-{2:2}
> [ 1246.574166] no locks held by swapper/3/0.
> [ 1246.575434] stack backtrace:
> [ 1246.576207] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 6.2.0 #4
> [ 1246.578184] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
> [ 1246.580815] Call Trace:
> [ 1246.581723]  <IRQ>
> [ 1246.582570]  dump_stack_lvl+0x49/0x61
> [ 1246.583860]  __lock_acquire.cold+0xc8/0x31c
> [ 1246.584923]  ? __lock_acquire+0x3be/0x1df0
> [ 1246.585915]  lock_acquire+0xce/0x2f0
> [ 1246.586819]  ? put_cpu_partial+0x24/0x1c0
> [ 1246.588177]  ? lock_is_held_type+0xdb/0x130
> [ 1246.589519]  put_cpu_partial+0x5b/0x1c0
> [ 1246.590996]  ? put_cpu_partial+0x24/0x1c0
> [ 1246.592212]  inactive_task_timer+0x263/0x4c0
> [ 1246.593509]  ? __pfx_inactive_task_timer+0x10/0x10
> [ 1246.594953]  __hrtimer_run_queues+0x1bf/0x470
> [ 1246.596297]  hrtimer_interrupt+0x117/0x250
> [ 1246.597528]  __sysvec_apic_timer_interrupt+0x99/0x270
> [ 1246.599015]  sysvec_apic_timer_interrupt+0x8d/0xc0
> [ 1246.600416]  </IRQ>
> [ 1246.601170]  <TASK>
> [ 1246.601918]  asm_sysvec_apic_timer_interrupt+0x1a/0x20
> [ 1246.603377] RIP: 0010:default_idle+0xf/0x20
> [ 1246.604640] Code: f6 5d 41 5c e9 72 4a 6e ff cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 03 52 2a 00 fb f4 <c3> cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90
> [ 1246.609718] RSP: 0018:ffffa1a2c009bed0 EFLAGS: 00000202
> [ 1246.611259] RAX: ffffffffa4961a60 RBX: ffff8c2c4126b000 RCX: 0000000000000000
> [ 1246.613230] RDX: 0000000000000000 RSI: ffffffffa510271b RDI: ffffffffa50d5b15
> [ 1246.615266] RBP: 0000000000000003 R08: 0000000000000001 R09: 0000000000000001
> [ 1246.617275] R10: 0000000000000000 R11: ffff8c2c4126b000 R12: ffff8c2c4126b000
> [ 1246.619318] R13: ffff8c2c4126b000 R14: 0000000000000000 R15: 0000000000000000
> [ 1246.621293]  ? __pfx_default_idle+0x10/0x10
> [ 1246.622581]  default_idle_call+0x71/0x220
> [ 1246.623790]  do_idle+0x210/0x290
> [ 1246.624827]  cpu_startup_entry+0x18/0x20
> [ 1246.626016]  start_secondary+0xf1/0x100
> [ 1246.627200]  secondary_startup_64_no_verify+0xe0/0xeb
> [ 1246.628707]  </TASK>
> 
> 
> Let me know if you need more information, or
> I should run other tests/experiments.
> 

This seems to be a different (maybe related?) issue. Would you mind
sharing your .config and steps to reproduce it?

> 
> 				Luca
> 


  reply	other threads:[~2023-02-24 13:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 15:02 [PATCH v2 0/4] Fix put_task_struct() calls under PREEMPT_RT Wander Lairson Costa
2023-01-20 15:02 ` [PATCH v2 1/4] sched/task: Add the put_task_struct_atomic_safe function Wander Lairson Costa
2023-01-23 16:30   ` Oleg Nesterov
2023-01-23 16:49     ` Oleg Nesterov
2023-01-23 17:24     ` Wander Lairson Costa
2023-01-27 15:55       ` Valentin Schneider
2023-01-30 11:49         ` Wander Lairson Costa
2023-01-30 14:46           ` Valentin Schneider
2023-01-30 14:58             ` Wander Lairson Costa
2023-01-30 15:20               ` Valentin Schneider
2023-02-17 17:35           ` Daniel Bristot de Oliveira
2023-02-17 19:04             ` luca abeni
2023-02-22 18:42               ` Wander Lairson Costa
2023-02-22 21:00                 ` luca abeni
2023-02-24  8:46                   ` luca abeni
2023-02-24 13:02                     ` Wander Lairson Costa [this message]
2023-02-24 16:01                       ` luca abeni
2023-01-20 15:02 ` [PATCH v2 2/4] sched/deadline: fix inactive_task_timer splat Wander Lairson Costa
2023-01-20 15:02 ` [PATCH v2 3/4] sched/rt: use put_task_struct_atomic_safe() to avoid potential splat Wander Lairson Costa
2023-01-25  0:16   ` Steven Rostedt
2023-01-20 15:02 ` [PATCH v2 4/4] sched/core: " Wander Lairson Costa
2023-01-20 17:45 ` [PATCH v2 0/4] Fix put_task_struct() calls under PREEMPT_RT Valentin Schneider
2023-01-20 20:14   ` Wander Lairson Costa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230224130240.dzbtk7w564heup3d@fedora \
    --to=wander@redhat.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=ebiederm@xmission.com \
    --cc=fenghua.yu@intel.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.abeni@santannapisa.it \
    --cc=luto@kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=shorne@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).