Date: Tue, 22 Aug 2017 08:17:38 -0700 From: David Wolfskill <david@catwhisker.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: current@freebsd.org Subject: Re: SIGSEGV in /bin/sh after r322740 -> r322776 update Message-ID: <20170822151738.GV1130@albert.catwhisker.org> In-Reply-To: <20170822131958.GE1700@kib.kiev.ua> References: <20170822114627.GC1130@albert.catwhisker.org> <20170822115923.GC1700@kib.kiev.ua> <20170822122836.GH1130@albert.catwhisker.org> <20170822123449.GD1700@kib.kiev.ua> <20170822124617.GN1130@albert.catwhisker.org> <20170822131958.GE1700@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--1vbNym9KGxCl/IZ3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 22, 2017 at 04:19:58PM +0300, Konstantin Belousov wrote: > ... > > > Ok, can you rebuild kernel and libc from scratch ? I.e. remove your > > > object directories. > >=20 > > I think I'll need a working /bin/sh to do that. As noted, I could > > try the stable/11 /bin/sh; on the other hand, if it's dying in a > > library, that's not likely to help a whole lot. :-} > I highly suspect that this is not /bin/sh at all. Backtrace strongly > suggests that the malloc() has issues, but again I suspect that the > reason is not an issue in malloc, but its use of TLS. >=20 > The amd64 changes were to the TLS base register handling. So you might > try to boot previous kernel. If this works out without replacing libc > then it is definitely TLS, but I still do not know what is wrong. >=20 > >=20 > > But yes: once we resolve the "working /bin/sh" issue, clearing > > /usr/obj & rebuilding is straighforward and shouldn't take too long. > .... OK. Booting from the previous kernel (/boot/kernel.old) allowed /bin/sh (et al.) to work without segfaults, so after clearing /usr/obj, I rebuilt r322776 from scratch (yes, userland as well as kernel). On reboot, I wtached the serial console, and noted: =2E.. Mounting local filesystems:. ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/= lib/perl5/5.24/mach/CORE 32-bit compatibility ldconfig path: /usr/lib32 /usr/lib32/compat Setting hostname: freebeast.catwhisker.org. Setting up harvesting: [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_= TUN,MOUSE,KEYBOARD,ATTACH,CACHED Feeding entropy: . Starting Network: lo0 re0. lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3D600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_pIPV6> inet6 ::id 298 (sh), uid 0: exited on signal 11 prefixlen 128 1 (co= re dumped) inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2=20 inet 127.0.0.1 netmask 0xff000000=20 nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL> groups: lo=20 re0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTpICAST> metric 0 id 305 = (sh), uid 0: exited on signal 11 (core dumped) mtu 1500 options=3D8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,W= OL_MAGIC,LINKSTATE> ether 98:90:96:d6:c9:6d inet 172.16.8.10 netmask 0xffffff00 pid 310 (sh), uid 0: exited on = signal 11 (core dumped) broadcast 172.16.8.255=20 nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect (none) status: no re0: link state changed to UP carrier Segmentation fault (core dumped) Startpid 314 (sh), uid 0: exited on signal 11 (core dumped) ing devd. Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) pid 319 (sh), uid 0: exited on signal 11 (core dumped) Segmentation fault (core dumped) pid 330 (sh), uid 0: exited on signal 11 (core dumped) Segmentation fault (core dumped)ubt0 on uhub2 ubt0: <Broadcom Corp BCM43142A0, rev 2.00/1.12, addr 3> on usbus0 random: harvesting attach, 8 bytes (4 bits) from ubt0 pid 339 (sh), uid 0: exited on signal 11 (core dumped) Segmentation fault (core dumped) pid 343 (sh), uid 0: exited on signal 11 (core dumped) Segmentation fault (core dumped)WARNING: attempt to domain_add(bluetooth) a= fter domainfinalize() WARNING: attempt to domain_add(netgraph) after domainfinalize() add host 127.0.0.1: gateway lo0 fib 0: route already in table add net default: gateway 172.16.8.1 add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Creating and/or trimming log files. Starting syslogd. Starting rpcbind. NFS access cache time=3D60 No core dumps found. Setting NIS domain: lmdhw.com. Starting ypbind. Clearing /tmp (X related). Starting mountd. NFSv4 is disabled Starting nfsd. Starting statd. Starting lockd. Recovering vi editor sessions:. Starting lpd. Upda FreeBSD/amd64 (freebeast.catwhisker.org) (ttyu0) login:=20 [end of console output -- dhw] So ... looks as if we still have at least one issue, and we have a way to evade the segfaults. Bisection time? Or if there's another approach (or even a suggestion for a revision to try first), I'm up for it. 9And yes, I'll just be rebuilding the kernel for the rest of this exercise, I think. That should speed things up significantly.) Peace, david --=20 David H. Wolfskill david@catwhisker.org If we wish to eliminate sources of Fake News, start at the top: D. Trump. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --1vbNym9KGxCl/IZ3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJZnEsSXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDQ0I3Q0VGOTE3QTgwMUY0MzA2NEQ3N0Ix NTM5Q0M0MEEwNDlFRTE3AAoJEBU5zECgSe4Xi9gH/jOZFmTWfiSKlpcmxZlje3k9 WLWZAgnBYF//cDzwpJV8H4hbblOQts5u8W5yS8V6ukWkDtHcQqxDsmjvTdI1nyyo 7541/o5revMK2mT7Ob9rSQdHYkvi0vOj1rgfOYzCR4rqV7FoYQMZuEWlEdCdOp77 7JGGNln/hs6AF4j0URX7L0+CxtyaRw4Ow4Npaymdsbr781txSPcQPjYCZYPvlL9N HJQnMXd6NreBarFFPP5fALRgogtG6kISAsbHs/7S1NukmeUtoWFPWFpx5YBFtqj3 iPitghKhcqDb2XuuEN5bG6TaMpOSJs36UY3RPoMVEkxhN9PvrD/5s7X4gbN5Buk= =NcAW -----END PGP SIGNATURE----- --1vbNym9KGxCl/IZ3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170822151738.GV1130>