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

Missing GC root in DecisionTrees #28445

Closed
Keno opened this issue Aug 4, 2018 · 2 comments
Closed

Missing GC root in DecisionTrees #28445

Keno opened this issue Aug 4, 2018 · 2 comments
Labels
GC Garbage collector

Comments

@Keno
Copy link
Member

Keno commented Aug 4, 2018

Reported in https://discourse.julialang.org/t/fatal-error-in-type-inference-type-bound-in-0-7-rc2

It looks like what's happening is that the root for numPerScore in the bagged_tree function is getting dropped and that array is then freed during the createTrnValStatsForThisIteration function, but used later.

@Keno
Copy link
Member Author

Keno commented Aug 5, 2018

What looks to be happening here is that the recently enabled SLP vectorizer is vectorizing the load of a tracked pointer, causing our GC root lowering to lose track of it.

@ararslan ararslan added the GC Garbage collector label Aug 5, 2018
@Keno
Copy link
Member Author

Keno commented Aug 5, 2018

Minimal reproducer:

mutable struct foo
    x::Int
end

@noinline make_foo() = (foo(1), foo(rand(1:10)), foo(rand(1:10)))
@noinline function use_tuple(c)
    @Base.show c
end

function repackage()
    (_, a, b) = make_foo()
    GC.gc()
    c = (foo(1), foo(2), a, b)
    use_tuple(c)
    nothing
end
julia> repackage()
c = (foo(1), foo(2), Tuple{Core.Compiler.UseRef,Nothing}(Core.Compiler.UseRef(:((Base.getfield)(_3, 2)), 4), nothing), Tuple{Core.Compiler.UseRef,Nothing}(Core.Compiler.UseRef(:(%new(Base.ImmutableDict{Symbol,Any}, %2, %3, %4)), 5), nothing))

Keno added a commit that referenced this issue Aug 6, 2018
Most of the support was already there, but it was mostly unexercised.
The recent activation of the SLP vectorizer made these patterns appear
in the IR, so fixup the support.

Fixes #28445
Keno added a commit that referenced this issue Aug 6, 2018
Most of the support was already there, but it was mostly unexercised.
The recent activation of the SLP vectorizer made these patterns appear
in the IR, so fixup the support.

Fixes #28445
ararslan pushed a commit that referenced this issue Aug 6, 2018
Most of the support was already there, but it was mostly unexercised.
The recent activation of the SLP vectorizer made these patterns appear
in the IR, so fixup the support.

Fixes #28445

(cherry picked from commit f5a0b03)
KristofferC pushed a commit that referenced this issue Feb 11, 2019
Most of the support was already there, but it was mostly unexercised.
The recent activation of the SLP vectorizer made these patterns appear
in the IR, so fixup the support.

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

No branches or pull requests

2 participants