This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Test case for BZ 19329
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Cc: <nd at arm dot com>
- Date: Thu, 24 Nov 2016 12:31:31 +0000
- Subject: Re: [PATCH] Test case for BZ 19329
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <5836CC80.9070101@arm.com> <6ada070b-d57c-6716-2b2f-47ea2a0f0eeb@redhat.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 24/11/16 11:40, Florian Weimer wrote:
> On 11/24/2016 12:18 PM, Szabolcs Nagy wrote:
>> Test concurrent dlopen and pthread_create when the loaded
>> modules have TLS. This triggers dl-tls assertion failures
>> more reliably than the tst-stack4 test.
>>
>> The dlopened module has 100 DT_NEEDED dependencies and
>> for me about 4000 concurrent thread creations are needed
>> to see failures on x86_64.
>>
>> 2016-11-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
>>
>> [BZ #19329]
>> * nptl/Makefile (tests): Add tst-tls7.
>> (modules-names): Add tst-tls7mod, tst-tls7mod-dep.
>> * nptl/tst-tls7.c: New file.
>> * nptl/tst-tls7mod-dep.c: New file.
>> * nptl/tst-tls7mod.c: New file.
>>
>
> Please do not use assert in tests. Use the xpthread_* functions in test-skeleton.c instead.
>
i can do that but it looks ugly.
we are looking for an assertion failure anyway
so it would be better to make the test system
deal with that..
> This test will fail on large SMP machines due to timeouts because thread creation is rather expensive there. A
> less resource-intense way of writing this test would be to iterate multiple times and try to hit the race each
> time, with a smaller number of threads created in parallel.
>
i can try, but iterating is not easy: there
is dynamic linker internal state that cannot
be reset (generation counter, max dtv idx,
allocated slotininfo entries) so i'd need to
start a new process for every iteration.