Multi-threading in SBCL via Slime creates threads that do not return or close

584 views Asked by At

I am trying to use the common lisp machine learning library clml with:

  • Ubuntu 14.04 LT
  • Emacs 24
  • SLIME 2.10.1
  • SBCL 1.2.3

When I run the following example using SBCL started in the terminal everything works, four threads are created, return the result and close. When I run the same code from within SLIME the following works just fine:

(setf *read-default-float-format* 'double-float)
(ql:quickload :clml)
(in-package :clml.decision-tree.random-forest)

(defparameter *bc-train*)
(setf *bc-train* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.train.csv")
                                  :type :csv
                                  :csv-type-spec
                                  (append (loop for i below 9 collect 'double-float) '(string))))

When I attempt to train the random forest with make-regression-forest:

 (defparameter *regression-forest*)
 (setf *regression-forest* (make-regression-forest *bc-train* "Cell.size"))

The following happens:

  • the slime repl is still responsive
  • four threads are created, they do not use any CPU time, and do not return or exit.
  • the inferior-lisp buffer shows the following fatal error for each of the threads:

    lbd> fatal error encounter in SBCL pid #### (tid ##########): GC invariant lost, file "thread.c", line 910

make-regression-forest uses the clml futures package which is reportedly similar to eager-future.

I would like to use SLIME to experiment with this package and would be happy to try to use a different multi-threading approach if needed.

Many thanks,

0

There are 0 answers