Received: by 2002:a9d:6f94:0:b0:61c:59f3:9354 with SMTP id h20csp163580otq; Thu, 14 Jul 2022 18:48:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vhtCUlM/E4frsnv51aCHuL8I2KS/ZI1BTF2r7a1tsdCBm5uaONLb3yYz75MsPZNOAJKVGj X-Received: by 2002:a17:906:cc0c:b0:72b:68df:8aff with SMTP id ml12-20020a170906cc0c00b0072b68df8affmr11449915ejb.226.1657849732042; Thu, 14 Jul 2022 18:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657849732; cv=none; d=google.com; s=arc-20160816; b=mXeiwzTbWrEuJ6peyFsjPQtXvdAsSve1Ld8X2yaz/su69+YnyqHnPfXxKVErjYbJne 0mVDihf9cIKaPsZUOT8R0Zm6r/lZSIiVmg/YV5A3uxlCntrHlD6aI/la3xZ6iti5UXGS 3byg/G0PLBYPyMRtvDxILXiRyqCYW/209UjMXacPUq85YG83J+iDIbgDng5H/BJXg0SU I/KRkqhT2QvAKM9KBkTtkNNwgqXhMO0m/bP2MVzV4VKuiidkHKB4zy+ipyrzkEMTcwLJ QRgZDWFr2NMn/zkQLLJedZgagKZ5WyWVrtyu/NL0c9yzYSShoAMiJ04jRVLtz26wN6EF XTxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=u/U2xaa/vsw5f/HwUYz7caI2/KRVjJ8EhiCQx4+NJbM=; b=NZaWgOcU9vHeDVgm7Wk7xfG0v5B2rEeTxiVNhKGBKlPr0o/JcuQhSNLv075T14Ym50 QRFKQRMeH/i/7A4mfIP6IbJsUDVeL8IUZmRst2wztz5lW8/Uyk1/GL8GIEE1IytjqRwn wDO7XmZ93UPEuUI31mVj53/9s+rEsWG+b53EtbHtrDRG7VAEdLcmc+4f8c0FWIrXfNgp l85Yz2SNB9OOG8l+PZUKxYoSk2w8mVFGmocvcYYb6nSmb3RMVZaKCXFbD1kN619VcPM8 zJ288gvt4AcjdFMUVm38jBL0omZ+ZHIeg6tkCn15zUrXb3u0vUcxoYzxCWw+co3Rgr+2 CI+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XG9vhSFd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs8-20020a1709072d0800b0072b85509102si4150968ejc.641.2022.07.14.18.48.27; Thu, 14 Jul 2022 18:48:52 -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=@redhat.com header.s=mimecast20190719 header.b=XG9vhSFd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241031AbiGOBd0 (ORCPT + 99 others); Thu, 14 Jul 2022 21:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbiGOBdZ (ORCPT ); Thu, 14 Jul 2022 21:33:25 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 576753ED46 for ; Thu, 14 Jul 2022 18:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657848803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=u/U2xaa/vsw5f/HwUYz7caI2/KRVjJ8EhiCQx4+NJbM=; b=XG9vhSFdsxoQf+Z+Uxdh9jneRbCyLeOp4+stj3BHgkS5iWlKadzpcHpAcrPDJH8r+VHx51 5xuxdFmrY2WhhsHKkuY1HRRNIdFNDIq6zTz8DxLmDatEnuqH1FPr1uzQy697D3nKyQJQ5W iEec4XyaxQ/Y+hP4A8vlBCFrmjIs3bI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-467-RiRW-v7BNY69kwk-8B8ToA-1; Thu, 14 Jul 2022 21:33:20 -0400 X-MC-Unique: RiRW-v7BNY69kwk-8B8ToA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1FF26800124; Fri, 15 Jul 2022 01:33:19 +0000 (UTC) Received: from localhost (ovpn-13-91.pek2.redhat.com [10.72.13.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A5B1C2166B26; Fri, 15 Jul 2022 01:33:16 +0000 (UTC) Date: Fri, 15 Jul 2022 09:33:13 +0800 From: Baoquan He To: "Guilherme G. Piccoli" Cc: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org Subject: Re: Unstable tsc caused soft lockup in kdump kernel Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 07/14/22 at 04:34pm, Guilherme G. Piccoli wrote: > On 29/06/2022 07:25, Baoquan He wrote: > > Hi, > > > > On a HP machine, after crash triggered via sysrq-c, kdump kernel will > > boot and get soft lockup as below. And this can be always reproduced. > > > > From log, it seems that unreliable tsc was marked as unstable in > > clocksource_watchdog, then worker sched_clock_work was scheduled. And > > this tsc unstable marking always happened after sysrq-c is triggered. > > And the cpu where worker smp_call_function_many_cond is running won't > > be stopped and hang there and keep locks, even though the cpu should be > > stopped. While kdump kernel is running in a different cpu and boot, then > > soft lockup happened because other workers or the relevant threads are > > waiting for locks taken by the hang sched_clock_work worker. > > > > Any idea or suggestion? > > > > The normal kernel boot log and kdump kernel log, kernel config, are all > > attached, please check. > > > > Hi Baoquan, interesting issue! Do you happen to have a full kdump boot > log with the issue? Maybe collected through serial console, etc. > It seems the one attached is from a succeeding kdump by passing > "tsc=unstable" to the kdump kernel right? The attached kdump boot log is the one in which kdump kernel is hang. The 'tsc=unstable' need be added to 1st kernel to work around it. Only adding 'tsc=unstable' into kdump kernel doesn't change anything since the clocksouce_watchdog work has been in a loop because of the unstable tsc in 1st kernel. > > Also, did you try to "forbid" tsc to get marked as unstable in the first > kernel, before kdump? I mean like a hack code change, just prevent > kernel doing that and seeing if it works. If that still fails, then it > seems the cause of the issue is the same as the cause of TSC getting > unstable - in other words, something would be causing both the kdump > kernel lockup AND the TSC unstable marking in the first kernel... As I added later that adding 'tsc=unstable' into 1st kernel's cmdline can work around the issue. kdump works well with that.