helloSystem / ISO

helloSystem Live and installation ISO
https://github.com/helloSystem/
BSD 3-Clause "New" or "Revised" License
805 stars 58 forks source link

Some 14.0 based ISOs: kp on guz_zstd_decompress #389

Closed probonopd closed 1 year ago

probonopd commented 2 years ago

With some 14.0-CURRENT based experimental ISOs, we get a kernel panic:

mdconfig -a -t vnode-o readonly -f /boot/rootfs.uzip
(...)
panic: guz_zstd_decompress: Expected 262144 bytes, got 163840
(...)
KDB: stack backtrace:
(...)

This is the FreeBSD source code in question: https://github.com/freebsd/freebsd-src/blob/627f1555f571b5328637dbfbe441ed89c84db20c/sys/geom/uzip/g_uzip_zstd.c#L81

Conclusion: It seems like with some contents or with some size of the contents, the mdconfig -a -t vnode-o readonly -f /boot/rootfs.uzip step fails at guz_zstd_decompress.

probonopd commented 2 years ago
probonopd commented 2 years ago
probonopd commented 2 years ago

So here we have proof that just adding 2 MB of random data to the contents of the uzip prevents the crash.

probonopd commented 2 years ago

This can also happen with, e.g., the Developer ISO.

image

n0bzeR commented 2 years ago

can add normal Setup OS ? (like a Linux with Calamares ?) and, add support Wi-Fi usb-adapter? - rtl8192eu ? and.. why cannot run .appimage apps ? i just double click on apps, and not run... or, appimage not work here?? in bsd? tested on SMplayer (mpv/mplayer)

probonopd commented 1 year ago

hello-0.8.0_0H106-FreeBSD-14.0-amd64.iso crashes with guz_zstd_decompress

probonopd commented 1 year ago

Reported upstream: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267082

probonopd commented 1 year ago

Lately, more or less all helloSystem ISOs based on FreeBSD 14.0-CURRENT fail:

image

ping @cemeyer

probonopd commented 1 year ago

With makefs -R 16384 and mkuzip without -s it did not crash but the resulting ISO was noticeably larger. So in the commit above I am trying to increase the cluster size again, but using makefs -R with the same value as the mkuzip -s value.

probonopd commented 1 year ago

Seems to have worked.

So possibly makefs -R and mkuzip -s must always be kept at the same value. If this is the case, then it would be nice if mkuzip would refuse to create files with different -s values.

FreeBSD CURRENT has more checks (asserts) enabled than RELEASE, which may be the reason why the error appeared in 14-CURRENT but not in 13.1-RELEASE.