All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: David Gow <david@davidgow.net>,
	Christian Brauner <brauner@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alice Ryhl <aliceryhl@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Waiman Long <longman@redhat.com>,
	Marco Crivellari <marco.crivellari@suse.com>,
	Michal Hocko <mhocko@suse.com>,
	Peter Zijlstra <peterz@infradead.org>, Tejun Heo <tj@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Vlastimil Babka <vbabka@suse.cz>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	driver-core@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [CRASH] kunit failures in platform-device-devm
Date: Tue, 3 Mar 2026 11:32:46 +0100	[thread overview]
Message-ID: <aaa4ztnTrK3CIbhS@pavilion.home> (raw)
In-Reply-To: <a5e8670e-1b39-4b83-bd65-2584fa382d5e@davidgow.net>

Le Tue, Mar 03, 2026 at 08:45:42AM +0800, David Gow a écrit :
> Le 02/03/2026 à 11:32 PM, Alice Ryhl a écrit :
> > On Sun, Mar 01, 2026 at 02:06:49PM +0000, Alice Ryhl wrote:
> > > Hi DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS,
> > > 
> > > I've experienced a fair number of different crashes when running kunit
> > > locally. I just ran this command on v7.0-rc1 or upstream/master:
> > > 
> > > ./tools/testing/kunit/kunit.py run --make_options LLVM=1 --arch x86_64 --kconfig_add CONFIG_RUST=y --kconfig_add CONFIG_PCI=y
> > 
> > Bisection has been carried out!
> > 
> > The culprit is commit 5564c12385b7 ("kthread: Include unbound kthreads
> > in the managed affinity list"). Cc'ing everyone from this commit.
> > 
> > On this commit, kunit (executed using above command) crashes for me 70%
> > of the time (14 out of 20 runs) with kernel crashes (Oops) and
> > refcount_t use-after-free warnings in pm_runtime_test_cases and
> > platform-device-devm. On the parent commit, I was able to run kunit 24
> > times in a row with zero kunit failures.
> > 
> > The same crashes occur on tag v7.0-rc2, so this issue is not fixed.
> > 
> 
> Hmm... I've not been able to reproduce any crashes with stacktraces which
> look similar to yours, but given the bisection, could this be the kthread
> exit use-after-free?
> 
> Could you try the patch here, and see if that fixes it:
> https://lore.kernel.org/all/20260226-ungeziefer-erzfeind-13425179c7b2@brauner/

Urgh, I missed that one. Thanks a lot! Can someone bounce it to me for review as
it's not on LKML? Namely it would be nice to remove kthread_exit() on the
callsites (there aren't that many) and call do_exit() directly?

Thanks.

-- 
Frederic Weisbecker
SUSE Labs

  parent reply	other threads:[~2026-03-03 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-01 14:06 [CRASH] kunit failures in platform-device-devm Alice Ryhl
2026-03-01 20:17 ` Greg Kroah-Hartman
2026-03-01 21:21   ` Alice Ryhl
2026-03-02 12:31 ` Sasha Levin
2026-03-02 15:32 ` Alice Ryhl
2026-03-03  0:45   ` David Gow
2026-03-03 10:00     ` Alice Ryhl
2026-03-03 10:32     ` Frederic Weisbecker [this message]
2026-03-03  0:50   ` Frederic Weisbecker
2026-03-02 15:52 ` Alice Ryhl

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=aaa4ztnTrK3CIbhS@pavilion.home \
    --to=frederic@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=brauner@kernel.org \
    --cc=dakr@kernel.org \
    --cc=david@davidgow.net \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=marco.crivellari@suse.com \
    --cc=mhocko@suse.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.