Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1020024rwe; Thu, 1 Sep 2022 11:06:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR5hqmq8qujwntQ5OlSWYxHHoDU5KY0te4jnHd4fzrv45g6Y10xhAjl6jo1JPCuPGiR+wLHY X-Received: by 2002:a17:906:5d07:b0:738:b86d:df3d with SMTP id g7-20020a1709065d0700b00738b86ddf3dmr24178450ejt.617.1662055606654; Thu, 01 Sep 2022 11:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662055606; cv=none; d=google.com; s=arc-20160816; b=aUseHSW6/EhmekV6mLoYIprJDHNCTpsjbASt8uVXwhz6Zr4/T1pkaaCdg9zBfbSocm KPWgSZpGQQMvzDh41cLcztkrduS5t00ug9t9t3+1zQC0E3DZJXBKhEZ4yczLbyxc/U+w 3qFbw+BwfcaW4QNVGwd0vTAFGElk6bXt/SqywOriZVs2pufRFZB9x+2g837DoZnK3c7p XKDzwv057tEsUmBB8ZYG0d68mcb2HAVE6NSW6ag1ncmug4Q32QT0PLK0aXqzftnTpUPc 8NOB8nhzmi8v1n1ctCqutCTQqdIQpl2LsEWhjEwAYGHcnVAyeWJEGE52ZzmIcXbHdrzQ Clzw== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=+2HKjMFI5fHibo7PNuv5lATWzP8HIrWD5un4Gtj8nho=; b=QCF7DvDie9uWgf3TzrkRerXgulh2XWBsvsyg2d0jS3MP17m0W4B/sO970d0KELD84o Pae124xCtETfqDBWQ0eE7pqfjBoIXJT5zR/tvuVW8qInRIvn5PpmoxMRoaj9mF72pV+Q +CFZtOx3tqcsc5E/vwLYFiYR5zZ66NuxlWMBtap08BK058Zd+mzsHEaW7fFLYUkeAUrZ ZgXg33ijSXM6vPrla073VAYwm3f9fHui0PQc1lRveYmSfkCk7mC48GV0piQWNiePIlH7 Wh/2orZL0AgYGhVhVqtTOIG4H1N2Yc2dCFMbYm1BlRR7P6vUnJxrQQUvLIrorgxq942x kmLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tenQ0z5U; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg42-20020a170907a42a00b0070bf25f1732si14648225ejc.155.2022.09.01.11.06.20; Thu, 01 Sep 2022 11:06:46 -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=@kernel.org header.s=k20201202 header.b=tenQ0z5U; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234043AbiIAR13 (ORCPT + 99 others); Thu, 1 Sep 2022 13:27:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233404AbiIAR11 (ORCPT ); Thu, 1 Sep 2022 13:27:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2A1690190; Thu, 1 Sep 2022 10:27:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 420DA61FFE; Thu, 1 Sep 2022 17:27:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 950FFC433C1; Thu, 1 Sep 2022 17:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662053245; bh=d4NDDsiC8ocfvWOBCz8JUrukDUTfwKhAmcX8h9ZeOn8=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=tenQ0z5UQqI/JXSYXqiKarIZ7+7qwHrKATaP/slYp3ovhWBIxa5cVsoMsKpyafL30 VPBcZJghaeo/fl0dDqQeuCcTcjS4C0WkenRLNY+6oUrw1T0Ap9pj1sv3ajQvJhGHOf IVpLtEuKK45OF2jAT37mk//Lvye4I3d87b2JzqC6SQ0Goz7otq2Uoi1P0Nmp6aG2JZ 1tBf9QXEYUJ2E/kBK+xDQb5mZ2WrBcgskINkj/0NsYkvxBoBGaP6ss6oux6TBxFjDd SZFK10BCCEsrgwYTBr4Q3vxxAVSv1xxesVdhmhOYkAeYobiTywYnmm/SiymIJBx6Jk B7UKPXDZpaDaw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 390245C0691; Thu, 1 Sep 2022 10:27:25 -0700 (PDT) Date: Thu, 1 Sep 2022 10:27:25 -0700 From: "Paul E. McKenney" To: Sascha Hauer Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org, Matthew Wilcox , Zhouyi Zhou , kernel@pengutronix.de Subject: Re: [PATCH rcu 04/32] rcu-tasks: Drive synchronous grace periods from calling task Message-ID: <20220901172725.GC6159@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220620225402.GA3842369@paulmck-ThinkPad-P17-Gen-1> <20220620225411.3842519-4-paulmck@kernel.org> <20220901103625.GA1658@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220901103625.GA1658@pengutronix.de> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 Thu, Sep 01, 2022 at 12:36:25PM +0200, Sascha Hauer wrote: > Hi Paul, > > On Mon, Jun 20, 2022 at 03:53:43PM -0700, Paul E. McKenney wrote: > > This commit causes synchronous grace periods to be driven from the task > > invoking synchronize_rcu_*(), allowing these functions to be invoked from > > the mid-boot dead zone extending from when the scheduler was initialized > > to to point that the various RCU tasks grace-period kthreads are spawned. > > This change will allow the self-tests to run in a consistent manner. > > > > Reported-by: Matthew Wilcox > > Reported-by: Zhouyi Zhou > > Signed-off-by: Paul E. McKenney > > This commit (appeared in mainline as 4a8cc433b8bf) breaks booting my > ARMv7 based i.MX6ul board when CONFIG_PROVE_RCU is enabled. Reverting > this patch on v6.0-rc3 makes my board boot again. See below for a boot > log. The last message is "Running RCU-tasks wait API self tests", after > that the board hangs. Any idea what goes wrong here? New one on me! Is it possible to get a stack trace of the hang, perhaps via one form or another of sysrq-T? Such a stack trace would likely include synchronize_rcu_tasks(), synchronize_rcu_tasks_rude(), or synchronize_rcu_tasks_trace() followed by synchronize_rcu_tasks_generic(), rcu_tasks_one_gp(), and one of rcu_tasks_wait_gp(), rcu_tasks_rude_wait_gp(), or rcu_tasks_wait_gp(). At this point in the boot sequence, there is only one online CPU, correct? I have seen recent non-boot hangs within synchronize_rcu_tasks() due to some other task getting stuck in do_exit() between its calls to exit_tasks_rcu_start() and exit_tasks_rcu_finish(). The symptom of this is that the aforementioned stack trace includes synchronize_srcu(). I would not expect much in the way of exiting tasks that early in the boot sequence, but who knows? Thanx, Paul > Sascha > > ----------------------------8<----------------------------- > > [ 0.000000] Booting Linux on physical CPU 0x0 > [ 0.000000] Linux version 5.19.0-rc3-00004-g4a8cc433b8bf (sha@dude02) (arm-v7a-linux-gnueabihf-gcc (OSELAS.Toolchain-2021.07.0 11-20210703) 11.1.1 20210703, GNU ld (GNU Binutils) 2.36.1) #229 SMP Thu Sep 1 12:00:07 CEST 2022 > [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d > [ 0.000000] CPU: div instructions available: patching division code > [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache > [ 0.000000] OF: fdt: Machine model: IDS CU33X > [ 0.000000] earlycon: ec_imx6q0 at MMIO 0x02020000 (options '') > [ 0.000000] printk: bootconsole [ec_imx6q0] enabled > [ 0.000000] Memory policy: Data cache writealloc > [ 0.000000] cma: Reserved 64 MiB at 0x8c000000 > [ 0.000000] Zone ranges: > [ 0.000000] Normal [mem 0x0000000080000000-0x000000008fffffff] > [ 0.000000] HighMem empty > [ 0.000000] Movable zone start for each node > [ 0.000000] Early memory node ranges > [ 0.000000] node 0: [mem 0x0000000080000000-0x000000008fffffff] > [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000008fffffff] > [ 0.000000] percpu: Embedded 17 pages/cpu s38068 r8192 d23372 u69632 > [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 65024 > [ 0.000000] Kernel command line: console=ttymxc0,115200n8 earlycon ip=dhcp root=/dev/nfs nfsroot=192.168.8.12:/hom > e/sha/nfsroot/cu33x,v3,tcp > [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear) > [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear) > [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off > [ 0.000000] Memory: 162600K/262144K available (15360K kernel code, 2146K rwdata, 5472K rodata, 1024K init, 6681K b > ss, 34008K reserved, 65536K cma-reserved, 0K highmem) > [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 > [ 0.000000] trace event string verifier disabled > [ 0.000000] Running RCU self tests > [ 0.000000] rcu: Hierarchical RCU implementation. > [ 0.000000] rcu: RCU event tracing is enabled. > [ 0.000000] rcu: RCU lockdep checking is enabled. > [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. > [ 0.000000] Tracing variant of Tasks RCU enabled. > [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. > [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 > [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 > [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. > [ 0.000000] Switching to timer-based delay loop, resolution 41ns > [ 0.000003] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns > [ 0.007810] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns > [ 0.021748] Console: colour dummy device 80x30 > [ 0.023488] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar > [ 0.032009] ... MAX_LOCKDEP_SUBCLASSES: 8 > [ 0.035282] ... MAX_LOCK_DEPTH: 48 > [ 0.039445] ... MAX_LOCKDEP_KEYS: 8192 > [ 0.043886] ... CLASSHASH_SIZE: 4096 > [ 0.048127] ... MAX_LOCKDEP_ENTRIES: 32768 > [ 0.052552] ... MAX_LOCKDEP_CHAINS: 65536 > [ 0.057069] ... CHAINHASH_SIZE: 32768 > [ 0.061405] memory used by lock dependency info: 4061 kB > [ 0.066788] memory used for stack traces: 2112 kB > [ 0.071645] per task-struct memory footprint: 1536 bytes > [ 0.077138] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) > [ 0.087384] pid_max: default: 32768 minimum: 301 > [ 0.093527] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) > [ 0.099327] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) > [ 0.116798] CPU: Testing write buffer coherency: ok > [ 0.122036] CPU0: update cpu_capacity 1024 > [ 0.123381] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 > [ 0.137390] cblist_init_generic: Setting adjustable number of callback queues. > [ 0.142282] cblist_init_generic: Setting shift to 0 and lim to 1. > [ 0.149333] Running RCU-tasks wait API self tests > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |