From nobody Mon Aug 09 23:41:56 2021 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2AD5F11FF1E7 for ; Mon, 9 Aug 2021 23:42:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4GkCKr0WTqz4TJ9 for ; Mon, 9 Aug 2021 23:42:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x836.google.com with SMTP id c5so13999431qtp.13 for ; Mon, 09 Aug 2021 16:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y7x6ld1eOj2cNyLTbLH60ysIslrnrHGdRGaehhWKLp0=; b=1DiDF0IWkp0gdwEiKADvtbObMgPI6qdShn69WZPn1XSIkHmcb+YAwxQeZudNnldgnV UntTZWju5iHfwwtBpFaxTurKmlEQ8MpSSrTKOZbyahJ5FPYU9aDByJ655+Higf6hRvd4 R7ytebbGboz3nnHvs3rzb1t61zsUTwr1+747kgc0gpNSLlHkPOTn3L2FRugdASG0/pmH GZ/8VVXe8oRQLe/PM2K9DRZqJ2tLKgEjrSKJOXk0PT+pvK9YIV96Ttgw7sEuDAH+Afd5 A6gs/umEl8i8j0Wpc53NRpmz0tOu4V8cWPBp79EQ7t4O9YArGLk4xHdi4VmQZPyTvKGl dpag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y7x6ld1eOj2cNyLTbLH60ysIslrnrHGdRGaehhWKLp0=; b=MOKKHbtW7gPV4NDWRWaz1l9pK4BKaqMIAf1iUpVJL2CNfK78ubi5beU3aSr3xBqAXK ikuMmbshwGM5i/edhmpGeqGkN6uyQFkDaEdsIaKAXl8m2UMMQBeSQKP62qj4LO4HFEIK bR5UCXLE5wTwM2EJpS2Ol6ncxIW4kuwE7RZdMkT+9mgElgph/R+t6MZuGf4hwK0FQTGE d4q8TFndXO3aBMSUN/JWZ+HV4bH8J9mayuoWOMTnIaZw+WCquDxJS68J5ZkCf7IItJuy BiN8Ykir57URy0RcMj25Yh7UvpklNZ/+BVN8rn3u52TZgDxQ3NcEpaWnhdh4hmJ5IKSu WHZw== X-Gm-Message-State: AOAM532W4oNS2zV3o02uqXHnAvw+1C56x/HExAHd4G5vR06BeLU32Kse EYQO0r1pQh05vI9rK/L21ocZe+sHXDc1EVJtePNFLw== X-Google-Smtp-Source: ABdhPJwcsAAdIY0VrBiVyCw021cp+N4KyQyaDjg77K+9Nydl3G3f75DLWGoLD4chdubYzH7+ZyYM5JgvoL6tS+lamto= X-Received: by 2002:ac8:4c8b:: with SMTP id j11mr14656020qtv.244.1628552527318; Mon, 09 Aug 2021 16:42:07 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Mon, 9 Aug 2021 17:41:56 -0600 Message-ID: Subject: Re: Tracking down BTX behavior change. To: Ian Lepore Cc: John W , FreeBSD Hackers Content-Type: multipart/alternative; boundary="000000000000e3a41805c928ee87" X-Rspamd-Queue-Id: 4GkCKr0WTqz4TJ9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: Y --000000000000e3a41805c928ee87 Content-Type: text/plain; charset="UTF-8" On Mon, Aug 9, 2021 at 5:33 PM Ian Lepore wrote: > On Mon, 2021-08-09 at 15:19 -0700, John W wrote: > > Ah, forgot the bug link: > > > > [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257722 > > > > On 8/9/21, John W wrote: > > > I have a problem on my system where 11.3 boots fine, but any > > > supported > > > release (11.4, 12.2, 13.0) fail during the BTX stage. There's a bug > > > report if you're interested[1] > > > > > > But my question is: how can I track down differences in BTX code? I > > > have the 11.3 and 11.4 SVN sources checked out, and so far I am not > > > able to find any differences. > > > > > > So far, I am looking in: src/stand/i386/btx/ and src/usr.sbin/btxld > > > > > Don't focus solely on the stand/i386/btx directory. All the code under > src/stand is part of the loader. > And BIOS boot on amd64 is a 32-bit i386 binary, so all its source lives under stand/i386/btx... But it's not BTX that's dying, per se, rather it's the thing btx is loading / is running is hitting a problem. The EIP is weird as well, at 0x1011f002 which is at 269,611,010 and that's well above where the ~500k loader should be and well below where I'd expect the BIOS routines to live... Not much was merged between 11.3 and 11.4. Can you describe your system in terms of CPU, RAM, etc? But the interface between the different parts of the boot system didn't change, so it's safe to use 11.3 gptboot pmbr with an 11.4 /boot/loader and kernel. The bug posted shows what I think is gptboot dying. At least I think so, the bug didn't say if it was UFS or ZFS... My guess is that things are a bit bigger, and an allocation is failing and the boot code isn't coping as well as it should with a nice error, but it could always be some other rare, edge case bug that you're running into. It may also make sense to check out the stable/13 branch to see where, exactly on that branch it fails to give some clue about what the root cause might be. Warner --000000000000e3a41805c928ee87--