Discussion:
What does this error mean: No space available for static Thread Local Storage ?
(too old to reply)
Yuri
2024-04-20 02:30:48 UTC
Permalink
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?



Thank you,

Yuri
Gleb Popov
2024-04-20 08:29:38 UTC
Permalink
Post by Yuri
Hi,
No space available for static Thread Local Storage
What does this mean, and what might be wrong?
This message probably comes from the library code. I'd start looking there.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Yuri
2024-04-20 08:37:07 UTC
Permalink
Post by Gleb Popov
This message probably comes from the library code. I'd start looking there.
No, it comes from the FreeBSD src tree.


The problem with this message is that it is cryptic, and doesn't lead
the user to a solution.



Yuri
Fernando Apesteguía
2024-04-20 09:03:01 UTC
Permalink
Post by Gleb Popov
This message probably comes from the library code. I'd start looking there.
No, it comes from the FreeBSD src tree.
The problem with this message is that it is cryptic, and doesn't lead the
user to a solution.
Might it be incompatible build options?


https://forums.freebsd.org/threads/apache24-php7-1-got-no-space-available-for-static-thread-local-storage-error-when-start.63531/
Post by Gleb Popov
Yuri
Juraj Lutter
2024-04-20 09:10:10 UTC
Permalink
Post by Yuri
Post by Gleb Popov
This message probably comes from the library code. I'd start looking there.
No, it comes from the FreeBSD src tree.
The problem with this message is that it is cryptic, and doesn't lead the user to a solution.
When we’re at rust and memory (thread-local storage?) related: I’ve tried to run databases/qdrant
in production. It works until it’s idle. When some collections are being created/loaded, it crashes.
I have been able to track it down to malloc() called from within strdup() called from within thr_set_name().

That internally calls, something like:

frame #6: 0x00003f6e7cbc8955 libc.so.7`__je_tsd_fetch_slow(tsd=0x00003f6faeb53090, minimal=<unavailable>) at jemalloc_tsd.c:0
frame #7: 0x00003f6e7cb77e3a libc.so.7`__je_malloc_default [inlined] tsd_fetch_impl(init=true, minimal=false) at tsd.h:355:10
frame #8: 0x00003f6e7cb77e30 libc.so.7`__je_malloc_default [inlined] tsd_fetch at tsd.h:381:9
frame #9: 0x00003f6e7cb77e30 libc.so.7`__je_malloc_default [inlined] imalloc(sopts=<unavailable>, dopts=<unavailable>) at jemalloc_jemalloc.c:2256:15
frame #10: 0x00003f6e7cb77e30 libc.so.7`__je_malloc_default(size=40) at jemalloc_jemalloc.c:2293:2

I can reliably reproduce the problem on both stable/13, stable/14 and main.

otis



Juraj Lutter
***@FreeBSD.org



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Konstantin Belousov
2024-04-20 11:57:19 UTC
Permalink
Post by Yuri
Hi,
The shared library that is built by the Rust's toolchain for the port
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.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...