Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2018 23:17:24 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Mike Tancsa <mike@sentex.net>
Cc:        FreeBSD-STABLE Mailing List <freebsd-stable@FreeBSD.org>
Subject:   Re: uptime / w coredumping on RELENG11 (i386 only)
Message-ID:  <D80B47F4-16DD-4C69-A0AB-1F518F584566@FreeBSD.org>
In-Reply-To: <865dd1e1-b29e-7d5b-41a5-e23a07b2f981@sentex.net>
References:  <990862af-7bee-0d4b-c01f-d7fc8e5b6cfe@sentex.net> <955d6681-0048-5e09-cca6-4691b05bf48f@sentex.net> <18E4C626-410B-417F-89F2-4F16074749A1@FreeBSD.org> <865dd1e1-b29e-7d5b-41a5-e23a07b2f981@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_CEF8473B-4D9D-461C-B55B-02AFFDA75C8C
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii

On 16 May 2018, at 15:54, Mike Tancsa <mike@sentex.net> wrote:
> 
> On 5/15/2018 2:31 PM, Dimitry Andric wrote:
>> On 15 May 2018, at 20:22, Mike Tancsa <mike@sentex.net> wrote:
>>> 
>>>> 
>>>> Anyone else see this ?
>> 
>> See <https://bugs.freebsd.org/227552>.  There is a fix coming up.
> 
> I tried the patch and did a full rebuild and it indeed fixed the problem
> for me.  Is the bug potentially more wide spread that just libxo ? Also
> does it possibly affect amd64, just in a non obvious way ?

Yes to both, at least theoretically.  The problem is actually in
elftoolchain's strip command, which can mess up the TLS section in an
executable or shared library.  When the dynamic linker loads such a bad
file, it will setup incorrect TLS data, which can lead to crashes.

In case of libxo.so.0, this appears to have been caused by clang 6
giving a slightly different ELF layout than clang 5.  During buildworld,
libxo.so.0 is built with debugging information, which is later copied
to a libxo.so.0.debug file, while it is removed from the original
libxo.so.0 file.

Up to this point, everything is still fine with libxo.so.0, still, but
during installworld, the file is stripped *again*, by install -s (this
is something we should revisit because it seems no longer useful).  This
second round of stripping messes up the TLS section.

-Dimitry


--Apple-Mail=_CEF8473B-4D9D-461C-B55B-02AFFDA75C8C
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

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWvyf5AAKCRCwXqMKLiCW
o4CmAJ9mETxqmN9al71pw2XCGjq/8VX/LgCfbyfKHvM/r6bxw2oBQSDhpiEMYbI=
=K3uI
-----END PGP SIGNATURE-----

--Apple-Mail=_CEF8473B-4D9D-461C-B55B-02AFFDA75C8C--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D80B47F4-16DD-4C69-A0AB-1F518F584566>