This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][patch] Fix racy nptl/tst-getpid2
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: libc-alpha at sourceware dot org, ronis at google dot com
- Date: Mon, 1 Oct 2012 11:59:36 -0700
- Subject: Re: [RFC][patch] Fix racy nptl/tst-getpid2
- References: <20121001183214.B03561908A5@elbrus2.mtv.corp.google.com>
On Mon, Oct 1, 2012 at 11:32 AM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> Greetings,
>
> The nptl/tst-getpid2 failed on one of our nightly builders, and we've
> discovered that it is quite flaky:
>
> build=$PWD
> j=0;
> while GCONV_PATH=$build/iconvdata LC_ALL=C \
> $build/elf/ld-linux-x86-64.so.2 --library-path $build:$build/nptl \
> $build/nptl/tst-getpid2 > /dev/null; do
> j=$(($j+1))
> done;
> echo "failed after $j iterations"
>
>
> Didn't expect signal from child: got `Illegal instruction'
> failed after 140 iterations
>
> Didn't expect signal from child: got `Illegal instruction'
> failed after 28 iterations
>
> Didn't expect signal from child: got `Illegal instruction'
> failed after 12 iterations
>
>
>
> What's happening here is that f() is invoked in a CLONE_VM cloned "thread",
> without setting up TLS for that cloned thread (and therefore sharing TLS
> with the parent thread).
>
> The dynamic loader doesn't expect such sharing, and will crash if two
> threads attempt to resolve some dynamic symbols at the same time.
>
> The crash goes away when LD_BIND_NOW=1 is set in the environment,
> as attached patch does.
>
It is
http://sourceware.org/bugzilla/show_bug.cgi?id=11214
I believe the test is invalid.
--
H.J.