Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2482866rwd; Wed, 14 Jun 2023 03:34:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ54K4y2h+3SXM/9eIyQUfmpXtW+2v9J78iKlbfX8cxMJWEvIBrGW0EGYhXQdl5irLYMxyo9 X-Received: by 2002:a05:6a20:2d9:b0:117:3239:4681 with SMTP id 25-20020a056a2002d900b0011732394681mr1202877pzb.18.1686738896996; Wed, 14 Jun 2023 03:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686738896; cv=none; d=google.com; s=arc-20160816; b=DHdf/Zg4mZkWihocXCrEi6pjjrgCY0hkkVsXT0JMJttLClKQhuQjVmp2288eTwLtPA 4si30P1zR5e2FBlSKedxMO+AaXx0kBKrCpDHfrd8W5bM+wGAI1ip+UBiAm03BkDj0hIr NrIOZtOSfarQjM1hTVVouDCHyt9NAeuju+H4xNnXb+5+Q38cVscnLjUTiUCmsNxcpl06 aUcogRx3KFz/gDPSOEl7IJLvZe/BZaWZqs/JUcHgBx2qnhIXsETnxDk4bIywYyvRGaEP AbI5JTraLoySRWNwMQGsggtt76WMXRwjSkgaJTrHJwS50sg88A9i47zRIRDytvytDUWx I41A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zi9IvM4FPjHv6y+/DI0fBJ80iOPAHzkaGK3eRt2hZko=; b=LJxwx6rk3qs50p0dCovtj6Q/D1sFZexjzCS2NTiZXshMC/tB7KtTB9Xn8hkVcJMeWI xh41VWM8CQo16NuNCCj64Yt5q9W+ScF8j9NANBmlOtMvPYhzr++H83eeZEZIIU8pNA3p wjICa24PzpjQ5ukACDIcETwmqXZOhB2ncMUg5OlZnE2I0RaU8YLIVLucaPclA1S54nuE U7VERJVwdbSZVCb6ob4GYQ36EMBE1gJk4X08Z6aUV6INqWM3g3cMCb7hGrK0n5NYQWgE vfg9t20aDD6Zmz6UFh2rH7YL7W7Nh8h0wsZre7XdzwZkJ9527e4WLWzvXU5KP1iHxjN0 qkYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S+fStN+x; 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 x27-20020aa79a5b000000b0065e445224e5si6725978pfj.332.2023.06.14.03.34.39; Wed, 14 Jun 2023 03:34:56 -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=S+fStN+x; 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 S243482AbjFNKdK (ORCPT + 99 others); Wed, 14 Jun 2023 06:33:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235818AbjFNKco (ORCPT ); Wed, 14 Jun 2023 06:32:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF3D10D8 for ; Wed, 14 Jun 2023 03:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686738615; 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=zi9IvM4FPjHv6y+/DI0fBJ80iOPAHzkaGK3eRt2hZko=; b=S+fStN+xdSaYvF9xpCPGdmsRh5iPw/hioFbt2ZOCPofhiiu89aiwkk71lqt+g4UG7cl9Ic dESGk0RuOkMpxmveR6LAll5eZEs3YDl6uCAlTyGtUNgXmL81wN/1QY8kMUBkM0EeClIXog u67+k8Xvt8LIK9SIe2SHitNTDslYlQU= 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-592--17XzwBeMQuvliQMuupviw-1; Wed, 14 Jun 2023 06:30:12 -0400 X-MC-Unique: -17XzwBeMQuvliQMuupviw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3A3F7101A58F; Wed, 14 Jun 2023 10:30:12 +0000 (UTC) Received: from localhost (unknown [10.39.192.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF1191121314; Wed, 14 Jun 2023 10:30:11 +0000 (UTC) Date: Wed, 14 Jun 2023 11:30:11 +0100 From: "Richard W.M. Jones" To: Peter Zijlstra Cc: Aaron Thompson , linux-kernel@vger.kernel.org Subject: Re: printk.time causes rare kernel boot hangs Message-ID: <20230614103011.GL7912@redhat.com> References: <20230613134105.GA10301@redhat.com> <20230614092158.GF1639749@hirez.programming.kicks-ass.net> <20230614094522.GA7636@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230614094522.GA7636@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 OK I have a simpler test: $ while true; do qemu-system-x86_64 -no-user-config -nodefaults -display none -machine accel=kvm:tcg,graphics=off -cpu max,la57=off -m 1280 -no-reboot -rtc driftfix=slew -no-hpet -global kvm-pit.lost_tick_policy=discard -kernel vmlinux -serial stdio -append "panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=UUID=7cd9caf4-6491-41a5-b387-38af6fa2d638 selinux=0 guestfs_verbose=1 TERM=xterm-256color" >& /tmp/log ; echo -n . ; done where "vmlinux" is a locally compiled kernel with CONFIG_PRINTK_TIME=y set. I'm using the current git head. This will print dots about once a second. When it stops printing dots (after potentially many thousands of iterations), take a look at /tmp/log to see if it has hung at: [ 0.071830] Freeing SMP alternatives memory: 48K I tried connecting gdb to qemu but so far I've not successfully managed to collect a usable stack trace. I can't seem to get it to print symbols, even though I believe I have disabled kASLR, but still trying. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html