RFR: 8234426: Sweeper should not CompiledIC::set_to_clean with ICStubs for is_unloading() nmethods
rkennke at redhat.com
Fri Nov 22 12:03:01 UTC 2019
We also see a problem that might be related to this with Shenandoah.
I'll test your change and see if it resolves that problem.
> When the sweeper processes an nmethod, it will clean inline caches if it
> Today, the cleaning will utilize transitional states (using ICStubs) if
> the nmethod is_alive(),
> which is always true for the sweeper. If it runs out of ICStubs, it
> might have to safepoint
> to refill them. When it does, the currently processed nmethod might be
> That is not a problem for the GC per se (safepoint operation fusing with
> mark end), but it
> is a problem for heap walkers that get confused that an nmethod
> reachable from a thread is unloading
> and hence has dead oops in it. This sweeper nmethod is the *only*
> nmethod that violates an
> invariant that nmethods reachable from threads (Thread::nmethods_do) are
> not unloading.
> By simply changing the condition to not use ICStubs when the nmethod
> is_unloading(), we
> get this neat invariant, and code gets less confused about this.
More information about the hotspot-dev