-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Root the function object in jlcall #14301
Conversation
Huh?...... Travis/pr lin32 has a strange
|
probably hitting a disk quota due to the new caching stuff. still iterating on it a bit. |
Added a non-threading repro as test... |
c1915dc
to
4aa7dfc
Compare
Comment on this one? |
7440563
to
dce3d20
Compare
The additional root shouldn't be too bad since both the array and the function are likely old anyway. From the sysimg size it also looks OK (sys.so increases by ~5kB). I'll merge on Friday if no one has a better solution. |
I do have a slightly better solution, but on jb/functions :) |
Cool. Feel free to close this if jb/functions is ready before Friday. ;-P Actually what's the better solution? Fixing #265? |
dce3d20
to
f95ffcd
Compare
Root the function object in jlcall
This causes segfaults in |
@tkelman I couldn't reproduce the segfault in Add back backport label. Can wait until next release. The commit linked above is probably a good candidate too. c.c. @JeffBezanson |
Yes, that commit should definitely be applied to master and 0.4; I tried to keep it isolated for that purpose. |
The FixedPointNumbers failure was a terminate timeout, that package's tests take forever if inlining is off. |
That was very helpful! Might worth adding tests if there's any simpler and deterministic repro.
Ahh, that makes sense then. I was also wondering why the backtrace is different..... |
Changes Unknown when pulling f95ffcd on yyc/gc/jlcall-root into ** on master**. |
It took me a while to figure out but this is what causing a segfault for the following code with threading in #14190 .
f
is a global function but has a closure specialization. It's address is inlined by the caller but is then replaced by a new method, causing a segfault when calling the old function when it's trying to access the closure variables. In some sense this is a consequence of #265 since the method is otherwise guaranteed to be rooted in the method table. This might make the gc root list bigger but until #265 is fixed, this is the only fix I can come up with.