SBCL and .Net Core runtimes stomp on each other signals while loaded in one process
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hello! I'm currently working on a library, which allows for interacting with .Net Core runtime while embedding it into Common Lisp implementation, and specifically, into SBCL.
https:/
The problem that i have encountered is that SBCL and .Net Core runtimes do not coexist well on Linux.
In particular, the runtimes seem to be stomping on each other signals. This leads to SBCL process being crashing, and the following message being displayed:
------------
fatal error encountered in SBCL pid 8500(tid 0x7f54a6096b80):
blockable signals partially blocked: {1,2,3,
------------
The message can also mention "blockables unblocked".
I've spent almost a week trying to dig into this issue but had no luck with any kind of a solution.
What i got, however, is a piece of code that actually reproduces an issue in 100% percent of cases. It does not utilize my library, it represents purely SBCL-specific lisp code, which could be loaded using 'sbcl --script'
https:/
https:/
I've put an initial bounty of $1000 on bountysource for solving the problem or finding a workaround:
https:/
--------------
Tested on:
SBCL 1.5.3
Linux vpn 4.15.0-1043-aws #45-Ubuntu SMP Mon Jun 24 14:07:03 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
--------------
Changed in sbcl: | |
status: | New → Fix Released |
Here's a dump provided by <email address hidden>
--------- dotnet/ shared/ Microsoft. NETCore. App/2.2. 5/libcoreclr. so 13,14,15, 17,20,23, 24,25,26, 27,28,29}
[(nil)/(nil)] /entering interrupt_init()
[(nil)/(nil)] /returning from interrupt_init()
code scavenged: 0 total, 0 skipped
Next gc when 75009331 bytes have been consed
Loading /usr/share/
Initialized CoreCLR
fatal error encountered in SBCL pid 19111(tid 0x7fb16a2f0b80):
blockable signals partially blocked: {1,2,3,
0: Foreign function (null), pc = 0x41866a, fp = 0x7fb169385e50 blocked_ p, pc = 0x4193fd, fp = 0x7fb1693860d0 handle_ pending, pc = 0x41af2d, fp = 0x7fb169386100 :%MAKE- HASH-TABLE, pc = 0x52456f7f, fp = 0x7fb1693867f8 IR2-COMPONENT, pc = 0x52420bbd, fp = 0x7fb169386958 COMPILE- COMPONENT, pc = 0x5230ebc8, fp = 0x7fb169386a10 COMPONENT, pc = 0x5221884f, fp = 0x7fb169386a38 COMPILER; TARGET- MAIN.LISP" ), pc = 0x521eb1d8, fp = 0x7fb169386ba0 WITH-COMPILATIO N-UNIT) , pc = 0x5226625d, fp = 0x7fb169386c80 IN-LEXENV, pc = 0x521ebda4, fp = 0x7fb169386da8 test/crash. lisp"), pc = 0x52b53ef4, fp = 0x7fb169386e00 :SIMPLE- EVAL-IN- LEXENV, pc = 0x52227f8a, fp = 0x7fb169386ec8 :LOAD-AS- SOURCE) , pc = 0x52294ff8, fp = 0x7fb169387120 :LOAD-AS- SOURCE) , pc = 0x522947f1, fp = 0x7fb169387270 DO-FORMS- FROM-INFO, pc = 0x52266d90, fp = 0x7fb169387330 :LOAD-AS- SOURCE, pc = 0x522942c8, fp = 0x7fb1693874f0 :CALL-WITH- LOAD-BINDINGS, pc = 0x5236f36b, fp = 0x7fb169387680 :LOAD-STREAM :IN LOAD), pc = 0x521cfaed, fp = 0x7fb169387788 :LOAD-SCRIPT :IN SB-IMPL: :PROCESS- SCRIPT) , pc = 0x522edb84, fp = 0x7fb169387960 :PROCESS- SCRIPT) , pc = 0x522ed304, fp = 0x7fb169387a00 INTERRUPTS- BODY-2" :IN SB-IMPL: :PROCESS- SCRIPT) , pc = 0x522ed035, fp = 0x7fb169387ac0 :PROCESS- SCRIPT, pc = 0x522ece2a, fp = 0x7fb169387b60 :TOPLEVEL- INIT, pc = 0x52256a8d, fp = 0x7fb169387d30 :SAVE-LISP- AND-DIE) , pc = 0x523b98e2, fp = 0x7fb169387e00 INTERRUPTS- BODY-7" :IN SB-EXT: :SAVE-LISP- ...
1: Foreign function (null), pc = 0x4187f8, fp = 0x7fb169385f40
2: Foreign function all_signals_
3: Foreign function interrupt_
4: Foreign function handle_trap, pc = 0x41c47d, fp = 0x7fb169386140
5: Foreign function (null), pc = 0x4190de, fp = 0x7fb169386180
6: Foreign function (null), pc = 0x7fb168e10359, fp = 0x7fb1693861b0
7: Foreign function (null), pc = 0x7fb169cca0e0, fp = 0x7fb169386778
8: SB-IMPL:
9: MAKE-HASH-TABLE, pc = 0x5211b21c, fp = 0x7fb1693868a8
10: SB-C::MAKE-
11: SB-C::GTN-ANALYZE, pc = 0x524ecdb7, fp = 0x7fb169386988
12: SB-C::%
13: SB-C::COMPILE-
14: SB-C::%COMPILE, pc = 0x52310bdf, fp = 0x7fb169386ad0
15: (FLET "LAMBDA0" :IN "SYS:SRC;
16: (FLET SB-C::WITH-IT :IN SB-C::%
17: SB-C::COMPILE-
18: COMPILE, pc = 0x5216fd7f, fp = 0x7fb169386de0
19: (LAMBDA () :IN "/home/
20: SB-INT:
21: SB-EXT::EVAL-TLF, pc = 0x52353efd, fp = 0x7fb169386ef0
22: (LABELS SB-FASL::EVAL-FORM :IN SB-INT:
23: (LAMBDA (SB-KERNEL::FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:
24: SB-C::%
25: SB-INT:
26: (FLET SB-FASL::THUNK :IN LOAD), pc = 0x521cf93a, fp = 0x7fb1693875f8
27: SB-FASL:
28: (FLET SB-FASL:
29: LOAD, pc = 0x521cf567, fp = 0x7fb169387880
30: (FLET SB-IMPL:
31: (FLET SB-UNIX::BODY :IN SB-IMPL:
32: (FLET "WITHOUT-
33: SB-IMPL:
34: SB-IMPL:
35: (FLET SB-UNIX::BODY :IN SB-EXT:
36: (FLET "WITHOUT-