Fix issues around glibc mis-calculating IE TLS sizes when spindle is running - #213
Open
mplegendre wants to merge 2 commits into
Open
mplegendre wants to merge 2 commits into
mplegendre wants to merge 2 commits into
Conversation
This adds a large library as a dependency to the testsuite, which triggers the spindle issues around too-large TLS causing application exits.
GLIBC has a bug where IE TLS is allocated at audit library startup rather than application startup, which happens before application libraries are identified and loaded. This can leave the app with insufficient IE TLS. This works around the issue by manually doing the IE TLS calculation at exec() time, then using the GLIBC_TUNABLES environment variable to set the TLS size to a sufficient level for the application. The IE TLS calculation is done on a single node and communicated to clients via the spindle network. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GLIBC has a bug where any LD_AUDITer disables the normal calculation for an application's IE TLS (also called static TLS in this commit). Applications that need more than the default amount of IE TLS will fail with a message about insufficient TLS under spindle. Based on conversations with GLIBC folks, this may not be fixed for a while (or ever).
To work around this, this commit manually calculates the amount of IE TLS needed before each exec() operation, then if more than the default it uses the GLIBC_TUNABLES environment variable to set the IE TLS amount. Spindle does this scalably by:
This PR also adds several libraries (libbigtls.*) to the testsuite's set of library loads. These libraries have enough TLS to overrun the default IE TLS provided by glibc and require the above algorithm to kick in.