From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6386 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl pthread/tls issue. Date: Wed, 22 Oct 2014 09:45:37 +0200 Message-ID: <20141022074536.GF16659@port70.net> 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=us-ascii X-Trace: ger.gmane.org 1413963960 12644 80.91.229.3 (22 Oct 2014 07:46:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 07:46:00 +0000 (UTC) Cc: Rich Felker To: musl@lists.openwall.com Original-X-From: musl-return-6399-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 22 09:45:53 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 1XgqcB-0001xV-6p for gllmg-musl@plane.gmane.org; Wed, 22 Oct 2014 09:45:51 +0200 Original-Received: (qmail 9468 invoked by uid 550); 22 Oct 2014 07:45:50 -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 9453 invoked from network); 22 Oct 2014 07:45:49 -0000 Mail-Followup-To: musl@lists.openwall.com, Rich Felker Content-Disposition: inline In-Reply-To: <54474F9D.3090306@i-soft.com.cn> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:6386 Archived-At: * ?????? [2014-10-22 14:33:01 +0800]: > 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. > that's not enough info.. both the webkit js and this crash sounds like thread stack overflow > 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. > i don't believe that without evidence: general_composite_rect itself allocates >24k on the stack, that is about a third of the musl default stack size you can verify it by checking the diff of the top and bottom of the stack (gdb backtrace prints the stack pointer, if the diff is >56k when that func was entered then this was the problem) or looking at /proc/pid/maps and if the crash happened in a guard page after a thread stack to fix: make the application create a larger thread stack eg 1M (pthread_attr_setstacksize, but gnome* will use gthread most likely which has different api)