[closer-devel] *root-context* and threads

Attila Lendvai attila.lendvai at gmail.com
Mon Nov 5 21:11:08 UTC 2007


hi!

we are having issues with our contextl-heavy code on sbcl with high
load. i suspect that the problem happens due to currupting sbcl's
internal state due to some missing locks in sbcl, but while i was
reviewing the code i had a question: seems like *active-context* is
holding some caches, but i can't see where *root-context* is protected
from concurrent access.

maybe the code should eq-check for *root-context* at some point and
enforce a separate *active-context* on first use? this will of curse
lower the cache efficiency, so maybe a cross-platform threading lib
like bordeaux-threads could be used to protect the global cache or
somehow ensure that *root-context* is rebound and copied in all
threads (i think this needs some platform specific code).

is this analysis correct at all?

-- 
 attila

fyi, the sbcl backtrace:

bad thing to be a type specifier: #<CONTEXTL:STANDARD-LAYER-CLASS NIL
{100CE950C1}>
*** Backtrace is:
000: ((LAMBDA (ERROR)) #<SIMPLE-ERROR {100A281D11}>)
001: ((LAMBDA (ERROR)) #<SIMPLE-ERROR {100A281D11}>)
002: ((LAMBDA (ERROR)) #<SIMPLE-ERROR {100A281D11}>)
003: (SIGNAL #<SIMPLE-ERROR {100A281D11}>)
004: (ERROR \"bad thing to be a type specifier: ~S\")
005: (SB-KERNEL:VALUES-SPECIFIER-TYPE #<CONTEXTL:STANDARD-LAYER-CLASS
NIL {100CE950C1}>)
006: (SB-KERNEL:SPECIFIER-TYPE #<CONTEXTL:STANDARD-LAYER-CLASS NIL
{100CE950C1}>)
007: (SUBTYPEP #<CONTEXTL:STANDARD-LAYER-CLASS NIL {100CE950C1}>
#<CONTEXTL:STANDARD-LAYER-CLASS EBR42-LAYER {1001760DB1}> #<unused
argument>)
008: ((SB-PCL::FAST-METHOD
LAYERED-FUNCTION-DEFINERS::|CONTEXTL::ADJOIN-LAYER-USING-CLASS| (T
CONTEXTL:STANDARD-LAYER-CLASS T)) #<error printing object>)
009: (CONTEXTL:ADJOIN-LAYER #<unavailable argument> #<unavailable argument>)
010: ((LAMBDA ()))



More information about the closer-devel mailing list