From owner-freebsd-stable@freebsd.org Thu Apr 26 11:45:57 2018 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 2F28BFAAF9A for ; Thu, 26 Apr 2018 11:45:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF94770AC8 for ; Thu, 26 Apr 2018 11:45:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5E9D73186C; Thu, 26 Apr 2018 13:45:55 +0200 (CEST) From: Dimitry Andric Message-Id: <55C3B174-0A2B-4954-BEB8-BF6688EBB02D@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_D54C9553-0A66-4C26-9356-A3B9CB79E58D"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK Date: Thu, 26 Apr 2018 13:45:51 +0200 In-Reply-To: <3A857D03-607A-4983-A4C2-D3A93119297A@FreeBSD.org> Cc: FreeBSD Stable , Andre Albsmeier To: Dewayne Geraghty References: <20180425165840.GA1330@bali> <3A857D03-607A-4983-A4C2-D3A93119297A@FreeBSD.org> X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 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, 26 Apr 2018 11:45:57 -0000 --Apple-Mail=_D54C9553-0A66-4C26-9356-A3B9CB79E58D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 26 Apr 2018, at 12:06, Dimitry Andric wrote: >=20 > On 26 Apr 2018, at 06:17, Dewayne Geraghty = wrote: >>=20 >> Andre, You're not alone. I think there's a problem with clang6 on = i386 >> FreeBSD 11.1X, refer: >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227552 >> https://forums.freebsd.org/threads/uptime-w-i386-breakage.65584/ >> and perhaps also on amd64, search for >> = https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=3Dclang&list_id=3D= 226390. >>=20 >> Without time to investigate I've reverted userland >> FreeBSD 11.2-PRERELEASE r332843M amd64 1101515 1101509 >> FreeBSD 11.2-PRERELEASE r332843M i386 1101515 1101509 >=20 > As noted in another post, I cannot reproduce the problems with = gptboot, > but with FreeBSD-11.2-PRERELEASE-i386-20180420-r332802, I do indeed = see > w and uptime crashing in libxo: >=20 > (gdb) bt > #0 ifree (tsd=3D0x28000000) at arena.h:799 > #1 0x2814b506 in __free (ptr=3D0x280601ef) at tsd.h:716 > #2 0x2808bb07 in xo_do_emit_fields () at = /usr/src/contrib/libxo/libxo/libxo.c:6419 > #3 0x28089a1c in xo_do_emit (xop=3D, = flags=3D, fmt=3D0x804ad4d "{:time-of-day/%s} ") at = /usr/src/contrib/libxo/libxo/libxo.c:6470 > #4 0x28089b61 in xo_emit (fmt=3D0x804ad4d "{:time-of-day/%s} ") at = /usr/src/contrib/libxo/libxo/libxo.c:6541 > #5 0x08049f50 in main (argc=3D, argv=3D) at /usr/src/usr.bin/w/w.c:475 > #6 0x080494cd in _start1 () > #7 0x08049448 in _start () > #8 0x00000000 in ?? () >=20 > Not sure if this has anything to do with clang though, it looks more > like a double free to me, at first glance. I'll do some debugging. Strangely, simply recompiling libxo fixes the problem, or at least works around it. This is on the r332802 snapshot, so I guess the libxo.so.0 file shipped may be broken, somehow. -Dimitry --Apple-Mail=_D54C9553-0A66-4C26-9356-A3B9CB79E58D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWuG77wAKCRCwXqMKLiCW o9fuAKCZVy/0ZrYpGjQHPyJW12R0xpkkXwCbBPCoisn8aM/p0D7oFsfuDCz/o44= =JSWn -----END PGP SIGNATURE----- --Apple-Mail=_D54C9553-0A66-4C26-9356-A3B9CB79E58D--