From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D3C03909AA for ; Tue, 3 Mar 2026 10:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772532015; cv=none; b=pdw3WL8UTlMtwWpMHrW5SvD9H8mRcH+xT2szZTI6vEmCPi/QiZyhab59Ih6CT+8hcZI/A+7IaMSGCnX1YlEGnhXyP3Ycp6YerRDMPKxdcdzlIMkmyZouAgtVuJ8bVKbBOJdvw20SCQB6ZwPY1gjvQhK+owOrS5W0I+mWL6mloEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772532015; c=relaxed/simple; bh=J5WjIu0sURHNHqDPSVC5IKDCRXyhe6CQb6d57zt3/Jk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=W8C0Nq5Yk5VGW6yHDCQ6Bfry3BA6pRPj9CEndbJ/fxPfioeNOYbI1J4cmF4BDas35uWRN2qwILtzYa8w1utvQ78r12O1JEVzDvnqQsc0s0e7R1QbCJct/l2RYDwjcE38/cuxAFFnUSaGZwisnD88M9bQYiIaoUWQ/dlUIFXEii8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=EJsciUEL; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EJsciUEL" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4839fc4cef6so56898685e9.0 for ; Tue, 03 Mar 2026 02:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772532013; x=1773136813; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=J5WjIu0sURHNHqDPSVC5IKDCRXyhe6CQb6d57zt3/Jk=; b=EJsciUELB7DGgcfBniA/mbb1/8sIx9efbjkoH6htWmS0NVHJ5yPzFXlcsW6YCJyQYD 1ERQGKS9dUAXz3w2aU+fdZcZlJogp1AsVpsF5U3MphyBp5I1iOQia12Lv4WG55ThHIDG BecuidIRZKc2P4JZkdgEzwULSij6LH8N82mWIsFTgabl9CK8vV+Ron7M8X+Btbgm1+82 Z58YKtEllBrctim8UrBBMf2zGqJ0i04LnfLwdFjK0FiT8W3f5aAL0EIz1d44C2OIONAW XijPZ1KU8Oi0BBKhZ0jaodx8qyqkyffrytepyspkqo+CeaEBf/g5TLGmkfkJaqLfIbQb E94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772532013; x=1773136813; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=J5WjIu0sURHNHqDPSVC5IKDCRXyhe6CQb6d57zt3/Jk=; b=DdMYqbuAcEaeMxS+B76bdPcMO2jI1lz4plYhhMPERvzAIl4Bgm99Mus77pmNMl03PE rJdlhLoNkVpX4fl7rjXwjvN/0PzafRhbPxiToY/+qAtnroHpKFzvugKEom8zyWfdd9yv rb5lmsNc/u8Qu9jBMbX91IEVAuuhX2n0WGcWtmKRS2XHmj5awxuyzVj5BBoYyF+cd0JI ZOE2JGwAfb/mnLg3OY4+C2Ul/d/pnRMmBprZJco1Q5/+gXEQKVqitZn7ZSdhXMtsMpB4 Mu3gwVsOOVIVxk0oTnhiiTK7oelA8agoemH7BWPAiVdG4qp3j2GlBeFreHcAt5xrf03S eWeQ== X-Forwarded-Encrypted: i=1; AJvYcCVTvT8r7llzgx9VLU5JgHMXwZA45r3XsbsA7ZqHPf4w6uT9oOXTVD7UqCN5VFAtY2hOxkVw228n0jTxX5Q=@vger.kernel.org X-Gm-Message-State: AOJu0YzZ/BYaLXPH25H/PpGL70LOD4qPVf9xW62XFduBGbNRWGfEAFms wrB19nxFcRZ8EINOVXH9/P5kEITn5ehRHHj3D//LP9c9NEaTew1Ps9YodZiaF7oWWYGflJjuNzA c4vHbhm0pymDru6Xc8w== X-Received: from wmdd1.prod.google.com ([2002:a05:600c:a201:b0:480:3227:a124]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3ba0:b0:483:4b37:8620 with SMTP id 5b1f17b1804b1-48513a74e6amr28399965e9.10.1772532012583; Tue, 03 Mar 2026 02:00:12 -0800 (PST) Date: Tue, 3 Mar 2026 10:00:11 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: Message-ID: Subject: Re: [CRASH] kunit failures in platform-device-devm From: Alice Ryhl To: David Gow Cc: Greg Kroah-Hartman , Frederic Weisbecker , Waiman Long , Marco Crivellari , Michal Hocko , Peter Zijlstra , Tejun Heo , Thomas Gleixner , Vlastimil Babka , "Rafael J. Wysocki" , Danilo Krummrich , driver-core@lists.linux.dev, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 03, 2026 at 08:45:42AM +0800, David Gow wrote: > Le 02/03/2026 =C3=A0 11:32 PM, Alice Ryhl a =C3=A9crit=C2=A0: > > On Sun, Mar 01, 2026 at 02:06:49PM +0000, Alice Ryhl wrote: > > > Hi DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS, > > >=20 > > > I've experienced a fair number of different crashes when running kuni= t > > > locally. I just ran this command on v7.0-rc1 or upstream/master: > > >=20 > > > ./tools/testing/kunit/kunit.py run --make_options LLVM=3D1 --arch x86= _64 --kconfig_add CONFIG_RUST=3Dy --kconfig_add CONFIG_PCI=3Dy > >=20 > > Bisection has been carried out! > >=20 > > The culprit is commit 5564c12385b7 ("kthread: Include unbound kthreads > > in the managed affinity list"). Cc'ing everyone from this commit. > >=20 > > 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. > >=20 > > The same crashes occur on tag v7.0-rc2, so this issue is not fixed. > >=20 >=20 > 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? >=20 > Could you try the patch here, and see if that fixes it: > https://lore.kernel.org/all/20260226-ungeziefer-erzfeind-13425179c7b2@bra= uner/ Yes, that seems to fix it. Applying that patch on v7.0-rc2 results in no crashes for me. (16/16 success) Alice