Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1264 closed defect (wontfix)

hash tables, make-load-form bug?

Reported by: jared Owned by:
Priority: normal Milestone:
Component: Compiler Version: trunk
Keywords: hash tables, make-load-form, chunga, quicklisp Cc:



I believe there may be a problem with the latest CCL trunk. The problem occurs when I try to load the :chunga library from a recent Quicklisp distribution.

The attached script can be used to recreate the problem.

Here is the error and a backtrace:

   [package chunga]..
   > Error: Special operator or global macro-function CCL::NHASH.MIN-SIZE can't be FUNCALLed or APPLYed
   > While executing: #<CCL::STANDARD-KERNEL-METHOD MAKE-LOAD-FORM (HASH-TABLE)>, in process listener(1).
   > Type :POP to abort, :R for a list of available restarts.
   > Type :? for other options.
    (2B6B9E1702C8) : 1 (FASL-SCAN-USER-FORM #<HASH-TABLE :TEST EQUAL size 77/82 #x302000B7E21D>) 197
    (2B6B9E1702F8) : 2 (FASL-SCAN-CLFUN #<Compiled-function CHUNGA:AS-KEYWORD (Non-Global)  #x302000B90F4F>) 197
    (2B6B9E170330) : 3 (FASL-SCAN ((23 81) (47 "home:ql-bug;bug_temp;inst;dists;quicklisp;software;chunga-1.1.6;known-words.lisp.newest") (70 #<# #:#-# #>) (4 #) (70 #<# #:#-# #>) ...)) 469
    (2B6B9E1703C8) : 4 (FASL-SCAN-FORMS-AND-DUMP-FILE ((23 81) (47 "home:ql-bug;bug_temp;inst;dists;quicklisp;software;chunga-1.1.6;known-words.lisp.newest") (70 #<# #:#-# #>) (4 #) (70 #<# #:#-# #>) ...) "/home/users/jared/.cache/common-lisp/ccl-1.11-f96-linux-x64/home/users/jared/ql-bug/bug_temp/inst/dists/quicklisp/software/chunga-1.1.6/known-words-TMP.lx64fsl" #<CCL::LEXICAL-ENVIRONMENT #x302000B236AD>) 237
    (2B6B9E170468) : 5 (%COMPILE-FILE "/home/users/jared/ql-bug/bug_temp/inst/dists/quicklisp/software/chunga-1.1.6/known-words.lisp" "/home/users/jared/.cache/common-lisp/ccl-1.11-f96-linux-x64/home/users/jared/ql-bug/bug_temp/inst/dists/quicklisp/software/chunga-1.1.6/known-words-TMP.lx64fsl" NIL NIL T T NIL T :DEFER NIL #<BACKEND LINUXX8664 #x3020001C645D> :UTF-8 NIL 0) 2965

It appears that this is provoked by the Chunga file known-words.lisp, found in:


I don't see that this file is particularly doing anything strange, so perhaps there is a CCL problem?

I notice that MAKE-LOAD-FORM has been changed recently:

svn blame:
     6         gb (defmethod make-load-form ((hash hash-table) &optional env)
     6         gb   (declare (ignore env))
 10731         gz   (let ((keytransF (nhash.keytransF hash))
     6         gb         (compareF (nhash.compareF hash))
     6         gb         (vector (nhash.vector hash))
  2584         gb         (private (if (nhash.owner hash) '*current-process*))
 16340         gz         (lock-free-p (hash-lock-free-p hash)))
 16340         gz 
     6         gb     (flet ((convert (f)
     6         gb              (if (or (fixnump f) (symbolp f))
     6         gb                `',f
     6         gb                `(symbol-function ',(function-name f)))))
     6         gb       (values
     6         gb        `(%cons-hash-table
 10731         gz          nil nil nil ,(nhash.grow-threshold hash) ,(nhash.rehash-ratio hash) ,(nhash.rehash-size hash)
 16340         gz         nil nil ,private ,lock-free-p ,(nhash.min-size hash))
 10731         gz        `(%initialize-hash-table ,hash ,(convert keytransF) ,(convert compareF) ',vector)))))



Attachments (1) (937 bytes) - added by jared 5 years ago.
Script to provoke the bug

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by jared

Script to provoke the bug

comment:1 Changed 5 years ago by gz

Does it still fail if you rebuild ccl twice?

comment:2 Changed 5 years ago by jared


Wow---after rebuilding twice the problem goes away.

I'm quite surprised that this fixed the problem, I would have thought that

  (rebuild-ccl :full t)

would have sort of "fully compiled" CCL.

Should I generally do two full rebuilds whenever I upgrade?


comment:3 Changed 5 years ago by gz

  • Resolution set to wontfix
  • Status changed from new to closed

(wontfix because it's just a bootstrapping problem)

Yes, it is recommended to do rebuild-ccl twice to ensure all bootstrapping issues get resolved. This should be documented somewhere though I can't immediately find where.

comment:4 Changed 5 years ago by ragerdl

Adding keywords ccl ql quickload ccl:nhash.min-size hunchentoot in hopes that this shows up the next time I hit this problem and search for a resolution.

Note: See TracTickets for help on using tickets.