From nobody Sat Apr 20 11:57:19 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VM94G1jd8z5Hf5c for ; Sat, 20 Apr 2024 11:57:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VM94F3GjRz44GR; Sat, 20 Apr 2024 11:57:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 43KBvJPp014110; Sat, 20 Apr 2024 14:57:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 43KBvJPp014110 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 43KBvJLU014109; Sat, 20 Apr 2024 14:57:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 20 Apr 2024 14:57:19 +0300 From: Konstantin Belousov To: Yuri Cc: Freebsd hackers list Subject: Re: What does this error mean: No space available for static Thread Local Storage ? Message-ID: References: <42774b55-241a-497b-816f-94b95187c3e6@FreeBSD.org> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42774b55-241a-497b-816f-94b95187c3e6@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4VM94F3GjRz44GR 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.