Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141022074536.GF16659@port70.net>
Date: Wed, 22 Oct 2014 09:45:37 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Cc: Rich Felker <dalias@...c.org>
Subject: Re: musl pthread/tls issue.

* ?????? <jianzhong.huang@...oft.com.cn> [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 [<some pid>] 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)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.