Bug #80814 [NEW]: threaded mod_php won't load: No space available for static Thread Local Storage

From: Date: Sun, 28 Feb 2021 19:41:51 +0000
Subject: Bug #80814 [NEW]: threaded mod_php won't load: No space available for static Thread Local Storage
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232434@lists.php.net to get a copy of this message
From: theultramage at gmail dot com Operating system: FreeBSD 12.2 PHP version: 8.0.2 Package: Dynamic loading Bug Type: Bug Bug description:threaded mod_php won't load: No space available for static Thread Local Storage Description: ------------ apache 2.4 with Event MPM + mod_php 8.0.2 with ZTS currently does not work on FreeBSD 12.0-12.2, while trying to load libphp.so the dynamic loader reports "No space available for static Thread Local Storage". PHP 7.3.20 on the same system does not exhibit this problem. So it seems to be caused by code changes or perhaps build system changes. I found one related php bugreport - https://bugs.php.net/bug.php?id=71189 - but it was talking about php 7.0 on FreeBSD 8.1, a super outdated OS from 2009, which makes me wonder if that would even build, so maybe that part was entered wrong. There is no developer feedback in that thread and the only suggestion is to fall back to single-threaded prefork mode. This issue was brought up on the freebsd bugtracker for mod_php80 last year - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250652 - but the maintainer dismissed it as not a php bug and no further attention was given to it. Followup comments imply that php-fpm is also affected so it's not just a mod_php thing. Another comment suggests recompiling kernel+world with a bigger RTLD_STATIC_TLS_EXTRA constant, based on an old issue in one bsd fork. There are very few results when searching for that error message. The issue is somehow related to thread local storage and dynamically loaded modules. I tried a small C++ test case that involved dynamically loading a shared library with threading and large arrays declared as thread_local, but it worked fine. Whatever the issue is, it's not as simple. -- Edit bug report at https://bugs.php.net/bug.php?id=80814&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80814&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80814&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80814&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80814&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80814&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80814&r=support Expected behavior: https://bugs.php.net/fix.php?id=80814&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80814&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80814&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80814&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80814&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80814&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80814&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80814&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80814&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80814&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80814&r=mysqlcfg

« previous php.bugs (#232434) next »