From owner-freebsd-hackers@freebsd.org Sat Dec 8 00:25:41 2018 Return-Path: Delivered-To: freebsd-hackers@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 6A45A1326511; Sat, 8 Dec 2018 00:25:41 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AC73C7FC59; Sat, 8 Dec 2018 00:25:40 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id wB80Pd90024147 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 7 Dec 2018 16:25:39 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id wB80PdR4024146; Fri, 7 Dec 2018 16:25:39 -0800 (PST) (envelope-from sgk) Date: Fri, 7 Dec 2018 16:25:39 -0800 From: Steve Kargl To: Konstantin Belousov Cc: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: HEADSUP: Something has gone south with -current Message-ID: <20181208002539.GC23410@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20181207230622.GA22163@troutmask.apl.washington.edu> <20181207233019.GA22981@troutmask.apl.washington.edu> <20181207235233.GA23410@troutmask.apl.washington.edu> <20181208000820.GM52540@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181208000820.GM52540@kib.kiev.ua> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: AC73C7FC59 X-Spamd-Result: default: False [2.16 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.37)[-0.367,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[washington.edu]; REPLYTO_ADDR_EQ_FROM(0.00)[]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.78)[0.784,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.82)[0.820,0]; RCVD_IN_DNSWL_MED(-0.20)[21.76.95.128.list.dnswl.org : 127.0.11.2]; MX_GOOD(-0.01)[cached: troutmask.apl.washington.edu]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.24)[ip: (0.97), ipnet: 128.95.0.0/16(0.10), asn: 73(0.20), country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Dec 2018 00:25:41 -0000 On Sat, Dec 08, 2018 at 02:08:20AM +0200, Konstantin Belousov wrote: > On Fri, Dec 07, 2018 at 03:52:33PM -0800, Steve Kargl wrote: > > On Fri, Dec 07, 2018 at 03:30:19PM -0800, Steve Kargl wrote: > > > On Fri, Dec 07, 2018 at 03:06:22PM -0800, Steve Kargl wrote: > > > > > > > > make core dumps. > > > > devd core dumps. > > > > init core dumps. > > > > cc core dumps. > > > > c++ core dumps. > > > > > > > > Something seems to be broken. > > > > > > > > > > Further investigation, > > > as core dumps. > > > cpp core dumps. > > > /rescue/vi core dumps. > > > > > > All of these programs are statically linked. Note, ar and ranlib > > > have static linkage, and appear to still work but these were not > > > replaced by the failing 'make installworld'. > > > > > > Ah, so if I go into /usr/obj/usr/src/amd64.amd64/ar, this ar > > > is static and not stripped and works! But, if I do > > > > > > cp ar ar.new > > > strip ar > > > ./ar > > > > > > This ar core dumps. So, stripping static binaries seems to > > > break the binary. > > > > > > > Yep, definitely, a problem with stripping static binaries. > > > > I copied both init and devd from /usr/obj to /sbin without > > stripping the binaries. System rebooted as expected. > > Most likely this is an issue fixed by r339350. My tree is at r341703. The last paragraph of the commit message for r339350 is Just remove filter_reloc. This fixes certain cases including statically linked binaries containing ifuncs. Stripping binaries with relocations referencing removed symbols was already broken, and after this change may still be broken in a different way. So, I guess I'm hitting the "broken in a different way". The gdb82 backtrace ends up in jemalloc. I do build world with MALLOC_PRODUCTION="YES". Perhaps, ifuncs+jemalloc aren't at production level. I have few more broken static binaries that I need to replace before I can rebuild without MALLOC_PRODUCTION. -- Steve