Date: Sat, 11 Apr 2026 18:32:09 +0800 From: Li-Wen Hsu <lwhsu@freebsd.org> To: Michael Tuexen <tuexen@freebsd.org> Cc: Xin Li <delphij@freebsd.org>, Adrian Chadd <adrian@freebsd.org>, "Bjoern A. Zeeb" <bz@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c0d9a07101a1 - main - MFV: zstd 1.5.7. Message-ID: <CAKBkRUzzT7yp%2BYHTK4dZj-qDQaa=vzP9_YQsbaK4-gSkL-XANA@mail.gmail.com> In-Reply-To: <B44F4285-AD20-4279-BEBC-CD79319CCC44@FreeBSD.org> References: <69d6c795.18adf.7af84449@gitrepo.freebsd.org> <60q35572-pprr-op23-p392-266469oon60@mnoonqbm.arg> <CAJ-VmokT=5gAyoq5ztwwFwO0tv%2BC%2Bnvb%2BjrPz1WL8y%2B0-9F=cQ@mail.gmail.com> <a710a150-7814-49aa-a817-21fc16589684@FreeBSD.org> <B44F4285-AD20-4279-BEBC-CD79319CCC44@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Sat, Apr 11, 2026 at 3:25 PM Michael Tuexen <tuexen@freebsd.org> wrote:
> > On 11. Apr 2026, at 06:56, Xin Li <delphij@freebsd.org> wrote:
> >
> > On 2026-04-10 21:00, Adrian Chadd wrote:
> >> hi!
> >> Same; this is breaking on my Snapdragon X1E FDT BSP work.
> >> It fails super early in kernel hand-off. It's going to be a pain to
> >> figure out locally as I have a framebuffer and I'd have to go do all
> >> the early mapping to do super early (in initarm()) framebuffer work.
> >> Is this reproducible by anyone else? delphij@, do you have any arm64
> >> FDT devices? Or maybe QEMU?
> >
> > bz@ and lwhsu@ did some diagnostic work, and this should help (adding
> -DZSTD_NO_TRACE to ZSTD_C)
> >
> > diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
> > index 871cd1c0705a..043d3fd0927c 100644
> > --- a/sys/conf/kern.pre.mk
> > +++ b/sys/conf/kern.pre.mk
> > @@ -158,7 +158,7 @@ NORMAL_FWO= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS}
> ${WERROR} -o ${.TARGET} \
> > NOSAN_C= ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offset*}
> >
> > # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS)
> > -ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd
> ${CFLAGS} \
> > +ZSTD_C= ${CC} -c -DZSTD_NO_TRACE -DZSTD_HEAPMODE=1
> -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \
> > -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \
> > -Wno-missing-prototypes -U__BMI__ -DZSTD_NO_INTRINSICS ${.IMPSRC}
> > # https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1]
> Should building a new kernel with this patch resolve the issue or
> is a buildworld/installworld required?
>
> I tested building a new kernel with this patch and it does not resolve the
> issue for me (VirtualBox VM on macOS and QEMU on Rasbian).
I haven't tested this one, the original patch was adding:
#define ZSTD_TRACE 0
to
sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h
This fixes my case running in QEMU.
> Best regards
> Michael
> >
> >
> >
> >> -adrian
> >> On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb <bz@freebsd.org> wrote:
> >>>
> >>> On Wed, 8 Apr 2026, Xin LI wrote:
> >>>
> >>>> The branch main has been updated by delphij:
> >>>>
> >>>> URL:
> https://cgit.FreeBSD.org/src/commit/?id=c0d9a07101a1e72769ee0619a583f63a078fb391
> >>>>
> >>>> commit c0d9a07101a1e72769ee0619a583f63a078fb391
> >>>> Merge: dd201e407e48 7e509d50854e
> >>>> Author: Xin LI <delphij@FreeBSD.org>
> >>>> AuthorDate: 2026-04-08 21:22:45 +0000
> >>>> Commit: Xin LI <delphij@FreeBSD.org>
> >>>> CommitDate: 2026-04-08 21:22:45 +0000
> >>>>
> >>>> MFV: zstd 1.5.7.
> >>>>
> >>>> MFC after: 2 weeks
> >>>> Relnotes: yes
> >>>
> >>> I do not know how but this makes an arm64 machine,
> >>> doing a UEFI netboot (in case it matters) fetching the
> /boot/loader.efi,
> >>> to fail.
> >>> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure.
> >>>
> >>> See this thread for a "bisect" and symptoms:
> >>> https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html
> >>>
> >>> /bz
> >>>
> >>> --
> >>> Bjoern A. Zeeb
> r15:7
> >>>
> >
> >
>
>
>
[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr">On Sat, Apr 11, 2026 at 3:25 PM Michael Tuexen <<a href="mailto:tuexen@freebsd.org">tuexen@freebsd.org</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> On 11. Apr 2026, at 06:56, Xin Li <<a href="mailto:delphij@freebsd.org" target="_blank">delphij@freebsd.org</a>> wrote:<br>
> <br>
> On 2026-04-10 21:00, Adrian Chadd wrote:<br>
>> hi!<br>
>> Same; this is breaking on my Snapdragon X1E FDT BSP work.<br>
>> It fails super early in kernel hand-off. It's going to be a pain to<br>
>> figure out locally as I have a framebuffer and I'd have to go do all<br>
>> the early mapping to do super early (in initarm()) framebuffer work.<br>
>> Is this reproducible by anyone else? delphij@, do you have any arm64<br>
>> FDT devices? Or maybe QEMU?<br>
> <br>
> bz@ and lwhsu@ did some diagnostic work, and this should help (adding -DZSTD_NO_TRACE to ZSTD_C)<br>
> <br>
> diff --git a/sys/conf/<a href="http://kern.pre.mk" rel="noreferrer" target="_blank">kern.pre.mk</a> b/sys/conf/<a href="http://kern.pre.mk" rel="noreferrer" target="_blank">kern.pre.mk</a><br>
> index 871cd1c0705a..043d3fd0927c 100644<br>
> --- a/sys/conf/<a href="http://kern.pre.mk" rel="noreferrer" target="_blank">kern.pre.mk</a><br>
> +++ b/sys/conf/<a href="http://kern.pre.mk" rel="noreferrer" target="_blank">kern.pre.mk</a><br>
> @@ -158,7 +158,7 @@ NORMAL_FWO= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} -o ${.TARGET} \<br>
> NOSAN_C= ${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fasan-shadow-offset*}<br>
> <br>
> # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS)<br>
> -ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \<br>
> +ZSTD_C= ${CC} -c -DZSTD_NO_TRACE -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \<br>
> -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \<br>
> -Wno-missing-prototypes -U__BMI__ -DZSTD_NO_INTRINSICS ${.IMPSRC}<br>
> # <a href="https://github.com/facebook/zstd/commit/812e8f2a" rel="noreferrer" target="_blank">https://github.com/facebook/zstd/commit/812e8f2a</a> [zstd 1.4.1]<br>
Should building a new kernel with this patch resolve the issue or<br>
is a buildworld/installworld required?<br>
<br>
I tested building a new kernel with this patch and it does not resolve the<br>
issue for me (VirtualBox VM on macOS and QEMU on Rasbian).</blockquote><div><br></div><div>I haven't tested this one, the original patch was adding:</div><div><br></div><div>#define ZSTD_TRACE 0</div><div><br></div><div>to</div><div><br></div><div>sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.h</div><div><br></div><div>This fixes my case running in QEMU.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Best regards<br>
Michael<br>
> <br>
> <br>
> <br>
>> -adrian<br>
>> On Thu, 9 Apr 2026 at 19:31, Bjoern A. Zeeb <<a href="mailto:bz@freebsd.org" target="_blank">bz@freebsd.org</a>> wrote:<br>
>>> <br>
>>> On Wed, 8 Apr 2026, Xin LI wrote:<br>
>>> <br>
>>>> The branch main has been updated by delphij:<br>
>>>> <br>
>>>> URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=c0d9a07101a1e72769ee0619a583f63a078fb391" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=c0d9a07101a1e72769ee0619a583f63a078fb391</a><br>
>>>> <br>
>>>> commit c0d9a07101a1e72769ee0619a583f63a078fb391<br>
>>>> Merge: dd201e407e48 7e509d50854e<br>
>>>> Author: Xin LI <delphij@FreeBSD.org><br>
>>>> AuthorDate: 2026-04-08 21:22:45 +0000<br>
>>>> Commit: Xin LI <delphij@FreeBSD.org><br>
>>>> CommitDate: 2026-04-08 21:22:45 +0000<br>
>>>> <br>
>>>> MFV: zstd 1.5.7.<br>
>>>> <br>
>>>> MFC after: 2 weeks<br>
>>>> Relnotes: yes<br>
>>> <br>
>>> I do not know how but this makes an arm64 machine,<br>
>>> doing a UEFI netboot (in case it matters) fetching the /boot/loader.efi,<br>
>>> to fail.<br>
>>> Kernel is the GENERIC-MMCCAM and I do not do ZFS, just to be sure.<br>
>>> <br>
>>> See this thread for a "bisect" and symptoms:<br>
>>> <a href="https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html" rel="noreferrer" target="_blank">https://lists.freebsd.org/archives/freebsd-arm/2026-April/005757.html</a><br>
>>> <br>
>>> /bz<br>
>>> <br>
>>> --<br>
>>> Bjoern A. Zeeb r15:7<br>
>>> <br>
> <br>
> <br>
<br>
<br>
</blockquote></div></div>
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKBkRUzzT7yp%2BYHTK4dZj-qDQaa=vzP9_YQsbaK4-gSkL-XANA>
