Discussion:
contextl, print-object's and stack exhaustion
Attila Lendvai
2009-03-13 17:46:28 UTC
Permalink
hi,

as of now, stack exhaustion potentially brings sbcl to its knees.

i had a hard time hunting down a time-consuming to reproduce bug that
brought down the VM every time it happened. as it turned out, it was
caused by the print-object of contextl::*active-context* that was
invoked by the logging facility that stepped in for the error.

this is not 100% sure, but commenting out the layer logging makes the
bug go away.

Pascal, if you have some spare time, could you please take a look at
the print-object's and see if there are possible infinite recursions?
if you can't see anything suspicious i can get some more info out, but
for now i just avoid logging the layer context.
--
attila
Pascal Costanza
2009-03-14 20:02:01 UTC
Permalink
Hi,

Well, contextl::*active-context* is an internal (not exported)
variable for a reason. It refers to a potentially recursive data
structure, so if *print-circle* is nil, you well get a stack overflow.

Either set *print-circle* to t, or print what the function active-
layers returns.

Or do you have a strong reason to keep on printing *active-context*?

Pascal
Post by Attila Lendvai
hi,
as of now, stack exhaustion potentially brings sbcl to its knees.
i had a hard time hunting down a time-consuming to reproduce bug that
brought down the VM every time it happened. as it turned out, it was
caused by the print-object of contextl::*active-context* that was
invoked by the logging facility that stepped in for the error.
this is not 100% sure, but commenting out the layer logging makes the
bug go away.
Pascal, if you have some spare time, could you please take a look at
the print-object's and see if there are possible infinite recursions?
if you can't see anything suspicious i can get some more info out, but
for now i just avoid logging the layer context.
--
attila
_______________________________________________
closer-devel mailing list
http://common-lisp.net/cgi-bin/mailman/listinfo/closer-devel
--
ELS'09: http://www.european-lisp-symposium.org/

Pascal Costanza, mailto:***@p-cos.net, http://p-cos.net
Vrije Universiteit Brussel
Programming Technology Lab
Artificial Intelligence Lab
Pleinlaan 2, B-1050 Brussel, Belgium
Attila Lendvai
2009-03-14 22:10:24 UTC
Permalink
Either set *print-circle* to t, or print what the function active-layers
returns.
Or do you have a strong reason to keep on printing *active-context*?
not at all! for some reason i've thought that (active-layers) simply
returns *active-context*...

anyways, sorry for the noise, (active-layers) works fine.
--
attila
Loading...