Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jl_static_show is not safe to be called from within the GC #53724

Open
d-netto opened this issue Mar 13, 2024 · 2 comments
Open

jl_static_show is not safe to be called from within the GC #53724

d-netto opened this issue Mar 13, 2024 · 2 comments
Labels
GC Garbage collector profiler

Comments

@d-netto
Copy link
Member

d-netto commented Mar 13, 2024

jl_static_show is used to pretty-print types when the GC has a critical error and it's also used inside the heap snapshot, which runs inside the GC.

jl_static_show, however, may grab a lock in a few cases, which will read from the safepoint page and cause a segfault if we're running GC at that point.

@d-netto d-netto added GC Garbage collector profiler labels Mar 13, 2024
@gbaraldi
Copy link
Member

Those locks should probably use the NOGC version? Do you know where we might take those?

@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 13, 2024

AFAIK, the only violation is the call to jl_is_operator, which is because this function is quite tedious to convert into straight C code, but requires a whole flisp context object to run this query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GC Garbage collector profiler
Projects
None yet
Development

No branches or pull requests

3 participants