[Openmcl-devel] 3 questions - TLS the default? global thread-shared vars? .CDB gen broken?

Jason E. Aten j.e.aten at gmail.com
Mon Mar 21 00:54:21 UTC 2011


Thank you so much Gary!

On Sun, Mar 20, 2011 at 6:49 PM, Gary Byers <gb at clozure.com> wrote:

> The bug caused an error to occur while the .cdb files were being rebuilt,
> so you likely have a bunch of empty or partial .cdb files and things
> like #$ can't find constant/type/function definitions in them.
>
> There are two ways to recover working copies:
>
> 1) before trying to create new .cdb files, the interface parser made
>   backup copies (with extensions like .cdb-BAK or something like that;
>   I don't remember off the top of my head.)  The backup copies are
>   in (e.g.) .../x86-headers64/libc, right next to the new/empty .cdb
>   files.  It'd be nice if the interface parser did so for you if an
>   error occurs, but you can manually just recover the .cdb files from
>   the backup copies.
> 2) svn essentially maintains a backup copy of the entire CCL tree, so
>   you can do:
>
> $ cd ccl/x86-headers64/libc
> $ svn revert *.cdb
>
>
This is really good to know. Thank you.  I'm really liking how nice the .CDB
system is.  It's really making life so much easier to interface with C code!


I still suspect that there is a bug that is causing the EX_OSERR issue but
has already been fixed somewhere between the 1.6 release and the current
trunk.  Obviously it shouldn't be a priority because it has already been
fixed by the trunk (at least I don't encounter it at r14684).

I base that conclusion on the observation that the same EX_OSERR occurs in
the 1.6 binary when doing (rebuild-ccl :full t) under 1.6-r14471M
 (DarwinX8664) on my mac book pro, running OSX 10.6.3 on x86_64, which has
completely fine .cdb files, untouched from the 1.6 binary distribution.  The
EX_OSERR goes away on the MBP when I build from the trunk at r14684.
 Moreover the EX_OSERR also went away on Linux when I went to head of the
trunk.   Since trunk development is naturally not expected necessarily to be
stable yet, so I will only note in passing (see the attached file for
details if this helps), that my build of the trunk still terminates early
(on OSX only; Linux built fine), reporting a different kind of compiler
error, which reads in summary as:

;Compiling "/Users/jaten/pkg/ccl-trunk/source/compiler/optimizers.lisp"...
> Error: Compiler bug or inconsistency:
>        x862-form ? (28748)
> While executing: COMPILER-BUG, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
 (1A17CF8) : 0 (COMPILER-BUG "x862-form ? ~s" (28748)) 141
 (1A17D18) : 1 (X862-FORM #<DLL-HEADER #x302000C22D1D> #<LREG 2 GPR [7]> NIL
(28748)) 821
... (full details in the attached)



In those environments,
> the M-. ("meta-dot" or "meta-point") editor command can be used to find the
> source to a definition, and other things ("go to source location where
> error
> occurred") also use this information.


Yes, sorry, let me clarify.  I wondered if the ccl toplevel REPL itself was
also retaining each function definitions lisp forms, say as typed in
directly rather than read from file?  The change logs I happened up when
googling led me to think that the disassembler required these, so I wondered
if they are stored somewhere that a command directly at the ccl prompt might
ferret them out?  I'm just used to R's system (descended from Scheme and
Lisp) that makes it easy to determine which version of a possibly
hot-swapped function is now in effect; typing the name of the function at
the REPL gives it's current definition.



> C-d or :POP should be equivalent and exit the innnermost break loop; :Q
> is supposed to exit all break loops and get back to the toplevel REPL.


Oh yes, yes. Sorry I wasn't clear.  I wanted to configure the condition
system to just skip asking me what restart I wanted. Instead, I would like
ccl to just print the error and then return me to the top level without
having to press :Q.  It might not be doable of course, but if it is, I would
appreciate any hints on how to do this.  Perhaps I can define a default top
level condition handler that says "I got it," but then it does nothing but
return to the REPL.

Thank you!

Best regards,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clozure.com/pipermail/openmcl-devel/attachments/20110320/85c104b8/attachment.html>
-------------- next part --------------
20 march 2011 : compiler bug noted/reported under svn r14864 when trying to rebuild on OSX 10.6.3 x86_64.

--> (the same build succeeded on Linux x86_64, so this is specific to the mac version).

on which system?
jaten at AtenMBP-2:~/pkg/ccl-trunk/source$ uname -a
Darwin AtenMBP-2.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386

which gcc?
jaten at AtenMBP-2:~/pkg/ccl-trunk/source$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659)
Copyright (C) 2007 Free Software Foundation, Inc.

summary of steps before this log

# already installed: ccl 1.6 binaries

# fetch the ccl-trunk

mkdir ~/pkg/ccl-trunk
cd    ~/pkg/ccl-trunk
svn co http://svn.clozure.com/publicsvn/openmcl/trunk/source

# copy over the 1.6 64-bit system header .cdb's
cd ~/pkg/ccl-1.6; tar cvf - darwin-x86-headers64 | (cd /home/jaten/pkg/ccl-trunk/source ; tar xf -)

# copy of the previous exe and image
cp -p dx86cl64*  ~/pkg/ccl-trunk/source/

# and try to rebuild...
cd ~/pkg/ccl-trunk/source

jaten at AtenMBP-2:~/pkg/ccl-trunk/source$ ./dx86cl64 --no-init
Welcome to Clozure Common Lisp Version 1.6-r14471M  (DarwinX8664)!
? (rebuild-ccl :full t)
Rebuilding Clozure Common Lisp using Version 1.6-r14471M  (DarwinX8664)
;Building lisp-kernel ...
;Kernel built successfully.
;Compiling "/Users/jaten/pkg/ccl-trunk/source/lib/systems.lisp"...
;Loading #P"/usr/local/src/ccl/bin/systems.dx64fsl"...
;Compiling "/Users/jaten/pkg/ccl-trunk/source/lib/compile-ccl.lisp"...
;Loading #P"/usr/local/src/ccl/bin/compile-ccl.dx64fsl"...
;Compiling "/Users/jaten/pkg/ccl-trunk/source/compiler/nxenv.lisp"...
;Loading #P"/usr/local/src/ccl/bin/nxenv.dx64fsl"...
;Compiling "/Users/jaten/pkg/ccl-trunk/source/compiler/nx.lisp"...
; Including "/Users/jaten/pkg/ccl-trunk/source/compiler/nx-basic.lisp"...
; Including "/Users/jaten/pkg/ccl-trunk/source/compiler/lambda-list.lisp"...
; Including "/Users/jaten/pkg/ccl-trunk/source/compiler/nx0.lisp"...
; Including "/Users/jaten/pkg/ccl-trunk/source/compiler/nx1.lisp"...
;Loading #P"/usr/local/src/ccl/l1-fasls/nx.dx64fsl"...
;Compiling "/Users/jaten/pkg/ccl-trunk/source/compiler/optimizers.lisp"...
> Error: Compiler bug or inconsistency:
>        x862-form ? (28748)
> While executing: COMPILER-BUG, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
 (1A17CF8) : 0 (COMPILER-BUG "x862-form ? ~s" (28748)) 141
 (1A17D18) : 1 (X862-FORM #<DLL-HEADER #x302000C22D1D> #<LREG 2 GPR [7]> NIL (28748)) 821
 (1A17D80) : 2 (X862-ONE-LREG-FORM #<DLL-HEADER #x302000C22D1D> (28748) #<LREG 2 GPR [7]>) 197
 (1A17DB0) : 3 (X862-THREE-TARGETED-REG-FORMS #<DLL-HEADER #x302000C22D1D> (24616 *DONT-FIND-CLASS-OPTIMIZE*) #<LREG 1 GPR [8]> (28748) #<LREG 2 GPR [7]> (24616 #<LEXICAL-ENVIRONMENT #x302000C3DA7D>) #<LREG 3 GPR [6]>) 845
 (1A17E48) : 4 (X862-FORMLIST #<DLL-HEADER #x302000C22D1D> NIL ((24616 #) (28748) (24616 *DONT-FIND-CLASS-OPTIMIZE*))) 949
 (1A17EA0) : 5 (X862-CALL-FN #<DLL-HEADER #x302000C22D1D> #<LREG 0 GPR [6]> 262143 (24616 NOTE-VARIABLE-INFO) (NIL (# # #)) NIL) 1885
 (1A17F48) : 6 (X862-FORM #<DLL-HEADER #x302000C22D1D> #<LREG 0 GPR [6]> 262143 (42 (24616 NOTE-VARIABLE-INFO) (NIL #) NIL)) 1069
 (1A17FC8) : 7 (FUNCALL #'#<X862-LAMBDA> #<DLL-HEADER #x302000C22D1D> #<LREG 0 GPR [6]> 262143 NIL NIL NIL NIL (NIL NIL) (42 (24616 NOTE-VARIABLE-INFO) (NIL #) NIL) 2162688 NIL) 12709
 (1A18198) : 8 (X862-COMPILE #<AFUNC #x302000C2361D> NIL NIL) 10397
 (1A18A28) : 9 (COMPILE-NAMED-FUNCTION (LAMBDA NIL (NOTE-VARIABLE-INFO # T #)) :NAME NIL :ENV #<LEXICAL-ENVIRONMENT #x302000C3D99D> :POLICY #<COMPILER-POLICY #x30200027968D> :LOAD-TIME-EVAL-TOKEN NIL :TARGET NIL :FUNCTION-NOTE NIL :KEEP-LAMBDA NIL :KEEP-SYMBOLS NIL :SOURCE-NOTES #<HASH-TABLE :TEST EQ size 36/60 #x302000C34F0D> :RECORD-PC-MAPPING T :COMPILE-CODE-COVERAGE NIL) 2469
 (1A18C20) : 10 (%COMPILE-TIME-EVAL (NOTE-VARIABLE-INFO '*DONT-FIND-CLASS-OPTIMIZE* T #<LEXICAL-ENVIRONMENT #x302000C3DA7D>) #<LEXICAL-ENVIRONMENT #x302000C3DA7D>) 549
 (1A18C98) : 11 (FCOMP-FORM-1 (NOTE-VARIABLE-INFO '*DONT-FIND-CLASS-OPTIMIZE* T #<LEXICAL-ENVIRONMENT #x302000C3DA7D>) #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :COMPILE-TIME) 1085
 (1A18CE0) : 12 (FCOMP-FORM (NOTE-VARIABLE-INFO '*DONT-FIND-CLASS-OPTIMIZE* T #<LEXICAL-ENVIRONMENT #x302000C3DA7D>) #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :COMPILE-TIME) 1829
 (1A18D68) : 13 (FCOMP-FORM-LIST ((NOTE-VARIABLE-INFO # T #)) #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :COMPILE-TIME) 189
 (1A18DB0) : 14 (FCOMP-EVAL-WHEN (EVAL-WHEN (:COMPILE-TOPLEVEL) (NOTE-VARIABLE-INFO # T #)) #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :NOT-COMPILE-TIME) 573
 (1A18E20) : 15 (FCOMP-FORM (EVAL-WHEN (:COMPILE-TOPLEVEL) (NOTE-VARIABLE-INFO # T #)) #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :NOT-COMPILE-TIME) 1829
 (1A18EA8) : 16 (FCOMP-FORM-LIST ((EVAL-WHEN # #) (%DEFVAR-INIT *DONT-FIND-CLASS-OPTIMIZE* NIL NIL) '*DONT-FIND-CLASS-OPTIMIZE*) #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :NOT-COMPILE-TIME) 189
 (1A18EF0) : 17 (FCOMP-FORM (PROGN (EVAL-WHEN # #) (%DEFVAR-INIT *DONT-FIND-CLASS-OPTIMIZE* NIL NIL) '*DONT-FIND-CLASS-OPTIMIZE*) #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :NOT-COMPILE-TIME) 1829
 (1A18F78) : 18 (FCOMP-FORM (DEFVAR *DONT-FIND-CLASS-OPTIMIZE* NIL) #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :NOT-COMPILE-TIME) 1829
 (1A19000) : 19 (FCOMP-READ-LOOP "/Users/jaten/pkg/ccl-trunk/source/compiler/optimizers.lisp" "ccl:compiler;optimizers.lisp.newest" 0 #<LEXICAL-ENVIRONMENT #x302000C3DA7D> :NOT-COMPILE-TIME) 2285
 (1A191A0) : 20 (FCOMP-FILE "/Users/jaten/pkg/ccl-trunk/source/compiler/optimizers.lisp" "ccl:compiler;optimizers.lisp.newest" 0 #<LEXICAL-ENVIRONMENT #x302000C3DA7D>) 909
 (1A19348) : 21 (%COMPILE-FILE "/Users/jaten/pkg/ccl-trunk/source/compiler/optimizers.lisp" "/usr/local/src/ccl/bin/optimizers.dx64fsl" T NIL T T NIL :NO-TEXT :DEFER NIL #<BACKEND DARWINX8664 #x3020001C6CBD> :DEFAULT NIL 0) 2845
 (1A19610) : 22 (COMPILE-FILE "ccl:compiler;optimizers.lisp" :OUTPUT-FILE #P"ccl:bin;optimizers.dx64fsl.newest" :VERBOSE T :PRINT NIL :LOAD T :FEATURES NIL :TARGET :DARWINX8664 :SAVE-LOCAL-SYMBOLS T :SAVE-DOC-STRINGS T :SAVE-DEFINITIONS NIL :SAVE-SOURCE-LOCATIONS :NO-TEXT :EXTERNAL-FORMAT :DEFAULT :FORCE NIL :COMPILE-FILE-ORIGINAL-TRUENAME NIL :COMPILE-FILE-ORIGINAL-BUFFER-OFFSET 0 :BREAK-ON-PROGRAM-ERRORS :DEFER) 1853
 (1A19768) : 23 (UPDATE-MODULES (NX OPTIMIZERS DLL-NODE ARCH VREG ...) NIL) 493
 (1A19800) : 24 (FUNCALL #'#<(:INTERNAL WITH-COMPILATION-UNIT-BODY COMPILE-CCL)>) 157
 (1A19820) : 25 (CALL-WITH-COMPILATION-UNIT #<COMPILED-LEXICAL-CLOSURE (:INTERNAL WITH-COMPILATION-UNIT-BODY COMPILE-CCL) #x70F15F> :OVERRIDE NIL) 197
 (1A19868) : 26 (FUNCALL #'#<COMPILE-CCL> NIL) 221
 (1A19890) : 27 (FUNCALL #'#<REBUILD-CCL> :UPDATE NIL :FULL T :CLEAN T :KERNEL T :FORCE NIL :RELOAD T :EXIT NIL :RELOAD-ARGUMENTS NIL :VERBOSE NIL :OPTIONAL-FEATURES NIL :SAVE-SOURCE-LOCATIONS :NO-TEXT :ALLOW-CONSTANT-REDEFINITION T) 2589
 (1A19AA0) : 28 (CALL-CHECK-REGS REBUILD-CCL :FULL T) 221
 (1A19AD8) : 29 (TOPLEVEL-EVAL (REBUILD-CCL :FULL T) NIL) 701
 (1A19B78) : 30 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x302000518D0D> :OUTPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x302000518BAD> :BREAK-LEVEL 0 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL READ-LOOP) (Non-Global)  #x30000058146F>) 2269
 (1A19DD0) : 31 (TOPLEVEL-LOOP) 101
 (1A19DF8) : 32 (FUNCALL #'#<(:INTERNAL (TOPLEVEL-FUNCTION (LISP-DEVELOPMENT-SYSTEM T)))>) 117
 (1A19E18) : 33 (FUNCALL #'#<(:INTERNAL MAKE-MCL-LISTENER-PROCESS)>) 741
 (1A19EB8) : 34 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #x3020005178CD> (#<COMPILED-LEXICAL-CLOSURE # #x3020005172EF>)) 677
 (1A19F48) : 35 (FUNCALL #'#<(:INTERNAL (%PROCESS-PRESET-INTERNAL (PROCESS)))> #<TTY-LISTENER listener(1) [Active] #x3020005178CD> (#<COMPILED-LEXICAL-CLOSURE # #x3020005172EF>)) 389
 (1A19F98) : 36 (FUNCALL #'#<(:INTERNAL THREAD-MAKE-STARTUP-FUNCTION)>) 301
1 > 


More information about the Openmcl-devel mailing list