From owner-freebsd-stable@freebsd.org Thu Feb 21 08:24:49 2019 Return-Path: Delivered-To: freebsd-stable@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 B5BE114FCA02 for ; Thu, 21 Feb 2019 08:24:49 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88A2995D10 for ; Thu, 21 Feb 2019 08:24:47 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id x1L8OijI094259 for ; Thu, 21 Feb 2019 09:24:44 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id E32D1A3C for ; Thu, 21 Feb 2019 09:24:43 +0100 (CET) Subject: Strange rtld-elf failure on stable/12 [Was: libcrypto.so.111 linked binaries SIGSEGV (in bhyve guest)] From: Harry Schmalzbauer To: freebsd-stable References: <335630bc-a558-9e31-5e2d-aee6237e83b0@omnilan.de> Organization: OmniLAN Message-ID: <596d1486-e2af-43f7-6f3f-65881e91819d@omnilan.de> Date: Thu, 21 Feb 2019 09:24:43 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <335630bc-a558-9e31-5e2d-aee6237e83b0@omnilan.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: ACL 130 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Thu, 21 Feb 2019 09:24:44 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-Rspamd-Queue-Id: 88A2995D10 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of freebsd@omnilan.de designates 2a00:e10:2800::a130 as permitted sender) smtp.mailfrom=freebsd@omnilan.de X-Spamd-Result: default: False [-6.76 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; DMARC_NA(0.00)[omnilan.de]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mx0.gentlemail.de]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-3.50)[ip: (-9.15), ipnet: 2a00:e10:2800::/64(-4.67), asn: 25074(-3.66), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:25074, ipnet:2a00:e10:2800::/64, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2019 08:24:50 -0000 Am 20.02.2019 um 17:51 schrieb Harry Schmalzbauer: > Hello, > … > gdb shows: > Core was generated by `/usr/sbin/auditdistd'. > 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 /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 > #0  memset (dest=0x80056f790, c=0, len=) >     at > /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/rtld.c:5624 > 5624                    ((char *)dest)[i] = c; > (gdb) bt > #0  memset (dest=0x80056f790, c=0, len=) >     at > /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/rtld.c:5624 > #1  0x0000000800235b07 in map_object (fd=3, path=0x800246140 > "/lib/libcrypto.so.111", >     sb=0x7fffffffd4a8) >     at > /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/map_object.c:249 > #2  0x0000000800230806 in load_object (name=0x201dba > "libcrypto.so.111", fd_u=-1, >     refobj=0x800248000, flags=) >     at > /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/rtld.c:2493 > #3  0x0000000800229972 in _rtld (sp=, > exit_proc=0x7fffffffea30, >     objp=0x7fffffffea38) >     at > /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/rtld.c:2315 > #4  0x0000000800228019 in .rtld_start () >     at > /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/amd64/rtld_start.S:39 > #5  0x0000000000000000 in ?? () > Current language:  auto; currently minimal > > Any help highly appreciated. > > This is with a live CD (amd64), compiled with stable/12 from today (so > clang 7.01). > The bhyve guest has 2GB hardwired and ran stable/11 beforehand, which > compiled the live CD. > bhyve host is 11.2.  But that shouldn't play a role, does it? I'm really interested what happens here. I built stable/11 in that bhyve guest and updated that guest to stable/11 from yesterday. To my surpise llvm 7.01 was also merged to stable/11.  Thank you for that great supprt! No problems with any binary in the stable/11 bhyve guest. Then I built stable/12 in that re-built stable/11 guest. As result, again all binaries linked to /lib/libcrypto.so.111 crash (signal 11) with the stable/12 iso in the same bhyve guest. Here the example from ntpq: Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libedit.so.7...Reading symbols from /usr/lib/debug//lib/libedit.so.7.debug...done. done. Loaded symbols for /lib/libedit.so.7 Reading symbols from /lib/libm.so.5...Reading symbols from /usr/lib/debug//lib/libm.so.5.debug...done. done. Loaded symbols for /lib/libm.so.5 Reading symbols from /libexec/ld-elf.so.1...Reading symbols from /usr/lib/debug//libexec/ld-elf.so.1.debug...done. done. #0  memset (dest=0x8005ef790, c=0, len=) at /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/rtld.c:5624 5624                    ((char *)dest)[i] = c; (gdb) bt #0  memset (dest=0x8005ef790, c=0, len=) at /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/rtld.c:5624 #1  0x000000080025db07 in map_object (fd=3, path=0x80026e1a0 "/lib/libcrypto.so.111", sb=0x7fffffffd4c8) at /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/map_object.c:249 #2  0x0000000800258806 in load_object (name=0x201b40 "libcrypto.so.111", fd_u=-1, refobj=0x800270000, flags=) at /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/rtld.c:2493 #3  0x0000000800251972 in _rtld (sp=, exit_proc=0x7fffffffea50, objp=0x7fffffffea58) at /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/rtld.c:2315 #4  0x0000000800250019 in .rtld_start () at /usr/local/share/deploy-tools/RELENG_12/src/libexec/rtld-elf/amd64/rtld_start.S:39 #5  0x0000000000000000 in ?? () So please correct me if I'm comletely wrong, but the problem here seems to be reproducably rtld-elf related. Unfortunately I don't know anything about object files and linkers and the related fundamental stuff. But maybe someone else has an idea what's going wrong here? Thanks, -Harry