Bug 9066 - glibc: Increase nr of static TLS slots
Summary: glibc: Increase nr of static TLS slots
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Khem Raj
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-02-05 10:57 UTC by Alexander Larsson
Modified: 2016-02-10 09:50 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Larsson 2016-02-05 10:57:06 UTC
This patch bumps the nr of static TLS slot from 14 to 32:

http://cgit.freedesktop.org/xdg-app/freedesktop-sdk-base/tree/meta-freedesktop/recipes-core/glibc/glibc/glibc-static-tls.patch

This is taken from fedora, and was added by Carlos O'Donell, who is an upstream glibc maintainer.

Without this you can run into issues where multiple libraries using static TLS slots end up being used in the same process, causing linker errors killing the app. In particular, both X, mesa and python use these, so that combination fail.
Comment 1 Khem Raj 2016-02-05 14:42:46 UTC
This patch is ok for bringing in. What is a good way for reproducing the errror ?
Comment 2 Ross Burton 2016-02-05 14:45:18 UTC
I was talking to Alex earlier, their environment was Python applications using GL with specific Mesa drivers.  Might be tricky to replicate, but xdg-app has been using it.
Comment 3 Khem Raj 2016-02-05 15:00:15 UTC
I dont see this patch being applied in fedora
Comment 5 Alexander Larsson 2016-02-05 16:08:50 UTC
Maybe this is not needed with later versions of glibc?
Comment 6 Khem Raj 2016-02-05 16:11:12 UTC
I wonder why it wouldnt be needed. on the other hand, it has resource impact since now double the space will be reserved for every thread.
Comment 7 Alexander Larsson 2016-02-10 09:50:54 UTC
Apparently this change drops the static TLS limit:

https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f8aeae347377f3dfa8cbadde057adf1827fb1d44;hp=b97eb2bdb1ed72982a7821c3078be591051cef59

This is in the glibc 2.22 release, so this patch should not be needed anymore.