Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1162269rwd; Thu, 25 May 2023 08:47:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ64DlWBywv18mEDYjbK9so+0B4G8ohKh/kZr0jWPns/WCzZcjWdHGUpH3t2LDeDQs7yLhgp X-Received: by 2002:a17:902:ecc9:b0:1af:cbdb:9772 with SMTP id a9-20020a170902ecc900b001afcbdb9772mr2491789plh.18.1685029674338; Thu, 25 May 2023 08:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685029674; cv=none; d=google.com; s=arc-20160816; b=FSzYuzrYWe2OGaIKZ+4m0+VEgynjc/HxU5ASG951FHldIBftqXIFa6ABGdFlEKZMfK Y7B6KjLCE2Ro5eUvhfAhkny77Yuio5CsQHC1z6yYf2ngTdl0vFSGrKJHFwm/OYrRF503 onP4VR9w8hu9awqJEAv3PL6siECAEHBJKLqAKx/c34lDvQ19Wv6CDu2MrFfjiwXrRe8k zsE10MtkFcihJ5I6YbwykyMngkfWIYmB6KxVDwYBTAPUX/JO0ZdQgSVgur5x99AqMTSc FcpZM6dRP5I75ImFM7NrH170uCmaFIkjUgQx5MiYkD4m+oM4hq6FTj0tWCbVpORmX1Wq EK7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QUuvOZp4ohZVs+06f+xW0E2DzMyZOkJ0sYTaDlgT1vs=; b=0bZBEELpcUpHZcgisTOKfqQJ08DMzQz47atb/5iy3XHgfd+mlcKiCg+hUo+d4aoCRc 5S+mL7e2z1yaW5iNYGhIuydD2mECKaY1vk8GPLXJUHuzApvjkH0mci9gp+XhlqsFRwPi 8bQK5f8HJtpjMmJ2gtBGwb4sVkxsgmzneoqOGGqV0yHd641y1OT8PdgAVvUqdUeQ0Twe mQVGL2h00hUkd95E5wpQc0OQc+kuQRfZmpS1SzC3Iea/Gkzg7IB4jGLLr/x4ynIhXDB7 6BaO96zrnWY85K+cip1rVTHSeIbNSlUCxn+b66XyWVjhAq/SnPtkTxqlbVUzUeSFE8wK Ulnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=f82LooSd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a12-20020a170902eccc00b001afe1d16369si517904plh.420.2023.05.25.08.47.39; Thu, 25 May 2023 08:47:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=f82LooSd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241745AbjEYPVc (ORCPT + 99 others); Thu, 25 May 2023 11:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241309AbjEYPVb (ORCPT ); Thu, 25 May 2023 11:21:31 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 213F9194 for ; Thu, 25 May 2023 08:21:29 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-ba8cf3cb34fso997585276.1 for ; Thu, 25 May 2023 08:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1685028088; x=1687620088; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QUuvOZp4ohZVs+06f+xW0E2DzMyZOkJ0sYTaDlgT1vs=; b=f82LooSd7Z8HPJYxwPF9j5/XV5x/T1dTocoQbusc6c1IUKGSUAuk9Ir1SOkxO0WNbN b2opwYAOqYOC4KkwzFjmYl168YBnmaOSz/DleuyrzHukBjDwPyLhgHqlAy/6nc9XqxKv /gwu60eypgCA/tV78al/ca4tdpRg6RRfpASV0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685028088; x=1687620088; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QUuvOZp4ohZVs+06f+xW0E2DzMyZOkJ0sYTaDlgT1vs=; b=Zq3XFaFC2Omcg93KXB9E7lGmmIhT8WLRGAXpdlT7O6UCvEi2RkW60HFfHUq05kHeL9 HgOo31Zl2aQq71v39cPmZXt1mJibgqxnxpfbHGKwOnurJtZyzdN8LPyMfLe3lYsdhx36 z7/OZL8dEU5LaGZQ2+7EnUlmb+gXrK4UyTbyREbtdcEg49Qc2/BcfrcYyfC7nBddJctk yhhEKzw79PX68t1wY3SflW7WTut+lumIA144vD6KjoawVq6aMH2/lA+LkYvR3tN/zVnP 0JpvR1D8f4HtnSHh61ZDV4wdd9BNNpEJ85Iskb1IcVp62hJQqj7zOCSf8CwiFwvUG0pY ddlw== X-Gm-Message-State: AC+VfDyxrbguON6zE9QOl3o6wabnIO7ZC3MG2CwxMgI/qqaHgMdKRQML cHMOd12tUCLmFRqLQ5bJ2iyfNp32KHyNZkbuPZwDHA== X-Received: by 2002:a25:73cc:0:b0:ba7:46b3:5c91 with SMTP id o195-20020a2573cc000000b00ba746b35c91mr3107549ybc.2.1685028088239; Thu, 25 May 2023 08:21:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joel Fernandes Date: Thu, 25 May 2023 11:21:17 -0400 Message-ID: Subject: Re: Perf: RIP: 0010:__schedule on qemu-x86_64 To: Naresh Kamboju Cc: open list , linux-stable , linux-perf-users@vger.kernel.org, rcu , lkft-triage@lists.linaro.org, Peter Zijlstra , "Paul E. McKenney" , Arnaldo Carvalho de Melo , Ingo Molnar , Vincent Guittot , Juri Lelli , Dan Carpenter , Arnaldo Carvalho de Melo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Naresh, On Wed, May 24, 2023 at 5:02=E2=80=AFAM Naresh Kamboju wrote: > > Following kernel crash noticed while running perf testing on qemu-x86_64 > with stable-rc 6.3.4-rc2 + kselftest merge configs. > > Reported-by: Linux Kernel Functional Testing > > logs: > =3D=3D=3D=3D=3D > INFO: Performing perf record test... > > Parse sched tracepoints fields: Ok > 16: syscalls:sys_enter_openat event fields : > --- start --- > test child forked, pid 255 > <4>[ 152.221288] int3: 0000 [#1] PREEMPT SMP PTI > <4>[ 152.221564] CPU: 0 PID: 255 Comm: perf Not tainted 6.3.4-rc2 #1 > <4>[ 152.221607] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), > BIOS 1.14.0-2 04/01/2014 > <4>[ 152.221733] RIP: 0010:__schedule+0x29e/0xaa0 > <4>[ 152.222066] Code: 00 48 29 c1 49 01 8e 48 04 00 00 48 85 db 74 > 0f 48 01 8b 90 0c 00 00 48 83 83 88 0c 00 00 01 0f 1f 44 00 00 0f 1f > 44 00 00 e9 <7a> 01 00 00 49 0f ba ac 24 18 0a 00 00 00 49 83 bc 24 08 > 0a 00 00 > <4>[ 152.222122] RSP: 0018:ffff94aec0677bc0 EFLAGS: 00000046 > <4>[ 152.222170] RAX: ffffffffa2e10900 RBX: ffff8b517bc2b700 RCX: > 0000000000000004 > <4>[ 152.222184] RDX: 00000023711138c0 RSI: 0000000000000000 RDI: > ffff8b517bc2b700 > <4>[ 152.222197] RBP: ffff94aec0677c28 R08: ffff8b5102aa6a00 R09: > 000000000000004e > <4>[ 152.222211] R10: 0000000000000001 R11: 0000000000000001 R12: > ffff8b51009e3c00 > <4>[ 152.222223] R13: ffffffffa2cf3f48 R14: ffffffffa2e10900 R15: > ffff8b51009e4248 > <4>[ 152.222275] FS: 00007f6b8ea81800(0000) > GS:ffff8b517bc00000(0000) knlGS:0000000000000000 > <4>[ 152.222294] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > <4>[ 152.222308] CR2: 00007f6b8dd204e0 CR3: 0000000105a1c000 CR4: > 00000000000006f0 > <4>[ 152.222409] Call Trace: > <4>[ 152.222500] > <4>[ 152.222605] schedule+0x6a/0xf0 > <4>[ 152.222664] schedule_timeout+0x14f/0x160 > <4>[ 152.222680] wait_for_completion+0x8c/0x140 > <4>[ 152.222696] __wait_rcu_gp+0x13e/0x140 > <4>[ 152.222712] synchronize_rcu+0x12f/0x140 > <4>[ 152.222731] ? __pfx_call_rcu_hurry+0x10/0x10 > <4>[ 152.222748] ? __pfx_wakeme_after_rcu+0x10/0x10 > <4>[ 152.222766] perf_event_alloc+0xd53/0xdc0 > <4>[ 152.222783] ? preempt_count_sub+0x50/0x80 > <4>[ 152.222795] ? _raw_spin_unlock+0x1a/0x40 > <4>[ 152.222810] __do_sys_perf_event_open+0x1df/0xd10 > <4>[ 152.222838] __x64_sys_perf_event_open+0x26/0x30 > <4>[ 152.222849] do_syscall_64+0x3e/0x90 > <4>[ 152.222863] entry_SYSCALL_64_after_hwframe+0x72/0xdc > <4>[ 152.222920] RIP: 0033:0x7f6b8dd204f9 > <4>[ 152.223150] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 > 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c > 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d7 08 0d 00 f7 d8 64 > 89 01 48 > <4>[ 152.223158] RSP: 002b:00007ffd51880f68 EFLAGS: 00000202 > ORIG_RAX: 000000000000012a > <4>[ 152.223175] RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: > 00007f6b8dd204f9 > <4>[ 152.223181] RDX: 0000000000000000 RSI: 00000000000000ff RDI: > 000055e658912b50 > <4>[ 152.223187] RBP: 00007ffd51881030 R08: 0000000000000008 R09: > 00007ffd51881090 > <4>[ 152.223192] R10: 00000000ffffffff R11: 0000000000000202 R12: > 0000000000000008 > <4>[ 152.223198] R13: 0000000000000000 R14: 0000000000000000 R15: > 000055e658912b40 > <4>[ 152.223246] > <4>[ 152.223308] Modules linked in: > <4>[ 152.247884] ---[ end trace 0000000000000000 ]--- > <4>[ 152.248004] RIP: 0010:__schedule+0x29e/0xaa0 > <4>[ 152.248051] Code: 00 48 29 c1 49 01 8e 48 04 00 00 48 85 db 74 > 0f 48 01 8b 90 0c 00 00 48 83 83 88 0c 00 00 01 0f 1f 44 00 00 0f 1f > 44 00 00 e9 <7a> 01 00 00 49 0f ba ac 24 18 0a 00 00 00 49 83 bc 24 08 > 0a 00 00 > <4>[ 152.248066] RSP: 0018:ffff94aec0677bc0 EFLAGS: 00000046 > <4>[ 152.248089] RAX: ffffffffa2e10900 RBX: ffff8b517bc2b700 RCX: > 0000000000000004 > <4>[ 152.248099] RDX: 00000023711138c0 RSI: 0000000000000000 RDI: > ffff8b517bc2b700 > <4>[ 152.248269] RBP: ffff94aec0677c28 R08: ffff8b5102aa6a00 R09: > 000000000000004e > <4>[ 152.248282] R10: 0000000000000001 R11: 0000000000000001 R12: > ffff8b51009e3c00 > <4>[ 152.248294] R13: ffffffffa2cf3f48 R14: ffffffffa2e10900 R15: > ffff8b51009e4248 > <4>[ 152.248304] FS: 00007f6b8ea81800(0000) > GS:ffff8b517bc00000(0000) knlGS:0000000000000000 > <4>[ 152.248316] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > <4>[ 152.248479] CR2: 00007f6b8dd204e0 CR3: 0000000105a1c000 CR4: > 00000000000006f0 > <0>[ 152.248663] Kernel panic - not syncing: Fatal exception in interrup= t > <4>[ 152.248980] int3: 0000 [#2] PREEMPT SMP PTI > <4>[ 152.249101] CPU: 1 PID: 32 Comm: kworker/u4:3 Tainted: G D > 6.3.4-rc2 #1 > <4>[ 152.249124] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), > BIOS 1.14.0-2 04/01/2014 > <4>[ 152.249292] Workqueue: 0x0 (events_unbound) > <4>[ 152.249420] RIP: 0010:__schedule+0x29e/0xaa0 > <4>[ 152.249471] Code: 00 48 29 c1 49 01 8e 48 04 00 00 48 85 db 74 > 0f 48 01 8b 90 0c 00 00 48 83 83 88 0c 00 00 01 0f 1f 44 00 00 0f 1f > 44 00 00 e9 <7a> 01 00 00 49 0f ba ac 24 18 0a 00 00 00 49 83 bc 24 08 > 0a 00 00 > <4>[ 152.249486] RSP: 0018:ffff94aec0117e38 EFLAGS: 00000046 > <4>[ 152.249502] RAX: ffff8b51002d8000 RBX: ffff8b517bd2b700 RCX: > 0000000000000004 > <4>[ 152.249512] RDX: 0000002372bd853f RSI: ffffffffffa7caff RDI: > ffff8b517bd2b700 > <4>[ 152.249522] RBP: ffff94aec0117ea0 R08: 0000000000000400 R09: > 0000000000000361 > <4>[ 152.249532] R10: 0000000000000001 R11: 0000000000000000 R12: > ffff8b51008a0f00 > <4>[ 152.249542] R13: ffffffffa2cf3f48 R14: ffff8b51002d8000 R15: > ffff8b51008a1548 > <4>[ 152.249552] FS: 0000000000000000(0000) > GS:ffff8b517bd00000(0000) knlGS:0000000000000000 > <4>[ 152.249565] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > <4>[ 152.249576] CR2: 00007ffd518816b8 CR3: 000000010591e000 CR4: > 00000000000006e0 > <4>[ 152.249588] Call Trace: > <4>[ 152.249603] > <4>[ 152.249636] schedule+0x6a/0xf0 > <4>[ 152.249658] worker_thread+0xc0/0x3e0 > <4>[ 152.249684] ? __pfx_worker_thread+0x10/0x10 > <4>[ 152.249704] kthread+0xfc/0x120 > <4>[ 152.249721] ? __pfx_kthread+0x10/0x10 I wonder if this is a deadlock related to runqueue lock since another CPU call stack are similarly in schedule. I tried to run gdb on your vmlinux but it does not have symbols, would it be possible for you to provide a copy of vmlinux with symbols? Were you able to narrow down the commit/release using git bisect to see when it started happening? Thank you, - Joel