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

Pascal Costanza pc at p-cos.net
Tue Nov 6 13:55:59 UTC 2007


Hi,

Due to a hint at comp.lang.lisp, I am not so sure anymore whether this  
is actually a ContextL issue.

Are you sure that my caches cause any problems?


Pascal

On 5 Nov 2007, at 22:11, Attila Lendvai wrote:

> 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 ()))
> _______________________________________________
> closer-devel mailing list
> closer-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/closer-devel

-- 
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium







More information about the closer-devel mailing list