From owner-svn-src-stable@freebsd.org Sun Aug 13 13:54:45 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99C16D93389; Sun, 13 Aug 2017 13:54:45 +0000 (UTC) (envelope-from andre@fbsd.e4m.org) Received: from mail.g66.org (mail.g66.org [85.10.206.112]) by mx1.freebsd.org (Postfix) with ESMTP id 1904D6F89F; Sun, 13 Aug 2017 13:54:44 +0000 (UTC) (envelope-from andre@fbsd.e4m.org) Received: from x55b58567.dyn.telefonica.de (x55b58567.dyn.telefonica.de [85.181.133.103]) (authenticated bits=128) by mail.g66.org (8.15.2/8.15.2) with ESMTPA id v7DDsglA027313; Sun, 13 Aug 2017 15:54:43 +0200 (CEST) (envelope-from andre@fbsd.e4m.org) Received: from stationary.client ([192.168.128.2]) by gate.local (8.15.2/8.15.2) with ESMTP id v7DDsgHi006730; Sun, 13 Aug 2017 15:54:42 +0200 (CEST) (envelope-from andre@fbsd.e4m.org) Received: from submit.client ([127.0.0.1]) by voyager.local (8.15.2/8.15.2) with ESMTP id v7DDsgWF028764; Sun, 13 Aug 2017 15:54:42 +0200 (CEST) (envelope-from andre@fbsd.e4m.org) Received: (from user@localhost) by voyager.local (8.15.2/8.15.2/Submit) id v7DDsgxp028763; Sun, 13 Aug 2017 15:54:42 +0200 (CEST) (envelope-from andre@fbsd.e4m.org) Date: Sun, 13 Aug 2017 15:54:42 +0200 From: Andre Albsmeier To: Konstantin Belousov Cc: Andre Albsmeier , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r322345 - stable/11/lib/libc/x86/sys Message-ID: <20170813135442.GA28728@voyager> References: <201708100900.v7A90FjI094474@repo.freebsd.org> <20170813131311.GA24473@voyager> <20170813133736.GO1700@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170813133736.GO1700@kib.kiev.ua> User-Agent: Mutt/1.7.2 (2016-11-26) X-Virus-Scanned: clamav-milter 0.99.2 at colo X-Virus-Status: Clean X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Aug 2017 13:54:45 -0000 On Sun, 13-Aug-2017 at 16:37:36 +0300, Konstantin Belousov wrote: > On Sun, Aug 13, 2017 at 03:13:11PM +0200, Andre Albsmeier wrote: > > On Thu, 10-Aug-2017 at 09:00:15 +0000, Konstantin Belousov wrote: > > > Author: kib > > > Date: Thu Aug 10 09:00:15 2017 > > > New Revision: 322345 > > > URL: https://svnweb.freebsd.org/changeset/base/322345 > > > > > > Log: > > > MFC r321608: > > > Use MFENCE to serialize RDTSC on non-Intel CPUs. > > > > This broke libc on my > > > > FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) > > VT(vga): text 80x25 > > CPU: AMD-K6tm w/ multimedia extensions (199.44-MHz 586-class CPU) > > Origin="AuthenticAMD" Id=0x562 Family=0x5 Model=0x6 Stepping=2 > > Features=0x8001bf > > AMD Features=0x400<> > > > > On system start, it actually makes various programmes hang until > > Ctrl-C is pressed. Reboot is not possible (endlessly hanging with > > 'zillions of defunct processes). > > > > Going back to r322042 fixes it... > > Indeed code is broken on i386 machines which have CPUID but no SSE. Wonder how many of these still exist... > Try this. I just compiled and installed libc.so.7 with this patch on the machine in question and the test I used for hunting down the reason (ls -l /lib) was OK. I then rebooted the whole box and it looked good as well. I did not compile stuff which links libc statically and hung before (devd) but I am pretty sure this will be OK as well... Thanks, -Andre > > diff --git a/lib/libc/x86/sys/__vdso_gettc.c b/lib/libc/x86/sys/__vdso_gettc.c > index 4ada5e7eac1..ef2ca69edf7 100644 > --- a/lib/libc/x86/sys/__vdso_gettc.c > +++ b/lib/libc/x86/sys/__vdso_gettc.c > @@ -101,6 +101,7 @@ init_fence(void) > #if defined(__i386__) > u_int cpuid_supported, p[4]; > > + lfence_works = LMB_NONE; > __asm __volatile( > " pushfl\n" > " popl %%eax\n" > @@ -121,8 +122,7 @@ init_fence(void) > cpuidp(0x1, p); > if ((p[3] & CPUID_SSE2) != 0) > lfence_works = select_lmb(); > - } else > - lfence_works = LMB_NONE; > + } > #elif defined(__amd64__) > lfence_works = select_lmb(); > #else -- My other computer is your windows box.