Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Apr 2024 11:10:10 +0200
From:      Juraj Lutter <otis@FreeBSD.org>
To:        Yuri <yuri@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: What does this error mean: No space available for static Thread Local Storage ?
Message-ID:  <A0BBFBF0-B531-4A07-A043-ABC7EBE049DE@FreeBSD.org>
In-Reply-To: <6fd793ca-60ec-47e7-9ec9-4bcb56803426@FreeBSD.org>
References:  <42774b55-241a-497b-816f-94b95187c3e6@FreeBSD.org> <CALH631mpos%2BQPHR=t9JJsqi-AqBhwJh51u76rK2Sgg0WyeBZ2A@mail.gmail.com> <6fd793ca-60ec-47e7-9ec9-4bcb56803426@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 20 Apr 2024, at 10:37, Yuri <yuri@FreeBSD.org> wrote:
>=20
> On 4/20/24 01:29, Gleb Popov wrote:
>> This message probably comes from the library code. I'd start looking =
there.
>>=20
>=20
> No, it comes from the FreeBSD src tree.
>=20
> The problem with this message is that it is cryptic, and doesn't lead =
the user to a solution.

When we=E2=80=99re at rust and memory (thread-local storage?) related: =
I=E2=80=99ve tried to run databases/qdrant
in production. It works until it=E2=80=99s 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=3D0x00003f6faeb53090, =
minimal=3D<unavailable>) at jemalloc_tsd.c:0
    frame #7: 0x00003f6e7cb77e3a libc.so.7`__je_malloc_default [inlined] =
tsd_fetch_impl(init=3Dtrue, minimal=3Dfalse) 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=3D<unavailable>, dopts=3D<unavailable>) at =
jemalloc_jemalloc.c:2256:15
    frame #10: 0x00003f6e7cb77e30 libc.so.7`__je_malloc_default(size=3D40)=
 at jemalloc_jemalloc.c:2293:2

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

otis


=E2=80=94
Juraj Lutter
otis@FreeBSD.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A0BBFBF0-B531-4A07-A043-ABC7EBE049DE>