-
-
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
Free objects with finalizer more eagerly #13995
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yuyichao
force-pushed
the
yyc/gc/eager-finalize
branch
from
November 15, 2015 03:29
5d81e7b
to
558070c
Compare
Very nice! JuliaGizmos/Reactive.jl#76 (comment) suggests another source for the specific problem we were having. |
On #14127 I get: julia> gc()
julia> gc()
GC error (probable corruption) :
<?#0x7f2c6c2c4880::<?#0x7f2c6c2c4850::<?#0x7f2c6c2c4860::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::<?#0x7f2c6c205c10::•>>>>>>>>>>>>>>>>>>>>>>>>>>
signal (6): Aborted
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f2e6d8fe3fa)
jl_gc_collect at /home/tim/src/julia-0.5/usr/bin/../lib/libjulia.so (unknown line)
gc at base.jl:80
jlcall_gc_22732 at (unknown line)
jl_apply_generic at /home/tim/src/julia-0.5/usr/bin/../lib/libjulia.so (unknown line)
unknown function (ip: 0x7f2e6d8cd0d3)
unknown function (ip: 0x7f2e6d8cc4c7)
unknown function (ip: 0x7f2e6d8e14d8)
jl_toplevel_eval_in_warn at /home/tim/src/julia-0.5/usr/bin/../lib/libjulia.so (unknown line)
eval at ./boot.jl:264
jl_apply_generic at /home/tim/src/julia-0.5/usr/bin/../lib/libjulia.so (unknown line)
eval_user_input at REPL.jl:3
jlcall_eval_user_input_22565 at (unknown line)
jl_apply_generic at /home/tim/src/julia-0.5/usr/bin/../lib/libjulia.so (unknown line)
anonymous at REPL.jl:92
unknown function (ip: 0x7f2e6d8d3918)
unknown function (ip: (nil))
Aborted (core dumped) |
yuyichao
force-pushed
the
yyc/gc/eager-finalize
branch
from
February 26, 2016 18:51
558070c
to
f40ada0
Compare
yuyichao
force-pushed
the
yyc/gc/eager-finalize
branch
13 times, most recently
from
February 28, 2016 08:05
8484cbc
to
9993f15
Compare
yuyichao
force-pushed
the
yyc/gc/eager-finalize
branch
from
March 15, 2016 22:29
9993f15
to
799119d
Compare
tanmaykm
added a commit
to tanmaykm/Blobs.jl
that referenced
this pull request
Mar 17, 2016
- Checking weakref value to be null as an indicator of gc is not reliable. We probably need a finalizer for that, but all finalizers don't get called immediately at the moment (ref: JuliaLang/julia#13995). Going without that optimization for now. - fixed an issue where cache eviction was corrupting the cache
yuyichao
force-pushed
the
yyc/gc/eager-finalize
branch
2 times, most recently
from
April 3, 2016 20:56
9b50a64
to
3da6fe7
Compare
yuyichao
force-pushed
the
yyc/gc/eager-finalize
branch
from
June 4, 2016 14:06
3da6fe7
to
f307483
Compare
@@ -262,6 +264,12 @@ static size_t max_collect_interval = 500000000UL; | |||
|
|||
// global variables for GC stats | |||
|
|||
// Resetting the object to a young object, this is used when marking the | |||
// finalizer list to collect them the next time because the object is very | |||
// likely dead. This also won't break the GC invariance since these object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these objects
yuyichao
force-pushed
the
yyc/gc/eager-finalize
branch
2 times, most recently
from
June 4, 2016 14:58
6dabec0
to
90a50d5
Compare
* Run all the finalizers at the same time in a dead reference tree * Reset objects that are only reachable from finalizer list as young and clean so that they can be collect during next quick GC without being promoted to old gen. Closes #14127
yuyichao
force-pushed
the
yyc/gc/eager-finalize
branch
from
June 5, 2016 13:41
90a50d5
to
7042e36
Compare
// Reset the age and old bit for any unmarked objects referenced by the | ||
// `to_finalize` list. These objects are only reachable from this list | ||
// and should not be referenced by any old objects so this won't break | ||
// the GC invariant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vtjnash Better?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
so that they can be collect during next quick GC without being promoted to old gen.
@timholy Could you please check if this helps with the problem you have in JuliaGizmos/Reactive.jl#76 (comment) .
Closes #14127