From owner-freebsd-current@freebsd.org Wed Jul 24 09:09:28 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E231A2FB8 for ; Wed, 24 Jul 2019 09:09:28 +0000 (UTC) (envelope-from tsoome@me.com) Received: from pv50p00im-ztbu10011701.me.com (pv50p00im-ztbu10011701.me.com [17.58.6.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3480870D5C for ; Wed, 24 Jul 2019 09:09:28 +0000 (UTC) (envelope-from tsoome@me.com) Received: from [192.168.150.41] (148-52-235-80.sta.estpak.ee [80.235.52.148]) by pv50p00im-ztbu10011701.me.com (Postfix) with ESMTPSA id 592B28A06FA; Wed, 24 Jul 2019 09:09:19 +0000 (UTC) From: Toomas Soome Message-Id: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: PCengines APU2C4, 12-STABLE: bootloader failure: Panic: free: guard2 fail @ 0x1000 + 2311663946 from Date: Wed, 24 Jul 2019 12:09:16 +0300 In-Reply-To: <20190724101132.5560377a@thor.intern.walstatt.dynvpn.de> Cc: "freebsd-embedded@freebsd.org" , FreeBSD CURRENT To: "O. Hartmann" References: <20190724101132.5560377a@thor.intern.walstatt.dynvpn.de> X-Mailer: Apple Mail (2.3445.104.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-24_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1812120000 definitions=main-1907240103 X-Rspamd-Queue-Id: 3480870D5C X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 24 Jul 2019 09:09:28 -0000 > On 24 Jul 2019, at 11:11, O. Hartmann wrote: >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 >=20 > Hallo, >=20 > on APU2C4 from PCengines with latest firmware apu2_v4.9.0.7.rom, = SeaBIOS > rel-1.12.1.3-0-g300e8b7, booting via legacy MBR FreeBSD 12-STABLE = r350274 (the same with > r350115) fails to boot with an immediate loader error: >=20 > [...] > SeaBIOS (version rel-1.12.1.3-0-g300e8b7) >=20 > Press F10 key now for boot menu >=20 > Booting from Hard Disk... > / >=20 > onsoles: internal video/keyboard =20 > IOS drive C: is disk0=20 > IOS drive D: is disk1=20 > IOS 639kB/3404444kB available memory=20 >=20 > reeBSD/x86 bootstrap loader, Revision 1.1 =20 > Mon Apr 15 21:28:11 CEST 2019 root@thor)=20 > anic: free: guard2 fail @ 0x1000 + 2311663946 from = X=C3=A7u0=C3=A7}4=C3=A7l$=E2=99=A6=E2=94=9C=C3=AD@=E2=94=A4=E2=99=A0:21061= 63957=20 > -> Press a key on the console to reboot <--=20 > [=E2=80=A6] This is definitely something =E2=80=9Cfunny=E2=80=9D, we are apparently = attempting to free pointer 0x1000 which is definitely wrong because our = heap should be just below 4GB line. Since we do get list of disks = printed, also memory and version, it means we get error from = interpretator - it is possible the stack did clash with bss and hence = the corruption. You can try to press space on first spinner and enter alternate loader = on boot: prompt. (enter ?/boot on boot: prompt to see the file list). >=20 >=20 >=20 >=20 > Booting 12.0-STABLE #78 r349288: Sat Jun 22 09:10:25 CEST 2019 amd64 = works fine with nothing > changed except the OS version. >=20 >=20 > Booting 2.0-STABLE #78 r349288 works fine: >=20 > [...] > SeaBIOS (version rel-1.12.1.3-0-g300e8b7) >=20 > Press F10 key now for boot menu >=20 > Booting from Hard Disk... > | >=20 > onsoles: internal video/keyboard =20 > IOS drive C: is disk0=20 > IOS drive D: is disk1=20 > IOS 639kB/3404444kB available memory=20 >=20 > reeBSD/x86 bootstrap loader, Revision 1.1=20 > Mon Apr 15 21:28:11 CEST 2019 root@thor)=20 > oading /boot/defaults/loader.conf=20 > oading /boot/device.hints=20 > oading /boot/loader.conf=20 > oading /boot/loader.conf.local=20 > Loading kernel... > /boot/kernel/kernel text=3D0xb005e8 \ > [...] >=20 > In the message taken from the serial console the first column of = characters is lost due to an > error in the output which seems FreeBSD related. >=20 It certainly does look weird - sio_putc() is used in boot2 and it=E2=80=99= s implementation is using same principe as comc_putchat() in = comconsole.c (even if it is asm versus c code). Since the serial data is = interpreted by terminal, it feels more about terminal emulator issue = (line discipline, cabling, usb to serial dongle?) rgds, toomas >=20 > The file /boot/loader.conf.local contains these lines in both, working = and non-working, > scenario: >=20 > [...] > boot_serial=3D"YES" > # serial speed in bits/s > comconsole_speed=3D"115200" > console=3D"comconsole" >=20 > autoboot_delay=3D"0" >=20 > verbose_loading=3D"YES" > loader_logo=3D"orb" > beastie_disable=3D"YES" >=20 > ### Microcode > #cpu_microcode_load=3D"YES" # Set this to YES to load = and apply a > #cpu_microcode_name=3D"/boot/firmware/intel-ucode.bin" # Set this to = the microcode > #cpu_microcode_type=3D"cpu_microcode" # Required for the kernel = to find > # the microcode update file. >=20 >=20 > # disable Process Table Isolation > #vm.pmap.pti=3D0 >=20 > kern.geom.label.gptid.enable=3D0 >=20 > # Limit the phys. memory > #hw.physmem=3D1073741824 # 1 G > #hw.physmem=3D536870912 # 512 MB > #hw.physmem=3D268435456 # 256 MB >=20 > # Da mehr als 1 igb NIC an Bord! Siehe man igb(4) > kern.ipc.nmbclusters=3D757350 > #kern.ipc.nmbjumbo9k=3D8192 >=20 > # NIC > #hw.em.max_interrupt_rate=3D32000 > hw.em.max_interrupt_rate=3D16000 >=20 > #If non-zero, enable EXPERIMENTAL feature to improve concurrent = Fortuna performance > kern.random.fortuna.concurrent_read=3D"1" >=20 > # Forward Information Bases (FIBs) > net.fibs=3D10 > net.add_addr_allfibs=3D0 >=20 > [...] >=20 >=20 > Again, with the exact same setting 12-STABLE r349288 boots fine, = rr350274 doesn't.=20 > FreeBSD 12-STABLE r >=20 > Can someone please help? >=20 > Thanks in advance, oh >=20 >=20 >=20 > - --=20 > O. Hartmann >=20 > Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BC= r > Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 = Abs. 4 BDSG). > -----BEGIN PGP SIGNATURE----- >=20 > iHUEARYIAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCXTgStAAKCRA4N1ZZPba5 > R7YUAPsGg2mkFYPohDjTBoQEVPkJUsSIOM+s3oxsrYfQJ/RfYwD+LGp3jmC+PDML > mhCtddjT7graxjMKIknflAKYFs6LMwU=3D > =3DbU6X > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org"