Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Apr 2024 14:57:19 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Yuri <yuri@freebsd.org>
Cc:        Freebsd hackers list <freebsd-hackers@freebsd.org>
Subject:   Re: What does this error mean: No space available for static Thread Local Storage ?
Message-ID:  <ZiOtn1cbHXLQDje4@kib.kiev.ua>
In-Reply-To: <42774b55-241a-497b-816f-94b95187c3e6@FreeBSD.org>
References:  <42774b55-241a-497b-816f-94b95187c3e6@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 19, 2024 at 07:30:48PM -0700, Yuri wrote:
> Hi,
> 
> 
> The shared library that is built by the Rust's toolchain for the port
> misc/py-polars fails to be loaded:
> 
> No space available for static Thread Local Storage
> 
> 
> What does this mean, and what might be wrong?

The error mean that the process tries to load a dso (shared library) that
was build with initial-exec TLS model, and there is not enough space in
the initial TLS segment reserved by rtld to accomodate the dso needs.

As a temporary measure, you might try to play with the LD_STATIC_TLS_EXTRA
env variable to specify the desired size.  Default value is 128 bytes.

For gcc and clang, the TLS model is controlled by -ftls-model switch.
No idea how to pass this through rustc.

One possible reason why you get the initial-exec model is when dso code
was compiled in non-pic mode.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZiOtn1cbHXLQDje4>