From owner-freebsd-arm@freebsd.org Wed Oct 7 15:57:49 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 205C9432B19 for ; Wed, 7 Oct 2020 15:57:49 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5zWH6kz9z3VKG; Wed, 7 Oct 2020 15:57:47 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1602086259; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/M4ufbbn5X7bTKvPmwTD1RZL58iq0s/s5j3xvc+iVic=; b=OgibvyAdfYfky54QgY2ThQLT7RHHNLSfa2XZIfMmbIeszOnLPjimZqFk5eoS/OU6MM024G bVCJB7IOnVN++e6DbwdJhpaZZjsMehAwkGSpGIBIb78BIPM9C+NSCP//PLbPsLSvOWDBcH mA+Pe9oI5JbTdemXllkki23TErnqaGo= Received: from skull.home.blih.net (lfbn-idf2-1-288-247.w82-123.abo.wanadoo.fr [82.123.126.247]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 3d9caf1c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 7 Oct 2020 15:57:39 +0000 (UTC) Date: Wed, 7 Oct 2020 17:57:39 +0200 From: Emmanuel Vadot To: Oskar Holmlund Cc: Oskar Holmlund via freebsd-arm , Ed Maste , markj@freebsd.org Subject: Re: BBB boot failure between r366365 and r366386 Message-Id: <20201007175739.d2899b22406eaf86893f1357@bidouilliste.com> In-Reply-To: <472221209.496244.1602086031265@mail.yahoo.com> References: <472221209.496244.1602086031265@mail.yahoo.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4C5zWH6kz9z3VKG X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=OgibvyAd; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.67 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.03)[-1.035]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-1.11)[-1.110]; NEURAL_HAM_MEDIUM(-1.02)[-1.024]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2020 15:57:49 -0000 On Wed, 7 Oct 2020 15:53:51 +0000 (UTC) Oskar Holmlund via freebsd-arm wrote: > Hello Ed, >=20 > > Den onsdag 7 oktober 2020 03:11:55 CEST, Ed Maste = skrev:=20 > > On Tue, 6 Oct 2020 at 14:59, Ed Maste wrote: > > > > > > On Mon, 5 Oct 2020 at 15:56, Ed Maste wrote: > > > > > > > >=A0 On Mon, 5 Oct 2020 at 09:53, Ed Maste wrote: > > > > > > > > > > Sometime after r366365 and up to r366365 BBB stopped booting in t= he HW > > > > > test environment. > > > > > > > > That should of course be after r366365 and up to (and including) > > > > r366386. > > > > > > Discussed on IRC; the second U-Boot banner comes out ~60s after the > > > first, which might suggest a watchdog timeout. > > > > > > We seem to get stuck after > > > > random: unblocking device. > > > > kevans points out that std.armv7 includes VERBOSE_SYSINIT=3D0, so > > verbose sysinits are available with a loader tunable. We get this far: > >=20 > > subsystem 2140000 > >=A0 init_hwpmc(0)... done. > >=A0 init_dtrace(0)... done. > >=A0 pmc_soft_ev_register(&pmc___lock_failed)... done. > >=A0 pmc_soft_ev_register(&pmc___clock_prof)... done. > >=A0 pmc_soft_ev_register(&pmc___clock_hard)... done. > >=A0 pmc_soft_ev_register(&pmc___clock_stat)... done. > > subsystem 2160000 > > =A0 random_fortuna_init_alg(0)... done. > > =A0 random_harvestq_init(0)... done. > > =A0 random_harvestq_prime(0)... done. > > =A0 __stack_chk_init(0)... random: unblocking device. > > done. > > subsystem 2180000 > > =A0 mac_init(0)... done. > > subsystem 21d0000 > > =A0 mac_late_init(0)... done. > > subsystem 21e0000 > > =A0 vnet0_init(0)... done. > > subsystem 2200000 > > =A0 proc0_init(0)... done. > > =A0 shutdown_conf(0)... done. > > subsystem 2300000 > > =A0 vm_stats_init(0)... done. > > =A0 uma_startup3(0)... done. > > =A0 vm_page_init_cache_zones(0)... done. > > subsystem 2380000 > > =A0 db_capture_sysinit(0)... done. > > subsystem 2400000 > > =A0 sched_setup(0)... done. > > subsystem 2480000 > > =A0 ktrace_init(0)... > > _______________________________________________ > > freebsd-arm@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >=20 >=20 > I can not reproduce the problem - I have tested r366366 - r366386 and as = of today r366515 and all works fine. U-boot is same as yours 2020.07. But i= have not tested to netboot the BBB, i have only tested from SD card and fr= om eMMC. > I can try the kernel and base from the CI builds later. >=20 > //Oskar I manage to find the problem with a lot of help from markj@. This is due to r364819 (and maybe the -O2 recent switch). =20 This patch fixes it : diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index b99b895233a4..b48ff7f29b63 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -697,7 +697,7 @@ vmem_startup(void) * arena, which may involve importing a range from the kernel arena, * so we need to keep at least 2 * BT_MAXALLOC tags reserved. */ - uma_zone_reserve(vmem_bt_zone, 2 * BT_MAXALLOC * mp_ncpus); + uma_zone_reserve(vmem_bt_zone, 64); uma_zone_set_allocf(vmem_bt_zone, vmem_bt_alloc); #endif } Mark is now aware of the issue and I'm sure he will find a correct patch soon :) Cheers, --=20 Emmanuel Vadot