#1001081 sbcl: `sbcl --load quicklisp.lisp` fails with `internal error 222` since 2.1.11-1

Package:
sbcl
Source:
sbcl
Description:
Common Lisp compiler and development system
Submitter:
David Loyall
Date:
2025-10-06 09:49:02 UTC
Severity:
important
Tags:
#1001081#5
Date:
2021-12-03 20:27:27 UTC
From:
To:
Dear Sébastien Villemot,

Here is some output from a terminal:

    sebboh@debian:~/prj$ sbcl --load quicklisp.lisp
    This is SBCL 2.1.11.debian, an implementation of ANSI Common Lisp.
    More information about SBCL is available at <http://www.sbcl.org/>.

    SBCL is free software, provided as is, with absolutely no warranty.
    It is mostly in the public domain; some portions are provided under
    BSD-style licenses.  See the CREDITS and COPYING files in the
    distribution for more information.
    While evaluating the form starting at line 1154, column 0
      of #P"/home/sebboh/prj/quicklisp.lisp":

    debugger invoked on a SIMPLE-ERROR @52CF6451 in thread
    #<THREAD "main thread" RUNNING {1001834103}>:
      internal error 222: NIL; args=NIL

    Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

    restarts (invokable by number or by possibly-abbreviated name):
      0: [RETRY   ] Retry EVAL of current toplevel form.
      1: [CONTINUE] Ignore error and continue loading file
"/home/sebboh/prj/quicklisp.lisp".
      2: [ABORT   ] Abort loading file "/home/sebboh/prj/quicklisp.lisp".
      3:            Ignore runtime option --load "quicklisp.lisp".
      4:            Skip rest of --eval and --load options.
      5:            Skip to toplevel READ/EVAL/PRINT loop.
      6: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

    (SB-C:MAKE-TN-REF #<SB-C:TN t1 :NORMAL> NIL)
    0] 6
    ;
    ; compilation unit aborted
    ;   caught 1 fatal ERROR condition

    debugger invoked on a SIMPLE-ERROR @52A4A930 in thread
    #<THREAD "finalizer" RUNNING {10009BC2B3}>:
      internal error 222: NIL; args=NIL

    The current thread is not at the foreground,
    SB-THREAD:RELEASE-FOREGROUND has to be called in
#<SB-THREAD:THREAD "main thread" RUNNING {1001834103}>
    for this thread to enter the debugger.
    Killed

FYI, `quicklisp.lisp` is the 2010-10-09 Quicklisp beta.

I tried a few things, then I noticed that my installed version of sbcl
is only two days old..  So, I searched /var/cache/apt/archives and
found an older one..  Then, I did this:

    sebboh@debian:~/prj$ dpkg -i
/var/cache/apt/archives/sbcl_2%3a2.1.8-1_amd64.deb
    dpkg: error: requested operation requires superuser privilege
    sebboh@debian:~/prj$ sudo !!
    sudo dpkg -i /var/cache/apt/archives/sbcl_2%3a2.1.8-1_amd64.deb
    dpkg: warning: downgrading sbcl from 2:2.1.11-1 to 2:2.1.8-1
    (Reading database ... 61703 files and directories currently installed.)
    Preparing to unpack .../sbcl_2%3a2.1.8-1_amd64.deb ...
    Unpacking sbcl (2:2.1.8-1) over (2:2.1.11-1) ...
    Setting up sbcl (2:2.1.8-1) ...
    Processing triggers for man-db (2.9.4-2) ...

After that, `sbcl --load quicklisp.lisp` worked as expected!

I hope this information is helpful.  I have exhausted my
troubleshooting capability here, but if you tell me some commands to
run, I will share the output with you.

Some information from `reportbug` is below my sig.

Cheers,
--david "sebboh" loyall

#1001081#10
Date:
2021-12-14 17:58:43 UTC
From:
To:
Hello.

Here are the checksums for the `quicklisp.lisp` file which I see
causes the error.

MD5 (quicklisp.lisp) = a5b2e9dc96af62cb61fb791cabcce1cb
SHA256 (quicklisp.lisp) =
4a7a5c2aebe0716417047854267397e24a44d0cce096127411e9ce9ccfeb2c17

This appears to be the same as the live file on xach's website..
https://beta.quicklisp.org/quicklisp.lisp

I've also attached the file, per flip214's suggestion.

Cheers,
--sebboh

#1001081#15
Date:
2021-12-20 14:31:38 UTC
From:
To:
Dear David,

Le vendredi 03 décembre 2021 à 14:27 -0600, David Loyall a écrit :
Package: sbcl
Version: 2:2.1.11-1
Severity: important

Dear Sébastien Villemot,

Here is some output from a terminal:

    sebboh@debian:~/prj$ sbcl --load quicklisp.lisp
    This is SBCL 2.1.11.debian, an implementation of ANSI Common Lisp.
    More information about SBCL is available at <http://www.sbcl.org/>.

    SBCL is free software, provided as is, with absolutely no warranty.
    It is mostly in the public domain; some portions are provided under
    BSD-style licenses.  See the CREDITS and COPYING files in the
    distribution for more information.
    While evaluating the form starting at line 1154, column 0
      of #P"/home/sebboh/prj/quicklisp.lisp":

    debugger invoked on a SIMPLE-ERROR @52CF6451 in thread
    #<THREAD "main thread" RUNNING {1001834103}>:
      internal error 222: NIL; args=NIL

    Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

    restarts (invokable by number or by possibly-abbreviated name):
      0: [RETRY   ] Retry EVAL of current toplevel form.
      1: [CONTINUE] Ignore error and continue loading file
"/home/sebboh/prj/quicklisp.lisp".
      2: [ABORT   ] Abort loading file "/home/sebboh/prj/quicklisp.lisp".
      3:            Ignore runtime option --load "quicklisp.lisp".
      4:            Skip rest of --eval and --load options.
      5:            Skip to toplevel READ/EVAL/PRINT loop.
      6: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

    (SB-C:MAKE-TN-REF #<SB-C:TN t1 :NORMAL> NIL)
    0] 6
    ;
    ; compilation unit aborted
    ;   caught 1 fatal ERROR condition

    debugger invoked on a SIMPLE-ERROR @52A4A930 in thread
    #<THREAD "finalizer" RUNNING {10009BC2B3}>:
      internal error 222: NIL; args=NIL

    The current thread is not at the foreground,
    SB-THREAD:RELEASE-FOREGROUND has to be called in
#<SB-THREAD:THREAD "main thread" RUNNING {1001834103}>
    for this thread to enter the debugger.
    Killed

I can’t replicate your problem. Loading quicklisp.lisp with sbcl 2.1.11-1 works fine for me.

In order to rule out problems caused by your initialization scripts, can you try the following:

 sbcl --no-sysinit --no-userinit --load /usr/share/common-lisp/source/quicklisp/quicklisp.lisp

Best,

#1001081#22
Date:
2021-12-24 18:31:20 UTC
From:
To:
A similar “internal error 222” occurs randomly on the Debian CI
platform. See this log:
https://ci.debian.net/data/autopkgtest/testing/amd64/c/cl-uax-15/17757334/log.gz

The problem is also mentioned in this Reddit thread, and upstream has
committed a possible fix (commit f66c6e355b23), but that needs to be
confirmed:
https://www.reddit.com/r/lisp/comments/rmbq0f/sbcl_2111_gives_internal_error_222_nil_argsnil/

#1001081#27
Date:
2022-01-05 17:08:52 UTC
From:
To:
Hello, Sébastien.

It took me a long time to reply, please accept my apologies.

Sure. Ok, I got the same result when invoking that exact command line
you provided: "Internal error 222".

(Separately, I confirmed these two files have identical contents:
/usr/share/common-lisp/source/quicklisp/quicklisp.lisp and
/home/sebboh/prj/quicklisp.lisp)

I found that I do NOT have to `killall -9 sbcl`...  Instead, after the
error, I can select [CONTINUE] and then invoke (quit).  Log of that
follows my signature.  Maybe your eyes can see a clue where mine do
not yet.  Hm, when I do it this way, now the output does list a
specific undefined function.

I hope this helps, and I'm still willing to gather more information.
More quickly next time. :)

Cheers,
--sebboh

    sebboh@debian:~$ sbcl --no-sysinit --no-userinit --load
/usr/share/common-lisp/source/quicklisp/quicklisp.lisp
    This is SBCL 2.1.11.debian, an implementation of ANSI Common Lisp.
    More information about SBCL is available at <http://www.sbcl.org/>.

    SBCL is free software, provided as is, with absolutely no warranty.
    It is mostly in the public domain; some portions are provided under
    BSD-style licenses.  See the CREDITS and COPYING files in the
    distribution for more information.
    While evaluating the form starting at line 1154, column 0
      of #P"/usr/share/common-lisp/source/quicklisp/quicklisp.lisp":

    debugger invoked on a SIMPLE-ERROR @52CF6451 in thread
    #<THREAD "main thread" RUNNING {1001834103}>:
      internal error 222: NIL; args=NIL

    Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

    restarts (invokable by number or by possibly-abbreviated name):
      0: [RETRY   ] Retry EVAL of current toplevel form.
      1: [CONTINUE] Ignore error and continue loading file
"/usr/share/common-lisp/source/quicklisp/quicklisp.lisp".
      2: [ABORT   ] Abort loading file
"/usr/share/common-lisp/source/quicklisp/quicklisp.lisp".
      3:            Ignore runtime option --load
"/usr/share/common-lisp/source/quicklisp/quicklisp.lisp".
      4:            Skip rest of --eval and --load options.
      5:            Skip to toplevel READ/EVAL/PRINT loop.
      6: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

    (SB-C:MAKE-TN-REF #<SB-C:TN t1[RDX(d)] :NORMAL> T)
    0] 1
    ;
    ; compilation unit aborted
    ;   caught 1 fatal ERROR condition

    ; file: /usr/share/common-lisp/source/quicklisp/quicklisp.lisp
    ; in: DEFUN READ-HTTP-HEADER
    ;     (QLQS-HTTP::PROCESS-HEADER QLQS-HTTP::HEADER-DATA)
    ;
    ; caught STYLE-WARNING:
    ;   undefined function: QLQS-HTTP::PROCESS-HEADER
    ;
    ; compilation unit finished
    ;   Undefined function:
    ;     PROCESS-HEADER
    ;   caught 1 STYLE-WARNING condition

      ==== quicklisp quickstart 2015-01-28 loaded ====

        To continue with installation, evaluate: (quicklisp-quickstart:install)

        For installation options, evaluate: (quicklisp-quickstart:help)

    * (quit)

#1001081#36
Date:
2025-10-06 09:36:35 UTC
From:
To:
close 1001081 2:2.2.3-1
thanks

This bug should have been fixed in 2:2.2.3-1. I also cannot reproduct this anymore.