Lovesan / bike

Common Lisp .Net Core Interop
MIT License
144 stars 5 forks source link

SBCL crashes while .Net is here #1

Closed Lovesan closed 5 years ago

Lovesan commented 5 years ago

SBCL implementation crashes randomly on Linux should you load .Net Core runtime into a process.

This has something to do with unix signals, most likely, because the usual displayed error is the following:

fatal error encountered in SBCL pid 14564(tid 0x7fc8af4bbb80):
blockables unblocked

The resolution, though hardly defined, is, as you might except, would be, as you would guess - the execution of the tests, with no error, and no crashes, using 'sbcl --script tests.lisp'.

Lovesan commented 5 years ago

Here's a bounty of $1000 https://www.bountysource.com/issues/75904410-sbcl-crashes-while-net-is-here

stassats commented 5 years ago

It seems that you can disable signal munging by not passing PAL_INITIALIZE_REGISTER_SIGNALS to https://github.com/dotnet/coreclr/blob/86e600cef40a650a8ffb294dd195186b1679609b/src/pal/src/init/pal.cpp#L302 which is passed by deafault https://github.com/dotnet/coreclr/blob/835836c9d34409af0f31529201dfd57cb2bd053c/src/pal/inc/pal.h#L356

but who knows what that's going to do to their runtime.

Lovesan commented 5 years ago

Here's the code that could be used for reproducing the issue, without the need to load this library: https://gist.github.com/Lovesan/d8c184c8a2d286255af03852e3019bb2

Lovesan commented 5 years ago

Bug description at launchpad: https://bugs.launchpad.net/sbcl/+bug/1834964

Lovesan commented 5 years ago

@stassats Implemented a workaround in SBCL which i have incorporated into version 0.3.0

Lovesan commented 5 years ago

@stassats please press 'Claim bounty' button on bountysource