From owner-freebsd-hackers@freebsd.org Fri Nov 8 12:40:22 2019 Return-Path: Delivered-To: freebsd-hackers@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 8505A1B14A7 for ; Fri, 8 Nov 2019 12:40:22 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 478fxd191Lz4JWd for ; Fri, 8 Nov 2019 12:40:20 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mail-wr1-x434.google.com with SMTP id a11so6903600wra.6 for ; Fri, 08 Nov 2019 04:40:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=inStPXaKjsMjg8PhgQ8tZ7qM00WL0zZkt9mnXlXbYa8=; b=WmM7tpIpNeNpSMrzdpVdkZM1GCMNbqBb1IUk4/EOBIZbAjEYCD0sNVJ6UhPjs1xU2s UF2fn5h5cwzyUZxetC2JGWAbVEC3ORSt91BWaxSQuFGAFm4kY0rRLn0TmF1qsjAvaAM7 VpvqOXdc53w/Kl882k2qGWYhCqowkv7SiylAD5IfVQsDVunFQkpnzpxqFU07rtsKyf0V ifejI8sm4NqWCpus0zpdT2xXNmHJRuhPzclpqZt1E/FUCgxGKzlUqyVxUi2ZKkIT99UN PVZHXCSD9aVaaC8/jcOQLZwnyHGaEKJHysZ3oztiG69iFj+UKqJe9sUNV2Xosh9zG6JJ +zpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=inStPXaKjsMjg8PhgQ8tZ7qM00WL0zZkt9mnXlXbYa8=; b=l04qyJuQEGiiJeFZLX1JXZhnh4oKKxn+nWH00USe+q9rH1oa1cZqjMRnEyJFNYy1ze hiBsRC5d6PisUL8S/JtOpHXL86Y5fNOoeoLjbLp5agQY1EmncA6uUqro9r3O/SSzfW5+ CzRr+kFSnpUkEzd25jers/wDZZ6SqFVEAzkj/TCPkVL+l5afHFWOtMGXhyBOKn99rHBh c4IfUbGfxjGEE0yi6UeMxA9RxQT+gBRQcTrGjYy7WKIGpj40xew+GKSzJ1N/tPwRQbL+ /tIccQ2GuxrZRd/trw+nEZoxrl9EgEyaTe/9nx6audyjJOQ16eAvrhRw4vkGTSeKQCFz NZag== X-Gm-Message-State: APjAAAWoYhBBtuZ1SmXr1hjI1e+/wjZufIOrURR2SHaXw0HZHQ9lu3Ce I1KWTF58x98CF/dWeT+1uZMibd+y X-Google-Smtp-Source: APXvYqybEelp/JToojt6gzEss/WkuDl8FGV88iuyMOHDXqEJ1G1k4/efv4WaIaGhIAzNRvwNznN/LA== X-Received: by 2002:adf:e506:: with SMTP id j6mr8442432wrm.19.1573216819580; Fri, 08 Nov 2019 04:40:19 -0800 (PST) Received: from localhost ([213.149.52.223]) by smtp.gmail.com with ESMTPSA id e27sm8602580wra.21.2019.11.08.04.40.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 04:40:19 -0800 (PST) Date: Fri, 8 Nov 2019 13:39:00 +0100 From: Domagoj =?UTF-8?Q?Smol=C4=8Di=C4=87?= To: freebsd-hackers Subject: Hang at stage 3 boot (Race condition?) loader Message-ID: <20191108133900.0000594c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 478fxd191Lz4JWd X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=WmM7tpIp; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rank1seeker@gmail.com designates 2a00:1450:4864:20::434 as permitted sender) smtp.mailfrom=rank1seeker@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.51), ipnet: 2a00:1450::/32(-2.76), asn: 15169(-2.01), country: US(-0.05)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[4.3.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2019 12:40:22 -0000 Yo crew! So, after upgrading from 11.1 to >=3D11.2 or >=3D12.0 boot would halt, just= after stage 3 loader, during kernel booting. In my case it always halts at line: em0: port ... This is very old SuperMicro P4SC8 board and kernel is custom(11.3). When that happens, only hardware reset is possible. I did debugging which included many manual reboots/resets and waiting to hi= t enter at a targeted boot point(read further below), which is totally anno= ying and retarded. So I narrowed down it to MBR and behind (to BIOS). Fix: -- At MBR stage 1 boot in booteasy's menu, if I press enter once, very early, = boot will succeed. Pressing it a few seconds later, while still at above stage, will cause a h= ang later on. -- Will it fail or not, I can see at the beginning of stage 3 boot. If BTX hangs for a while, just after it printed BIOS disc A, C, D, E ..., b= oot always fails with hang at em0. If I press enter as described, BTX will just "flash" through BIOS disc list= and boot will always succeed. Boot also succeeds without my intervention if I: Unplug secondary SATA disk =3D> No BTX hang Disable em0 in BIOS =3D> BTX hangs, BUT boot succeeds anyway! Pressing enter at stage3's menu, has no effect. Adding '-v' to boot.config shows detailed info when it is already too late. Boot codes (stage 1 & 2) haven't been touched since 9 or 10 REL, I think. I didn't want to reinstall them, because if it would fix a problem, how wou= ld I know the cause. Additionally, I have a special bsdlabel layout. I've split / and /boot into= different labels, where /boot is 'a'. I won't go into details, unless this proves to be a culprit, but then again= , it did worked up to <=3D11.1. Domagoj Smol=C4=8Di=C4=87