Date: Wed, 28 Mar 2018 13:28:29 -0700 From: Warner Losh <imp@bsdimp.com> To: Kyle Evans <kevans@freebsd.org> Cc: Stefan Esser <se@freebsd.org>, "<freebsd-current@freebsd.org>" <freebsd-current@freebsd.org>, Warner Losh <imp@freebsd.org> Subject: Re: Boot failure: panic: No heap setup Message-ID: <CANCZdfqtxMGuSPuX6rQrLY0Zwi5Ndzff_%2Bf47GyGLuRoRTsggQ@mail.gmail.com> In-Reply-To: <CACNAnaGpB434Mca9DdjnPJz_Mt4WhzrCbt=qu5AUGrgD2C6YOQ@mail.gmail.com> References: <79d2bd72-f8b2-6476-9589-ebad9716698f@freebsd.org> <CACNAnaEwq41PqQATGLF2OAaL6mnRpGgwqYQaux1gZ_kzp4DxoA@mail.gmail.com> <d4304b55-d265-2488-62e4-6117a7a33502@freebsd.org> <CACNAnaGpB434Mca9DdjnPJz_Mt4WhzrCbt=qu5AUGrgD2C6YOQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 28, 2018 at 1:10 PM, Kyle Evans <kevans@freebsd.org> wrote: > On Tue, Mar 27, 2018 at 6:39 PM, Stefan Esser <se@freebsd.org> wrote: > > Am 27.03.18 um 21:31 schrieb Kyle Evans: > >> > >> On Tue, Mar 27, 2018 at 11:06 AM, Stefan Esser <se@freebsd.org> wrote: > >>> > >>> A few weeks ago I tried the LUA boot and found, that my kernel did not > >>> start > >>> (i.e. did not print the initial FreeBSD version line), but instead > >>> stopped > >>> with: > >> > >> > >> Oy =/ > >> > >>> panic: No heap setup > >>> > >>> I recovered by booting from an alternate boot device and kept my system > >>> running until today, where I decided to give the LUA boot another try. > >>> > >>> The boot failure happened again, with identical message: > >>> > >>> panic: No heap setup > >> > >> > >> Hmm... that's an sbrk panic [1], indicating that setheap hadn't been > >> called. zfsgptboot is zfsboot with gpt bits included, so the relevant > >> setheap call is [2] I believe. It's not immediately clear to me how > >> switching interpreters could actually be breaking it in this way. > >> > >> At what point are you hitting this panic? After menu, before kernel > >> transition? > > > > > > The menu is displayed and I can unload the kernel and load the kernel > > and modules from an alternate path. The lua code seems to work just fine, > > but as soon as I enter the "boot" command, the panic happens. > > > > This happens when the loader transfers control to the kernel but before > > any other output is generated. I tried booting a GENERIC kernel just to > > be sure this is not caused by an out-dated kernel config file. > > > >>> I tried booting a GENERIC kernel, but only rebuilding the boot loader > >>> (gptzfsloader in my case) without LUA support fixed the issue for me > ... > >>> > >>> The system is -CURRENT (built today) on amd64 (not converted to UEFI, > >>> yet). > > > > > > Hmmm, the code references point into the boot loader code - I had > > expected that there is a problem in the kernel, not the boot loader. > > > >> [1] > >> https://svnweb.freebsd.org/base/head/stand/libsa/sbrk.c?view=markup#l56 > > > > > > Seems that setbase has either not been called or has been called with > > base=0. > > Right, which is odd... > > >> [2] > >> https://svnweb.freebsd.org/base/head/stand/i386/zfsboot/ > zfsboot.c?view=markup#l688 > > > > > > I had thought, that the zfs boot code has been initialized before the > > menu is displayed? > > Right, all of this should be done looooong before we get to the > interpreter. Can you break into the loader prompt and try the `heap` > command, see what that outputs? CC'ing imp@ because he actually knows > things. Totally weird. I'd add a printf to the sethead() function to display its args and see if you get this panic before/after that printf... Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqtxMGuSPuX6rQrLY0Zwi5Ndzff_%2Bf47GyGLuRoRTsggQ>