From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6387 Path: news.gmane.org!not-for-mail From: Timo Teras Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl pthread/tls issue. Date: Wed, 22 Oct 2014 10:58:47 +0300 Message-ID: <20141022105847.1c97ec1d@vostro> References: <54474F9D.3090306@i-soft.com.cn> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1413964788 25754 80.91.229.3 (22 Oct 2014 07:59:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 07:59:48 +0000 (UTC) Cc: musl@lists.openwall.com, Rich Felker To: =?UTF-8?B?6buE5bu65b+g?= Original-X-From: musl-return-6400-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 22 09:59:43 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Xgqpa-0006u0-NQ for gllmg-musl@plane.gmane.org; Wed, 22 Oct 2014 09:59:43 +0200 Original-Received: (qmail 5607 invoked by uid 550); 22 Oct 2014 07:59:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5599 invoked from network); 22 Oct 2014 07:59:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=4Gt86JNKiSW/If/wn0ZhX/NbC8hBdrG43OD8hplgDB0=; b=QmPYunMAb0N4G0E8kQI4SZ6U8mKajvZQCUWSgd6MIckLYY6U0Eyl5ZYqMgausxNY6h 1EbGozyNWrF4bc3aFqvvL+QVDSIsh9STN1xR3Qvr4jqUZ3z6R1s7T5J1lGZm7ovBDDbf V8hn7A6uQJseKmjJeYIbGBUR5l2E+rXr7fuPg1X4VgilQbbyXNe7mSWOJIMA40q2P/JU EuB9zPGDQ3a0j+DEMkXhz7EZPee7wSQsYvAhnm5pmQ8pveGKXyABzPddx8kAFYQRwiuO KT+nBChTRX26SfTjrRgHwPiZVTrlFY4iMKYsHK5gZ9MN5UA137U0x8Yp4Buw/mueoGD/ DgjA== X-Received: by 10.112.150.68 with SMTP id ug4mr21674841lbb.82.1413964769589; Wed, 22 Oct 2014 00:59:29 -0700 (PDT) Original-Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= In-Reply-To: <54474F9D.3090306@i-soft.com.cn> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-alpine-linux-musl) Xref: news.gmane.org gmane.linux.lib.musl.general:6387 Archived-At: On Wed, 22 Oct 2014 14:33:01 +0800 =E9=BB=84=E5=BB=BA=E5=BF=A0 wrote: > Hi, Rich and all. >=20 > These days, I finished build a bootable x86_64 system(rpm based) > include musl/systemd/dracut/gcc-4.9.1/gcc-5/clang-3.5 and > wayland/Xorg and the whole GNOME-3.14 desktop(except webkit js > segfault issue I mentioned before) with a lot of patches(I will > release all of them someday until it reach a stable state.) >=20 > After a simple try, I found gnome-shell will segfault If I triggered > the app list(not always but often). >=20 > The dmesg report "pool [] segfault xxxxxxxxxxx > libpixman-xxxxx", That's to say, it segfault in pixman library(A > common library used by Xorg and cairo), > gdb report it's a thread issue(a thread of gnome-shell) and segfault > at the beginning of general_composite_rect function in > pixman-general.c, the pointer of argument can not be accessed. >=20 > And after a quick look, the problem is in pixman-compiler.h, it > defined TLS related codes and macros according to specific > implementation(win32/mingw/pthread and so on). > By default, the TLS codes will be compiled, if it was disabled, there > is still a pthread fallback use 'pthread_key_create' and other > pthread funcs. >=20 > Here is the link to it: > http://cgit.freedesktop.org/pixman/tree/pixman/pixman-compiler.h, > please look at the TLS section. >=20 > That's to say, there must be a problem exist in musl pthread/tls > implementation and can be triggered under certain circumstances. > Please help to solve it. >=20 > Related components: > Kernel: linux-3.17.0 without patch. > binutils: 2.24.90 without patch. > Compiler: gcc-5 and clang-3.5. with musl-enable patch. > Pixman: 0.32.6 git > Cairo: 1.14.0 > Mesa: 10.3.1 stable > Xorg: 1.16.1 stable > gnome: 3.14 stable Is it perhaps this: https://bugs.freedesktop.org/show_bug.cgi?id=3D35268 Does preloading libGL.so help? We do this as workaround for eg. firefox currently (in Alpine Linux): http://git.alpinelinux.org/cgit/aports/commit/?id=3Dd9cda70e2c149004f1e87ed= d1de8f6e332e76953 /Timo