From owner-freebsd-current@freebsd.org Tue Mar 27 23:49:48 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A91AEF6B96A for ; Tue, 27 Mar 2018 23:49:48 +0000 (UTC) (envelope-from se@freebsd.org) Received: from sonic306-35.consmr.mail.ir2.yahoo.com (sonic306-35.consmr.mail.ir2.yahoo.com [77.238.176.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FD11697F3 for ; Tue, 27 Mar 2018 23:49:47 +0000 (UTC) (envelope-from se@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1522194581; bh=DQ0FHyzKEO3Ce4YMW+IFqZ8tYDj7y2SajwVfrvxlz3Y=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=FOn7Tir5Gw1jhOxIWh1B5HFXo9xj6gwH2w2gG/1lcr2QY26U/hjd1upUnmP0KIrHbhpNCaXSdRN3OufZIyirIImHN/9KRa6u7jvSgNjQDdgi0QOnHWNMSuffd2eNFkq+K54U8KDAWHbF9juiqXu6mcSGeFAdESrnrIST/xt5WO0hRAVSndQanB67Xvw/0GAuSqmTfGhCo/1zXh//qzxOXKbvWUNpMeCWYWmQ8UvsdKTXRMasI/kfPBmJH4znB6aAy+wTfeiMwmBuQf/q25YC8Y1vwmzxjipBF07deUG7b9skDL06/2nUgZzYfrw7m9vgLrMYBpuVrlehjsAhAA4wiw== X-YMail-OSG: dIaYy.0VM1meD76bDbRAesTqPOudepxeuxNDdG7anZmiZBJBwA2DQwqgnJbPbUG XZVSXwKDsqIN.vM6bU5jWaMClIaJNThhATDHxUhCWylk2rvA3f75u8JkAE3C0AfMqZ04tQoRMlBg nwicTkz50.6vK_p8LXtlkGNxdGO0C1Om5uLk85JDmOdvPsv2If7YvFP7pb85.bUD9Yqtrcrv1Wsn NRdobBuM92vTxD6ON3NOi3OADyH6dE62ouQE.URqgzWKbZ.Qp9FgUiCoFev9XPvmzdwZ18YLNCht n2kI5ZO8WaQN2znOgnXgko60ffsqhu2xsEacL8i.h0m2yMYQvJvhS7._8pdPdK6r.N8ZHjeP4PFx gCTlDl9hYXZp7AgE.0iqqy5Ma7lJmH87pjeIj79XDBjQrKjznPe6L7t5RfkDIcKiElzy_mdEqgvb zeaAN0aWtOJhFpT1us4xeIeJ95RBdGeNqIjxlIqN9dcIo8hMkBogSUvOUKTPQlA.30itXKDDe1aV WdQi4zeLkENwanHVXIgeW2oyHldcwW7s- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Tue, 27 Mar 2018 23:49:41 +0000 Received: from p5797D1FA.dip0.t-ipconnect.de (EHLO Stefans-MBP-7.fritz.box) ([87.151.209.250]) by smtp413.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 0c3e725a8ed3b282714f6c5ccb62da74; Tue, 27 Mar 2018 23:39:31 +0000 (UTC) Subject: Re: Boot failure: panic: No heap setup To: Kyle Evans , Stefan Esser Cc: "" References: <79d2bd72-f8b2-6476-9589-ebad9716698f@freebsd.org> From: Stefan Esser Message-ID: Date: Wed, 28 Mar 2018 01:39:30 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2018 23:49:49 -0000 Am 27.03.18 um 21:31 schrieb Kyle Evans: > On Tue, Mar 27, 2018 at 11:06 AM, Stefan Esser 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. > [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? Or do I misunderstand this phase of the boot process??? Regards, STefan