From owner-freebsd-current@FreeBSD.ORG Mon Mar 5 20:07:59 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE151065714; Mon, 5 Mar 2012 20:07:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 809ED8FC17; Mon, 5 Mar 2012 20:07:58 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q25K7owR010093; Mon, 5 Mar 2012 22:07:50 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q25K7n9R090520; Mon, 5 Mar 2012 22:07:49 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q25K7n5B090519; Mon, 5 Mar 2012 22:07:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 Mar 2012 22:07:49 +0200 From: Konstantin Belousov To: Lars Engels Message-ID: <20120305200749.GW75778@deviant.kiev.zoral.com.ua> References: <4F54DE25.7050200@lissyara.su> <4F54DEAC.3040200@lissyara.su> <20120305181025.GJ23354@e-new.0x20.net> <20120305191211.GT75778@deviant.kiev.zoral.com.ua> <20120305191622.GM23354@e-new.0x20.net> <20120305192749.GU75778@deviant.kiev.zoral.com.ua> <20120305194315.GN23354@e-new.0x20.net> <20120305195119.GV75778@deviant.kiev.zoral.com.ua> <20120305195310.GO23354@e-new.0x20.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jdAw5H+0hw/nhz1g" Content-Disposition: inline In-Reply-To: <20120305195310.GO23354@e-new.0x20.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Alex Keda , freebsd-current@freebsd.org, alc@freebsd.org Subject: Re: -CURRENT is broken? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 20:07:59 -0000 --jdAw5H+0hw/nhz1g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 05, 2012 at 08:53:10PM +0100, Lars Engels wrote: > On Mon, Mar 05, 2012 at 09:51:19PM +0200, Konstantin Belousov wrote: > > On Mon, Mar 05, 2012 at 08:43:15PM +0100, Lars Engels wrote: > > > On Mon, Mar 05, 2012 at 09:27:49PM +0200, Konstantin Belousov wrote: > > > > On Mon, Mar 05, 2012 at 08:16:22PM +0100, Lars Engels wrote: > > > > > On Mon, Mar 05, 2012 at 09:12:11PM +0200, Konstantin Belousov wro= te: > > > > > > On Mon, Mar 05, 2012 at 10:41:01AM -0800, Jos Backus wrote: > > > > > > > On Mon, Mar 5, 2012 at 10:10 AM, Lars Engels wrote: > > > > > > > > On Mon, Mar 05, 2012 at 07:41:32PM +0400, Alex Keda wrote: > > > > > > > >> On 05.03.2012 19:39, Alex Keda wrote: > > > > > > > >> > I have 2 machine, i386 and amd64 > > > > > > > >> > world rebuild tonight all work. all applications crash w= ith core dump... > > > > > > > >> read as "world rebuild tonight not work" =3D)) > > > > > > >=20 > > > > > > > I noticed the same thing. My `make world' dies right after in= stalling > > > > > > > the new runtime linker. I was able to recover by copying > > > > > > > ld-elf.so.1.old using /rescue/{chflags,cp}. Oddly enough, whe= n I > > > > > > > manually build and install the runtime linker, it works. Mayb= e that's > > > > > > > a clue as to what's wrong. > > > > > >=20 > > > > > > I just did full buildworld on pristine sources at r232541 and a= md64 machine > > > > > > booted fine. > > > > > >=20 > > > > > > Can somebody put the faulting ld-elf.so.1 somewhere so I can do= wnload it ? > > > > >=20 > > > > > http://bsd-geek.de/FreeBSD/ld-elf.so.1 > > > >=20 > > > > It works for me :(. > > > >=20 > > > > Since your rtld is not stripped, try to link any binary using this = interpreter, > > > > i.e. supply -Wl,-I, to cc link comman= d. > > > > Then run the program, get core dump, load it into gdb and do "bt al= l". > > >=20 > > > "bt all" gives "No symbol table is loaded. Use the "file" command." > > >=20 > > > But just "bt" gives: > > >=20 > > > http://bsdpaste.bsdgroup.de/130927 > > Hm, so do you have libmap.conf ? > >=20 > > Yeah, it faults immediately. > > I suspect I know what is going on. > >=20 > Yes, I have this in libmap.conf: > libpcre.so.0 libpcre.so.1 >=20 The following change fixes ld-elf.so.1 with the present libmap.conf for me. diff --git a/libexec/rtld-elf/libmap.c b/libexec/rtld-elf/libmap.c index 773456b..cc4fd2b 100644 --- a/libexec/rtld-elf/libmap.c +++ b/libexec/rtld-elf/libmap.c @@ -3,7 +3,6 @@ */ =20 #include -#include #include #include #include @@ -53,6 +52,12 @@ static int closestrfn (void * cookie); #define iseol(c) (((c) =3D=3D '#') || ((c) =3D=3D '\0') || \ ((c) =3D=3D '\n') || ((c) =3D=3D '\r')) =20 +/* + * Do not use ctype.h macros, which rely on the working tls. It is + * too early to have thread-local variables operatable. + */ +#define isspace1(c) ((c) =3D=3D ' ' || (c) =3D=3D '\t') + int lm_init (char *libmap_override) { @@ -107,7 +112,7 @@ lmc_parse (FILE *fp) t =3D f =3D c =3D NULL; =20 /* Skip over leading space */ - while (isspace(*cp)) cp++; + while (isspace1(*cp)) cp++; =20 /* Found a comment or EOL */ if (iseol(*cp)) continue; @@ -117,7 +122,7 @@ lmc_parse (FILE *fp) cp++; =20 /* Skip leading space */ - while (isspace(*cp)) cp++; + while (isspace1(*cp)) cp++; =20 /* Found comment, EOL or end of selector */ if (iseol(*cp) || *cp =3D=3D ']') @@ -125,11 +130,11 @@ lmc_parse (FILE *fp) =20 c =3D cp++; /* Skip to end of word */ - while (!isspace(*cp) && !iseol(*cp) && *cp !=3D ']') + while (!isspace1(*cp) && !iseol(*cp) && *cp !=3D ']') cp++; =20 /* Skip and zero out trailing space */ - while (isspace(*cp)) *cp++ =3D '\0'; + while (isspace1(*cp)) *cp++ =3D '\0'; =20 /* Check if there is a closing brace */ if (*cp !=3D ']') continue; @@ -141,7 +146,7 @@ lmc_parse (FILE *fp) * There should be nothing except whitespace or comment from this point to the end of the line. */ - while(isspace(*cp)) cp++; + while(isspace1(*cp)) cp++; if (!iseol(*cp)) continue; =20 strcpy(prog, c); @@ -151,20 +156,20 @@ lmc_parse (FILE *fp) =20 /* Parse the 'from' candidate. */ f =3D cp++; - while (!isspace(*cp) && !iseol(*cp)) cp++; + while (!isspace1(*cp) && !iseol(*cp)) cp++; =20 /* Skip and zero out the trailing whitespace */ - while (isspace(*cp)) *cp++ =3D '\0'; + while (isspace1(*cp)) *cp++ =3D '\0'; =20 /* Found a comment or EOL */ if (iseol(*cp)) continue; =20 /* Parse 'to' mapping */ t =3D cp++; - while (!isspace(*cp) && !iseol(*cp)) cp++; + while (!isspace1(*cp) && !iseol(*cp)) cp++; =20 /* Skip and zero out the trailing whitespace */ - while (isspace(*cp)) *cp++ =3D '\0'; + while (isspace1(*cp)) *cp++ =3D '\0'; =20 /* Should be no extra tokens at this point */ if (!iseol(*cp)) continue; --jdAw5H+0hw/nhz1g Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9VHRUACgkQC3+MBN1Mb4gjcACePbI3FQ9Ig4SE5BJBMFi7RbQV YSEAnAwpj3GzLYQHE/SinMl0SshhSRt4 =U3iP -----END PGP SIGNATURE----- --jdAw5H+0hw/nhz1g--