From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6382 Path: news.gmane.org!not-for-mail From: =?GB2312?B?u8a9qNbS?= Newsgroups: gmane.linux.lib.musl.general Subject: musl pthread/tls issue. Date: Wed, 22 Oct 2014 14:33:01 +0800 Message-ID: <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=GB2312 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1413959612 11515 80.91.229.3 (22 Oct 2014 06:33:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 06:33:32 +0000 (UTC) To: musl@lists.openwall.com, Rich Felker Original-X-From: musl-return-6395-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 22 08:33:27 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 1XgpU6-0002U1-VR for gllmg-musl@plane.gmane.org; Wed, 22 Oct 2014 08:33:27 +0200 Original-Received: (qmail 25967 invoked by uid 550); 22 Oct 2014 06:33:25 -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 25959 invoked from network); 22 Oct 2014 06:33:24 -0000 X-QQ-mid: bizesmtp8t1413959586t708t248 X-QQ-SSF: 01400000002000F0F312B00A0000000 X-QQ-FEAT: QrV8FJxjKFuXflMr7N8TNbtzBsNhbghPWYYKMpiaqUmU1gJQZx6Xvpmf23vQ6 hhW42VIS14Yhe5KpUIadq8l5DhBetlEZSPrGtvg2o//l2iFTPRzrFWYQ2n0j1k7dyKf+8/c fuGKOc/B2sO59DyRD2MIANqO5oQgpLeYyD2FCcworcZmYf0LUCCORMlOCDkjsGxeDfbGzRe VAHpLmThEqw== X-QQ-GoodBg: 2 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 X-QQ-SENDSIZE: 520 X-QQ-FName: E8021108F290434C996D14FCEE7BF325 X-QQ-LocalIP: 112.95.241.173 Xref: news.gmane.org gmane.linux.lib.musl.general:6382 Archived-At: Hi, Rich and all. 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.) After a simple try, I found gnome-shell will segfault If I triggered the app list(not always but often). 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. 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. Here is the link to it: http://cgit.freedesktop.org/pixman/tree/pixman/pixman-compiler.h, please look at the TLS section. 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. 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 -- Huang JianZhong