windows-only: sdl2-mixer postmix callback crashes during GC

Bug #1827946 reported by Andrew Kent on 2019-05-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

# Description and Test-case
Note: I've only been able to cause this crash on windows.

It seems as though if a cffi-callback is active during garbage collection, sbcl will crash (or drop into ldb).

See example here:

Commenting out the `sb-ext:gc` funcall prevents the crash.

Unfortunately I wasn't able to reproduce this without SDL2-mixer (presumably it's doing something more complicated than my toy callback code was).

# SBCL Version
./bin/sbcl.exe --version
SBCL 1.4.14

# Features


Stas Boukarev (stassats) wrote :

What does it say after entering ldb?

Andrew Kent (realark) wrote :

* (run-crash-demo)
main thread: Starting main lisp on thread
main thread: Wait on sem #S(SB-THREAD:SEMAPHORE
                            :NAME NIL
                            :%COUNT 0
                            :WAITCOUNT 0
                            :MUTEX #<MUTEX "semaphore lock" (free)>
                            :QUEUE #<WAITQUEUE {10036D3F03}>).
foreign callback : in callback waiting on mutex
main thread: Doing a full GC.
fatal error encountered in SBCL pid 8504(tid 00000000010D18C0):
thread 00000000050D2000: bogus esp: 0000000000C5F2B0

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

Andrew Kent (realark) wrote :

Let me know if there's any command I can run in ldb to help. LDB is dark magic to me so detailed instructions are appreciated.

Andrew Kent (realark) on 2019-05-16
description: updated
Stas Boukarev (stassats) wrote :


Changed in sbcl:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers