From owner-freebsd-stable@freebsd.org Fri Apr 27 17:55:49 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 65B06FAE6F2 for ; Fri, 27 Apr 2018 17:55:49 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "david.siemens.de", Issuer "Siemens Issuing CA Internet Server 2017" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C250C724B0; Fri, 27 Apr 2018 17:55:48 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w3RHtkKF011472 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Apr 2018 19:55:46 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w3RHtjcl011495; Fri, 27 Apr 2018 19:55:45 +0200 Received: (from user@localhost) by curry.mchp.siemens.de (8.15.2/8.15.2) id w3RHtkVB041822; Date: Fri, 27 Apr 2018 19:55:45 +0200 From: Andre Albsmeier To: Dimitry Andric Cc: Dewayne Geraghty , FreeBSD Stable , Andre Albsmeier Subject: Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK Message-ID: <20180427175545.GB38967@bali> References: <20180425165840.GA1330@bali> <3A857D03-607A-4983-A4C2-D3A93119297A@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3A857D03-607A-4983-A4C2-D3A93119297A@FreeBSD.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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: Fri, 27 Apr 2018 17:55:49 -0000 On Thu, 26-Apr-2018 at 12:06:21 +0200, Dimitry Andric wrote: > On 26 Apr 2018, at 06:17, Dewayne Geraghty wrote: > > > > 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=227552 > > 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=clang&list_id=226390. > > > > Without time to investigate I've reverted userland > > FreeBSD 11.2-PRERELEASE r332843M amd64 1101515 1101509 > > FreeBSD 11.2-PRERELEASE r332843M i386 1101515 1101509 > > 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: Scary, seems to be OK here: buildbox:~>cat /usr/src/.svn_revision 333056 buildbox:~>uname -K -m i386 1101515 buildbox:~>w 19:51 up 4:41, 1 user, load averages: 0,25 0,26 0,21 USER TTY FROM LOGIN@ IDLE WHAT andre pts/0 bali 19:42 - w buildbox:~>uptime 19:51 up 4:41, 1 user, load averages: 0,25 0,26 0,21 buildbox:~>ll /lib/libxo.so.0 -r--r--r-- 1 root wheel 97596 27 Apr 15:07 /lib/libxo.so.0 buildbox:~> -Andre > > (gdb) bt > #0 ifree (tsd=0x28000000) at arena.h:799 > #1 0x2814b506 in __free (ptr=0x280601ef) 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=, flags=, fmt=0x804ad4d "{:time-of-day/%s} ") at /usr/src/contrib/libxo/libxo/libxo.c:6470 > #4 0x28089b61 in xo_emit (fmt=0x804ad4d "{:time-of-day/%s} ") at /usr/src/contrib/libxo/libxo/libxo.c:6541 > #5 0x08049f50 in main (argc=, argv=) at /usr/src/usr.bin/w/w.c:475 > #6 0x080494cd in _start1 () > #7 0x08049448 in _start () > #8 0x00000000 in ?? () > > 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. > > -Dimitry > -- Unix is very userfriendly. It's just picky who its friends are.