[Openmcl-devel] bogus objects

Cyrus Harmon ch-openmcl at bobobeach.com
Sat Nov 13 11:30:06 PST 2004


On Nov 12, 2004, at 5:46 PM, Gary Byers wrote:
>
> If there's code doing something like:
>
> (with-output-to-string (*S*)
>   (loop
>    ;; spend lots of time here
>    ))
>
> and one or more other threads are writing to *S*, then I can easily 
> imagine
> that the lack of locking could lead to *S* or things near it in memory
> getting clobbered.
>
> (Which does sound suspiciously like what you're seeing.)

And, presumably, a big, honkin' format call would probably cause the 
same problem, as I imagine there might be a with-output-to-stream down 
in format, or at least there is one in the interim definition in 
l1-format.lisp, but I don't know if this gets replaced or not.

Lots of nested formats all over this code. Most are going to make their 
own string-streams, but some, especially error-related stuff, which is 
an error where I'm seeing some problems, are going to write to 
*<some-funky-error-streams>* and this is probably where things are 
getting munged. Bummer...

One other odd thing is that I'm seeing errors on nested princ-to-string 
calls. I'm surprised to see erorrs here as 1) this probably happens all 
the time and 2) l1-io.lisp is making new streams with 
(with-output-to-stream (s) (princ s)). It looks like this is the stream 
that's becoming bogus:

Caught error: No applicable method for args:
  (#<BOGUS object @ #x678C966>)
  to #<STANDARD-GENERIC-FUNCTION CLOSE #x60C0C36>
(F099ABC0) : 0 "ARANEIDA::HANDLER-DEBUGGER-HOOK" 192
(F099ABD0) : 1 "CCL::BREAK-LOOP-HANDLE-ERROR" 256
(F099ABE0) : 2 NIL NIL
(F099ABF0) : 3 "CCL::%%STANDARD-COMBINED-METHOD-DCODE" 148
(F099AC00) : 4 NIL NIL
(F099AC10) : 5 "CCL::%ERROR" 104
(F099AC20) : 6 "#<CCL::STANDARD-KERNEL-METHOD NO-APPLICABLE-METHOD 
(T)>" 48
(F099AC30) : 7 NIL NIL
(F099AC40) : 8 "PRINC-TO-STRING" 92
(F099AC50) : 9 NIL NIL
(F099AC60) : 10 "PRINC-TO-STRING" 152
(F099AC70) : 11 "#<STANDARD-METHOD ARANEIDA:URLSTRING 
(ARANEIDA:HTTPLIKE-URL)>" 592
(F099AC80) : 12 "ARANEIDA::READ-REQUEST-FROM-STREA3M" 972
(F099AC90) : 13 "ARANEIDA::DO-IT" 76
(F099ACA0) : 14 NIL NIL
(F099ACB0) : 15 "ARANEIDA::THREADED-HTTP-LISTENER-ACCEPT-ONE-REQUEST" 
696
(F099ACF0) : 16 "Anonymous Function #x648C0C6" 76
(F099AD00) : 17 "CCL::RUN-PROCESS-INITIAL-FORM" 400
(F099AD30) : 18 NIL NIL
(F099AD40) : 19 "Anonymous Function #x6101D3E" 152
(F099AD60) : 20 "Anonymous Function #x60F491E" 172

Maybe it's time for me to do some experimentation with nested 
princ-to-string calls...

On another note, I'm sure this is an FAQ, but what do the numbers at 
the end of the lines mean? e.g. the 192, 256, 148 etc...?

Thanks,

Cyrus




More information about the Openmcl-devel mailing list