x86-64 sbcl crashes reloading swank

Bug #1730495 reported by Robert Brown
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Invalid
Undecided
Unassigned

Bug Description

On my 64-bit Intel Ubuntu Linux laptop, if I start Emacs and then run
SBCL with Slime, the following expression when evaluated in the Slime
REPL crashes SBCL:

    (swank-loader::init :reload t)

Doing the same thing on my Raspberry PI works fine. I'm pretty sure
that the expression worked about a year ago on 64-bit Intel hardware.

I see the problem with I load an ASDF system that depends on the
swank ASDF system, since swank.asd causes ASDF to execute the above
expression after its code is loaded.

sbcl --version:
SBCL 1.4.1.56-ff7a0f1

uname -a:
Linux chuwi 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

*features*:
(:ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE
 :64-BIT :64-BIT-REGISTERS :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS :C-STACK-IS-CONTROL-STACK
 :COMMON-LISP :COMPACT-INSTANCE-HEADER :COMPARE-AND-SWAP-VOPS :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER
 :ELF :FLOAT-EQL-VOPS :FP-AND-PC-STANDARD-SAVE :GENCGC :IEEE-FLOATING-POINT :IMMOBILE-CODE
 :IMMOBILE-SPACE :INLINE-CONSTANTS :INTEGER-EQL-VOP :LARGEFILE :LINKAGE-TABLE :LINUX :LITTLE-ENDIAN
 :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR
 :OS-PROVIDES-DLOPEN :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC
 :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES :PRECISE-ARG-COUNT-ERROR :RAW-INSTANCE-INIT-VOPS
 :RAW-SIGNED-WORD :RELOCATABLE-HEAP :SB-CORE-COMPRESSION :SB-DOC :SB-EVAL :SB-FUTEX :SB-LDB
 :SB-PACKAGE-LOCKS :SB-SIMD-PACK :SB-SOURCE-LOCATIONS :SB-THREAD :SB-UNICODE :SB-XREF-FOR-INTERNAL
 :SBCL :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS
 :STACK-ALLOCATABLE-VECTORS :STACK-GROWS-DOWNWARD-NOT-UPWARD :SYMBOL-INFO-VOPS :UNBIND-N-VOP
 :UNDEFINED-FUN-RESTARTS :UNIX :UNWIND-TO-FRAME-AND-CALL-VOP :X86-64)

The Emacs *inferior-lisp* buffer contains the following at the end:

fatal error encountered in SBCL pid 5629(tid 0x7fffefdaf700):
%PRIMITIVE HALT called; the party is over.

Error opening /dev/tty: No such device or address
Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb> fatal error encountered in SBCL pid 5629(tid 0x7ffff446f700):
%PRIMITIVE HALT called; the party is over.

Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb>

Revision history for this message
Stas Boukarev (stassats) wrote :

Can't reproduce. What's the backtrace in LDB?

Changed in sbcl:
status: New → Incomplete
Revision history for this message
Robert Brown (robert-brown) wrote :
Download full text (12.8 KiB)

Here is the LDB backtrace:

Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb> backtrace
Backtrace:
   0: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b21ce6, fp = 0x7fffefda9248
   1: ERROR, pc = 0x21b0334c, fp = 0x7fffefda9290
   2: (SB-PCL::FAST-METHOD SLOT-MISSING (T T T T)), pc = 0x2256e3cc, fp = 0x7fffefda92c8
   3: SB-PCL::SLOT-MISSING-INFO, (LAMBDA (SB-PCL::NEW-VALUE SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), (LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), (LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), pc = 0x21b8e973, fp = 0x7fffefda92f8
   4: (SB-PCL::FAST-METHOD SB-GRAY::STREAM-WRITE-STRING (SWANK/GRAY::SLIME-OUTPUT-STREAM T)), (LAMBDA () :IN SB-GRAY::STREAM-WRITE-STRING), pc = 0x2273b8d6, fp = 0x7fffefda9368
   5: SB-IMPL::%WRITE-STRING, pc = 0x21b173da, fp = 0x7fffefda93a0
   6: SB-IMPL::%WRITE-STRING, pc = 0x21b174e3, fp = 0x7fffefda93d8
   7: SB-KERNEL::OUTPUT-OBJECT, (FLET "H0" :IN SB-KERNEL::OUTPUT-OBJECT), pc = 0x21b178a3, fp = 0x7fffefda9450
   8: PRINC, pc = 0x21b231ad, fp = 0x7fffefda9470
   9: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b2212e, fp = 0x7fffefda9578
  10: SB-IMPL::%WITH-STANDARD-IO-SYNTAX, pc = 0x21b22e30, fp = 0x7fffefda9590
  11: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b21c4d, fp = 0x7fffefda9688
  12: ERROR, pc = 0x21b0334c, fp = 0x7fffefda96d0
  13: (SB-PCL::FAST-METHOD SLOT-MISSING (T T T T)), pc = 0x2256e3cc, fp = 0x7fffefda9708
  14: SB-PCL::SLOT-MISSING-INFO, (LAMBDA (SB-PCL::NEW-VALUE SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), (LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), (LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), pc = 0x21b8e973, fp = 0x7fffefda9738
  15: (SB-PCL::FAST-METHOD SB-GRAY::STREAM-WRITE-STRING (SWANK/GRAY::SLIME-OUTPUT-STREAM T)), (LAMBDA () :IN SB-GRAY::STREAM-WRITE-STRING), pc = 0x2273b8d6, fp = 0x7fffefda97a8
  16: SB-IMPL::%WRITE-STRING, pc = 0x21b173da, fp = 0x7fffefda97e0
  17: SB-IMPL::%WRITE-STRING, pc = 0x21b174e3, fp = 0x7fffefda9818
  18: SB-KERNEL::OUTPUT-OBJECT, (FLET "H0" :IN SB-KERNEL::OUTPUT-OBJECT), pc = 0x21b178a3, fp = 0x7fffefda9890
  19: PRINC, pc = 0x21b231ad, fp = 0x7fffefda98b0
  20: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b22380, fp = 0x7fffefda99b8
  21: SB-IMPL::%WITH-STANDARD-IO-SYNTAX, pc = 0x21b22e30, fp = 0x7fffefda99d0
  22: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b21c4d, fp = 0x7fffefda9ac8
  23: ERROR, pc = 0x21b0334c, fp = 0x7fffefda9b10
  24: (SB-PCL::FAST-METHOD SL...

Revision history for this message
Stas Boukarev (stassats) wrote :

That's not full, try backtrace 10000

Revision history for this message
Robert Brown (robert-brown) wrote :
Download full text (30.3 KiB)

Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb> backtrace 10000
Backtrace:
   0: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b21ce6, fp = 0x7ffff4469e68
   1: ERROR, pc = 0x21b0334c, fp = 0x7ffff4469eb0
   2: (SB-PCL::FAST-METHOD SLOT-MISSING (T T T T)), pc = 0x2256e3cc, fp = 0x7ffff4469ee8
   3: SB-PCL::SLOT-MISSING-INFO, (LAMBDA (SB-PCL::NEW-VALUE SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), (LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), (LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), pc = 0x21b8e973, fp = 0x7ffff4469f18
   4: (SB-PCL::FAST-METHOD SB-GRAY::STREAM-WRITE-STRING (SWANK/GRAY::SLIME-OUTPUT-STREAM T)), (LAMBDA () :IN SB-GRAY::STREAM-WRITE-STRING), pc = 0x2273b8d6, fp = 0x7ffff4469f88
   5: SB-IMPL::%WRITE-STRING, pc = 0x21b173da, fp = 0x7ffff4469fc0
   6: SB-IMPL::%WRITE-STRING, pc = 0x21b174e3, fp = 0x7ffff4469ff8
   7: SB-KERNEL::OUTPUT-OBJECT, (FLET "H0" :IN SB-KERNEL::OUTPUT-OBJECT), pc = 0x21b178a3, fp = 0x7ffff446a070
   8: PRINC, pc = 0x21b231ad, fp = 0x7ffff446a090
   9: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b2212e, fp = 0x7ffff446a198
  10: SB-IMPL::%WITH-STANDARD-IO-SYNTAX, pc = 0x21b22e30, fp = 0x7ffff446a1b0
  11: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b21c4d, fp = 0x7ffff446a2a8
  12: ERROR, pc = 0x21b0334c, fp = 0x7ffff446a2f0
  13: (SB-PCL::FAST-METHOD SLOT-MISSING (T T T T)), pc = 0x2256e3cc, fp = 0x7ffff446a328
  14: SB-PCL::SLOT-MISSING-INFO, (LAMBDA (SB-PCL::NEW-VALUE SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), (LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), (LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO), pc = 0x21b8e973, fp = 0x7ffff446a358
  15: (SB-PCL::FAST-METHOD SB-GRAY::STREAM-WRITE-STRING (SWANK/GRAY::SLIME-OUTPUT-STREAM T)), (LAMBDA () :IN SB-GRAY::STREAM-WRITE-STRING), pc = 0x2273b8d6, fp = 0x7ffff446a3c8
  16: SB-IMPL::%WRITE-STRING, pc = 0x21b173da, fp = 0x7ffff446a400
  17: SB-IMPL::%WRITE-STRING, pc = 0x21b174e3, fp = 0x7ffff446a438
  18: SB-KERNEL::OUTPUT-OBJECT, (FLET "H0" :IN SB-KERNEL::OUTPUT-OBJECT), pc = 0x21b178a3, fp = 0x7ffff446a4b0
  19: PRINC, pc = 0x21b231ad, fp = 0x7ffff446a4d0
  20: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b22380, fp = 0x7ffff446a5d8
  21: SB-IMPL::%WITH-STANDARD-IO-SYNTAX, pc = 0x21b22e30, fp = 0x7ffff446a5f0
  22: SB-IMPL::ERROR-ERROR, (FLET "THUNK" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), (FLET "H0" :IN SB-IMPL::ERROR-ERROR), pc = 0x21b21c4d, fp = 0x7ffff446a6e8
  23: ERROR, pc = 0x21b0334c, fp = 0x7ffff446a730
  24: (SB-PCL::FAST-METHOD SLOT-MISSING (T T T T)),...

Revision history for this message
Robert Brown (robert-brown) wrote :

Here is a backtrace as an attachment.

Looks like the launchpad web interface has been
truncating my comments.

Revision history for this message
Stas Boukarev (stassats) wrote :

The comments are truncated but there is "Download full text (30.3 KiB)"

Revision history for this message
Stas Boukarev (stassats) wrote :

I have removed (sleep *auto-flush-interval*) from auto-flush-loop and can reproduce it.

Changed in sbcl:
status: Incomplete → New
Revision history for this message
Stas Boukarev (stassats) wrote :

It's a slime problem, I'll fix it there.

Changed in sbcl:
status: New → Invalid
Revision history for this message
Stas Boukarev (stassats) wrote :
Revision history for this message
Robert Brown (robert-brown) wrote : Re: [Bug 1730495] Re: x86-64 sbcl crashes reloading swank

Thanks very much! The Slime commit fixes the problem for me.

On Mon, Nov 6, 2017 at 4:32 PM, Stas Boukarev <email address hidden> wrote:

> In
> https://github.com/slime/slime/commit/55fc578ed829b95a63c31cec242bd8
> 6a6e0be39e
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1730495
>
> Title:
> x86-64 sbcl crashes reloading swank
>
> Status in SBCL:
> Invalid
>
> Bug description:
>
> On my 64-bit Intel Ubuntu Linux laptop, if I start Emacs and then run
> SBCL with Slime, the following expression when evaluated in the Slime
> REPL crashes SBCL:
>
> (swank-loader::init :reload t)
>
> Doing the same thing on my Raspberry PI works fine. I'm pretty sure
> that the expression worked about a year ago on 64-bit Intel hardware.
>
> I see the problem with I load an ASDF system that depends on the
> swank ASDF system, since swank.asd causes ASDF to execute the above
> expression after its code is loaded.
>
>
> sbcl --version:
> SBCL 1.4.1.56-ff7a0f1
>
> uname -a:
> Linux chuwi 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20
> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>
> *features*:
> (:ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
> :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE
> :64-BIT :64-BIT-REGISTERS :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS
> :C-STACK-IS-CONTROL-STACK
> :COMMON-LISP :COMPACT-INSTANCE-HEADER :COMPARE-AND-SWAP-VOPS
> :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER
> :ELF :FLOAT-EQL-VOPS :FP-AND-PC-STANDARD-SAVE :GENCGC
> :IEEE-FLOATING-POINT :IMMOBILE-CODE
> :IMMOBILE-SPACE :INLINE-CONSTANTS :INTEGER-EQL-VOP :LARGEFILE
> :LINKAGE-TABLE :LINUX :LITTLE-ENDIAN
> :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS :OS-PROVIDES-BLKSIZE-T
> :OS-PROVIDES-DLADDR
> :OS-PROVIDES-DLOPEN :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL
> :OS-PROVIDES-PUTWC
> :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES
> :PRECISE-ARG-COUNT-ERROR :RAW-INSTANCE-INIT-VOPS
> :RAW-SIGNED-WORD :RELOCATABLE-HEAP :SB-CORE-COMPRESSION :SB-DOC
> :SB-EVAL :SB-FUTEX :SB-LDB
> :SB-PACKAGE-LOCKS :SB-SIMD-PACK :SB-SOURCE-LOCATIONS :SB-THREAD
> :SB-UNICODE :SB-XREF-FOR-INTERNAL
> :SBCL :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS
> :STACK-ALLOCATABLE-LISTS
> :STACK-ALLOCATABLE-VECTORS :STACK-GROWS-DOWNWARD-NOT-UPWARD
> :SYMBOL-INFO-VOPS :UNBIND-N-VOP
> :UNDEFINED-FUN-RESTARTS :UNIX :UNWIND-TO-FRAME-AND-CALL-VOP :X86-64)
>
>
> The Emacs *inferior-lisp* buffer contains the following at the end:
>
>
> fatal error encountered in SBCL pid 5629(tid 0x7fffefdaf700):
> %PRIMITIVE HALT called; the party is over.
>
>
> Error opening /dev/tty: No such device or address
> Welcome to LDB, a low-level debugger for the Lisp runtime environment.
> ldb> fatal error encountered in SBCL pid 5629(tid 0x7ffff446f700):
> %PRIMITIVE HALT called; the party is over.
>
>
> Welcome to LDB, a low-level debugger for the Lisp runtime environment.
> ldb>
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/sbcl/+bug/1730495/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.