From owner-freebsd-ppc@FreeBSD.ORG Fri Apr 10 21:18:19 2015 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06670174 for ; Fri, 10 Apr 2015 21:18:19 +0000 (UTC) Received: from asp.reflexion.net (outbound-242.asp.reflexion.net [69.84.129.242]) (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 B2A8C8B2 for ; Fri, 10 Apr 2015 21:18:18 +0000 (UTC) Received: (qmail 1830 invoked from network); 10 Apr 2015 21:18:11 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 10 Apr 2015 21:18:11 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v7.40.1) with SMTP; Fri, 10 Apr 2015 17:18:11 -0400 (EDT) Received: (qmail 11968 invoked from network); 10 Apr 2015 21:18:10 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (DHE-RSA-AES256-SHA encrypted) SMTP; 10 Apr 2015 21:18:10 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-67-189-19-145.hsd1.or.comcast.net [67.189.19.145]) by iron2.pdx.net (Postfix) with ESMTPSA id D5E781C43AF; Fri, 10 Apr 2015 14:18:05 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: FYI: Some problems with powerpc (non-64) 11.0-CURRENT -r280867: sendmail stack corruption; PRNG not seeded From: Mark Millard In-Reply-To: <3C815370-6DAF-42C7-9CC5-2334F07C9E60@dsl-only.net> Date: Fri, 10 Apr 2015 14:18:09 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <85C392FA-7B2F-4924-9FF3-FBFF9FDCA614@dsl-only.net> References: <3C815370-6DAF-42C7-9CC5-2334F07C9E60@dsl-only.net> To: Nathan Whitehorn , Justin Hibbits X-Mailer: Apple Mail (2.2098) Cc: FreeBSD PowerPC ML X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 21:18:19 -0000 Updating to -r281236 with Justin Hibbits=E2=80=99 -r281243 applied (3 = *setjmp.S files updated) fixed both of the following powerpc (non-64) = 11.0-CURRENT problems that I=E2=80=99d FYI'd earlier: A) /usr/libexec/sendmail/sendmail crashing B) "PRNG is not seeded=E2=80=9D status for sshd. Side note: 11.0-CURRENT=E2=80=99s modern powerpc (non-64) is still limited to = (PowerMac) G4=E2=80=99s for my context. The iMac G3 and the PowerMac G5 = boot behaviors are essentially unchanged. ( = https://lists.freebsd.org/pipermail/freebsd-ppc/2015-March/007563.html ) =3D=3D=3D Mark Millard markmi at dsl-only.net Just for reference... On 2015-Apr-6, at 06:39 AM, Mark Millard wrote: In my exploring of FreeBSD 11.0-CURRENT on PowerMac's I've noted before = that modern vintages of the powerpc (non-64) do not boot the G5's or the = iMac 3 that I have access to but do boot the G4s that historically = worked. But I've noticed a couple of things that are note working right for the = G4's. I do not know what to attribute them to, unfortunately. Still for = (A) below I've got the evidence about where the segmentation fault is = happening in sendmail. I report on -r280867 specifically just because I've used it a lot more = than somewhat older variants that I'd built before. I doubt that the = issues are unique to -r280867. A) /usr/libexec/sendmail/sendmail is leaving .core files in /var/crash/ = periodically. (Details later below.) B) The attempt to start sshd before login reports that "PRNG is not = seeded". (Details later below.) Basic context: > # freebsd-version -ku; uname -apKU > 11.0-CURRENT > 11.0-CURRENT > FreeBSD FBSDG3C0 11.0-CURRENT FreeBSD 11.0-CURRENT #8 r280867M: Mon = Apr 6 02:12:28 PDT 2015 = root@FBSDG5S1:/usr/obj/powerpc.powerpc/usr/srcC/sys/GENERICvtsc-NODEBUG = powerpc powerpc 1100067 1100067 (A few files have to have more recent versions in order to build what is = generally -r280867.) This is a gcc 4.2.1 based build. A) /usr/libexec/sendmail/sendmail is leaving .core files in /var/crash/ = periodically (segmentation fault). (I only have the automatic/default sendmail activity: I never turned it = off but do not use it on the PowerMac's.) As I understand the following: It gets the segmentation fault from r29=3D0= during the code sequence for checking the stack (so the bl to = __stack_chk_fail@plt is not reached). > # gdb /usr/libexec/sendmail/sendmail /var/crash/sendmail.728.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and = you are > welcome to change it and/or distribute copies of it under certain = conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for = details. > This GDB was configured as "powerpc-marcel-freebsd"... > Core was generated by `sendmail'. > Program terminated with signal 11, Segmentation fault. > Reading symbols from /lib/libutil.so.9...Reading symbols from = /usr/lib/debug//lib/libutil.so.9.debug...done. > done. > Loaded symbols for /lib/libutil.so.9 > Reading symbols from /usr/lib/libwrap.so.6...Reading symbols from = /usr/lib/debug//usr/lib/libwrap.so.6.debug...done. > done. > Loaded symbols for /usr/lib/libwrap.so.6 > Reading symbols from /usr/lib/libssl.so.7...Reading symbols from = /usr/lib/debug//usr/lib/libssl.so.7.debug...done. > done. > Loaded symbols for /usr/lib/libssl.so.7 > Reading symbols from /lib/libcrypto.so.7...Reading symbols from = /usr/lib/debug//lib/libcrypto.so.7.debug...done. > done. > Loaded symbols for /lib/libcrypto.so.7 > Reading symbols from /lib/libgcc_s.so.1...Reading symbols from = /usr/lib/debug//lib/libgcc_s.so.1.debug...done. > done. > Loaded symbols for /lib/libgcc_s.so.1 > Reading symbols from /lib/libc.so.7...Reading symbols from = /usr/lib/debug//lib/libc.so.7.debug...done. > done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /libexec/ld-elf.so.1...Reading symbols from = /usr/lib/debug//libexec/ld-elf.so.1.debug...done. > done. > Loaded symbols for /libexec/ld-elf.so.1 > (gdb) bt > #0 0x4191cac0 in hosts_ctl (daemon=3D, = name=3D, addr=3D, user=3D) > at /usr/srcC/lib/libwrap/../../contrib/tcp_wrappers/hosts_ctl.c:38 > #1 0x4191cabc in hosts_ctl (daemon=3D, = name=3D, addr=3D, user=3D) > at /usr/srcC/lib/libwrap/../../contrib/tcp_wrappers/hosts_ctl.c:32 > #2 0x018322f8 in main (argc=3D6, argv=3D0x6f776e00, envp=3D) at = /usr/srcC/usr.sbin/sendmail/../../contrib/sendmail/src/main.c:2649 > #3 0x01804a24 in _start () > #4 0x418c0fa0 in .text () at = /usr/srcC/libexec/rtld-elf/powerpc/rtld_start.S:112 > (gdb) x/64i 0x4191ca40 > 0x4191ca40 : lwz r0,0(r3) > 0x4191ca44 : mr r3,r29 > 0x4191ca48 : rlwinm r0,r0,2,0,29 > 0x4191ca4c : lwzx r4,r25,r0 > 0x4191ca50 : bl 0x41931890 > 0x4191ca54 : b 0x4191ca10 > 0x4191ca58 : stwu r1,-864(r1) > 0x4191ca5c : mflr r0 > 0x4191ca60 : bl 0x41931594 <.got+548> > 0x4191ca64 : mr r9,r5 > 0x4191ca68 : stw r30,856(r1) > 0x4191ca6c : mflr r30 > 0x4191ca70 : stw r6,8(r1) > 0x4191ca74 : mr r7,r4 > 0x4191ca78 : stw r29,852(r1) > 0x4191ca7c : mr r5,r3 > 0x4191ca80 : stw r0,868(r1) > 0x4191ca84 : li r4,2 > 0x4191ca88 : lwz r29,-36(r30) > 0x4191ca8c : li r6,4 > 0x4191ca90 : li r8,5 > 0x4191ca94 : li r10,3 > 0x4191ca98 : lwz r0,0(r29) > 0x4191ca9c : stw r0,844(r1) > 0x4191caa0 : li r0,0 > 0x4191caa4 : addi r3,r1,16 > 0x4191caa8 : stw r0,12(r1) > 0x4191caac : crclr 4*cr1+eq > 0x4191cab0 : bl 0x41931870 > 0x4191cab4 : crclr 4*cr1+eq > 0x4191cab8 : bl 0x419317b0 > 0x4191cabc : lwz r0,844(r1) > 0x4191cac0 : lwz r9,0(r29) > 0x4191cac4 : xor. r0,r0,r9 > 0x4191cac8 : li r9,0 > 0x4191cacc : bne- 0x4191cae8 > 0x4191cad0 : lwz r0,868(r1) > 0x4191cad4 : lwz r29,852(r1) > 0x4191cad8 : lwz r30,856(r1) > 0x4191cadc : mtlr r0 > 0x4191cae0 : addi r1,r1,864 > 0x4191cae4 : blr > 0x4191cae8 : bl 0x41931810 = <__stack_chk_fail@plt> > 0x4191caec : stwu r1,-896(r1) > 0x4191caf0 : mflr r0 > 0x4191caf4 : bl 0x41931594 <.got+548> > 0x4191caf8 : li r9,128 > 0x4191cafc : stw r30,888(r1) > 0x4191cb00 : mflr r30 > 0x4191cb04 : stw r0,900(r1) > 0x4191cb08 : addi r4,r1,712 > 0x4191cb0c : stw r25,868(r1) > 0x4191cb10 : addi r5,r1,20 > 0x4191cb14 : stw r27,876(r1) > 0x4191cb18 : lwz r25,-36(r30) > 0x4191cb1c : lwz r27,0(r3) > 0x4191cb20 : stw r28,880(r1) > 0x4191cb24 : lwz r0,0(r25) > 0x4191cb28 : stw r0,844(r1) > 0x4191cb2c : li r0,0 > 0x4191cb30 : mr r28,r3 > 0x4191cb34 : stw r23,860(r1) > (gdb) info registers > r0 0xb3a7e38 188382776 > r1 0xffffbb40 -17600 > r2 0x418e4708 1099843336 > r3 0x1 1 > r4 0x41932264 1100161636 > r5 0x0 0 > r6 0x1 1 > r7 0x61 97 > r8 0x0 0 > r9 0x418e4708 1099843336 > r10 0xffffbb20 -17632 > r11 0x4191ed60 1100082528 > r12 0x44000048 1140850760 > r13 0x0 0 > r14 0x6 6 > r15 0x0 0 > r16 0x0 0 > r17 0x1 1 > r18 0x0 0 > r19 0x0 0 > r20 0x18c703c 25980988 > r21 0xffffffff -1 > r22 0x18f2984 26159492 > r23 0x0 0 > r24 0x0 0 > r25 0x1 1 > r26 0x1896608 25781768 > r27 0x0 0 > r28 0x0 0 > r29 0x0 0 > r30 0x41931598 1100158360 > r31 0x0 0 > pc 0x4191cac0 1100073664 > ps 0x0 0 > cr 0x44000048 1140850760 > lr 0x4191cabc 1100073660 > ctr 0x41bd1ad0 1102912208 > xer 0x20000000 536870912 > fpscr 0x0 0 > vscr 0x0 0 > vrsave 0x0 0 My powerpc64 -r280867 build does not have this problem. (But it is a = powerpc64-xtoolchain-gcc based build. I should probably also build and = keep a normal gcc 4.2.1 one at some point.) I listed the above issue first because I had far more detailed/specific = evidence than the below. B) The attempt to start sshd before login reports: > Performing sanity check on sshd configuration. > PRNG is not seeded > /etc/rc: WARNING: failed precmd routine for sshd A "sshd -T" or other such command also reports "PRNG is not seeded". Looking at sysctl output... > kern.random.harvest.mask_symbolic: = UMA_ALLOC,SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CAC= HED > kern.random.harvest.mask_bin: 1111111111 > kern.random.harvest.mask: 1023 > kern.random.yarrow.slowoverthresh: 2 > kern.random.yarrow.slowthresh: 128 > kern.random.yarrow.fastthresh: 96 > kern.random.yarrow.bins: 10 > kern.random.yarrow.gengateinterval: 10 > kern.random.live_entropy_sources:=20 > kern.random.active_adaptor: yarrow > kern.random.adaptors: yarrow(90),dummy(1) does not seem odd to me for 11.0-CURRENT or in comparison to my = powerpc64 build's output. As for what all is non-default for my configuration files (not much)... My use of networking is minimal and the configuration changes for that = are limited to rc.conf: > # more /etc/rc.conf > hostname=3D"FBSDG5C0" > ifconfig_bge0=3D"DHCP" > ifconfig_bge0_ipv6=3D"inet6 accept_rtadv" > ifconfig_gem0=3D"DHCP" > ifconfig_gem0_ipv6=3D"inet6 accept_rtadv" > sshd_enable=3D"YES" > #ntpd_enable=3D"YES" > #ntpd_sync_on_start=3D"YES" > # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable > dumpdev=3D"AUTO" > hald_enable=3D"YES" > dbus_enable=3D"YES" I also fiddle with /boot/loader.conf, /etc/fstab, /etc/make.conf, and = /etc/src.conf primarily. /etc/sysctl.conf for dump issues. = /usr/local/etc/sudoers . The rest of the configuration files are at the default/installation = status. My powerpc64 -r280867 build does not have this issue. (But it is a = powerpc64-xtoolchain-gcc based build.) Context details: # svnlite st /usr/srcC/ --no-ignore ? /usr/srcC/.snap ? /usr/srcC/restoresymtable M /usr/srcC/sys/ddb/db_main.c M /usr/srcC/sys/ddb/db_script.c ? /usr/srcC/sys/powerpc/conf/GENERIC64vtsc ? /usr/srcC/sys/powerpc/conf/GENERIC64vtsc-NODEBUG ? /usr/srcC/sys/powerpc/conf/GENERICvtsc ? /usr/srcC/sys/powerpc/conf/GENERICvtsc-NODEBUG M /usr/srcC/sys/powerpc/ofw/ofw_machdep.c M /usr/srcC/sys/powerpc/ofw/ofwcall64.S These are long standing changes associated with my finding a way for = PowerMac G5's to boot reliably (ofw_machdep.c) and getting some evidence = from early boot crashes in case they happen. Also the GENERIC*'s disable = ps3 in order to enable both vt and sc. They do include the standard = GENERIC*'s. Used for building the plain powerpc 11.0-CURRENT -r280867 variant that = produced the backtrace above: # more /etc/src.conf=20 #CFLAGS+=3D-DELF_VERBOSE WITH_DEBUG=3D WITH_DEBUG_FILES=3D # more /etc/make.conf=20 WRKDIRPREFIX=3D/usr/obj/portswork #WITH_DEBUG=3D #MALLOC_PRODUCTION=3D =3D=3D=3D Mark Millard markmi at dsl-only.net