From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E5D615ECED for ; Wed, 24 Jul 2024 16:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721840171; cv=none; b=soTTXO+mD2WlqGWIIOt4oKxwrF66Uic9TlzWbSUk1wZ9qZe/PtnUoRXwCSiFkCHfzsVQ2AE4C0Gpb0YtKdqSmsU6w7qoMYYcb0AwdIqoLkj9L8iDoLt/Xlj8plgNO4uaCVsPCvQbDru2/7aMVrZqMRACGHTi6S5RHkx08yB8feo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721840171; c=relaxed/simple; bh=k9h19ACd5WZ3BWCnQmTeZD26bDYJxXDKaFLdGVKtJEA=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=aUtnvqS9yTKwHpvnFT5voDxkVocMTnp22ISC5UPIT237wqEoE8k/GLcQLv2cGnzBDLVeQ9tglv/caaj0rLlM1c2vMPqlVj2DTx+otfPU6VL1lR5HKZo6hFJhlTqmzA1orlZYidnUmCpiEEZnXms1FMCmxHMPfwYO5MZT+iCu1UM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=shelob.surriel.com; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shelob.surriel.com Received: from [2601:18c:9101:a8b6:6e0b:84ff:fee2:98bb] (helo=imladris.surriel.com) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1sWfGp-000000001o4-2Z2p; Wed, 24 Jul 2024 12:55:19 -0400 Message-ID: <81f7efa849630aed6a4a995825ea911f6d58cbd7.camel@surriel.com> Subject: Re: [RFC PATCH] nmi,printk: fix ABBA deadlock between nmi_backtrace and dump_stack_lvl From: Rik van Riel To: Petr Mladek , John Ogness Cc: Andrew Morton , Omar Sandoval , linux-kernel@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky , kernel-team Date: Wed, 24 Jul 2024 12:55:19 -0400 In-Reply-To: References: <20240715232052.73eb7fb1@imladris.surriel.com> <87plrcqyii.fsf@jogness.linutronix.de> <93155b2ccafa43ed4845ae450451c6b8e27509cc.camel@surriel.com> <87r0brkvqd.fsf@jogness.linutronix.de> <877cdilrko.fsf@jogness.linutronix.de> Autocrypt: addr=riel@surriel.com; prefer-encrypt=mutual; keydata=mQENBFIt3aUBCADCK0LicyCYyMa0E1lodCDUBf6G+6C5UXKG1jEYwQu49cc/gUBTTk33Aeo2hjn4JinVaPF3zfZprnKMEGGv4dHvEOCPWiNhlz5RtqH3SKJllq2dpeMS9RqbMvDA36rlJIIo47Z/nl6IA8MDhSqyqdnTY8z7LnQHqq16jAqwo7Ll9qALXz4yG1ZdSCmo80VPetBZZPw7WMjo+1hByv/lvdFnLfiQ52tayuuC1r9x2qZ/SYWd2M4p/f5CLmvG9UcnkbYFsKWz8bwOBWKg1PQcaYHLx06sHGdYdIDaeVvkIfMFwAprSo5EFU+aes2VB2ZjugOTbkkW2aPSWTRsBhPHhV6dABEBAAG0HlJpayB2YW4gUmllbCA8cmllbEByZWRoYXQuY29tPokBHwQwAQIACQUCW5LcVgIdIAAKCRDOed6ShMTeg05SB/986ogEgdq4byrtaBQKFg5LWfd8e+h+QzLOg/T8mSS3dJzFXe5JBOfvYg7Bj47xXi9I5sM+I9Lu9+1XVb/r2rGJrU1DwA09TnmyF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efyrEYSh8KTm8dQj4O7xxvdg865TLeLpho5PwDRF+/mR3qi8CdGbkEc4pYZQO8UDXUN4S+pe0aTeTqlYw8rRHWF9TnvtpcNzZw== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sender: riel@surriel.com On Wed, 2024-07-24 at 14:56 +0200, Petr Mladek wrote: > On Thu 2024-07-18 16:15:43, John Ogness wrote: >=20 > >=20 > > However, my first suggestion to defer whenever the cpu_sync is held > > really is the only option because console_unlock() will spin on the > > uart > > port lock, and that is also not allowed when holding the cpu_sync. >=20 > It would have helped if Rick added backtraces from the crash dumps. > He just wrote: >=20 I would have preferred that, as well. However, this deadlock prevent us from capturing a good backtrace of the CPU that was stuck on the lock while in the NMI handler! We ended up having to dig through the NMI stack of the stuck CPU by hand, looking for anything that might be a function address, and guess at what the CPU was doing. This deadlock not only prevented the CPU printing, but also from dumping its register state at panic time before the kdump kernel was kexeced. --=20 All Rights Reversed.