Maxima. Thread local storage exhausted

Viewed 127

I am writing mathematical modules for analysis problems. All files are compiled to .fasl. The sizes of these files are gradually increasing and new ones are added to them. I ran into a problem today when loading a module load("foo.mac") ~0.4s loading 100+ files and another module from 200+, which declare functions and variables without precomputing.

Error: Thread local storage exhausted fatal error encountered is SBCL pid %PRIMITIVE HALT called; the party is over. Welcome to LDB.. CPU and RAM indicators are stable at this moment

Doesn't help maxima -X '--dynamic-space-size 2048', 4096 - too, by default 1024. Why it does not work?

SBCL + Windows = works without errors. SBCL 1.4.5.debian + Linux (server) this error is thrown. However, if I reduce the size of the files a little, then the module is loaded.

I recompiled the files, checked all .UNLISP. Changed the order of uploaded files, but an error occurs when loading the most recent ones in the list. Tests run without errors. There are some ways to increase the amount "local storage" through SBCL, Maxima? In which direction to move? Any ideas

Update: Significantly reduced the load by removing duplicate code matchdeclare(..). Now no error is observed.

1 Answers

From https://sourceforge.net/p/maxima/mailman/message/36659152/

maxima uses quite a few special variables which sometimes makes sbcl run out of thread-local storage when running the testsuite. They proposed to add an environment variable that allows to change the thread-local storage size but added a command-line option instead => if supported by sbcl we now generate an image with ab bigger default thread-local storage whose size can be overridden by users passing the --tls-limit option.

The NEWS file in SBCL's source code also indicates that the default value is 4096

changes in sbcl-1.5.2 relative to sbcl-1.5.1:
  * enhancement: RISC-V support with the generational garbage collector.
  * enhancement: command-line option "--tls-limit" can be used to alter the
    maximum number of thread-local symbols from its default of 4096.
  * enhancement: better muffling of redefinition and lambda-list warnings
  * platform support:
    ** OS X: use Grand Central Dispatch semaphores, rather than Mach semaphores
    ** Windows: remove non-functional definition of make-listener-thread
  * new feature: decimal reader syntax for rationals, using the R exponent
    marker and/or *READ-DEFAULT-FLOAT-FORMAT* of RATIONAL.
  * optimization: various Unicode tables have been packed more efficiently
Related