RFR: 8265919: RunThese30M fails "assert((!(((((JfrTraceIdBits::load(value)) & ((1 << 4) << 8)) != 0))))) failed: invariant"

Markus Grönlund mgronlun at openjdk.java.net
Fri Jun 25 09:38:04 UTC 2021


On Fri, 25 Jun 2021 07:13:58 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> 
> 
> I'm OK with removing the assert, given that it is unlikely to happen in production code, but I think we should try to fix it for JDK 18 (and possibly backport).
> 
> Starting up JFR is an expensive operation, in this case a second time, so It doesn't seem unreasonable to add some code to reset the state properly, even if it involves iterating all classes, introducing a safepoint or taking some lock.

Thanks Erik. I don't think there is anything to fix "properly". This is the state reset code that runs when JFR starts, JfrTypeSet::clear(). It is just that it built on an invalid assumption (that no class unload will happen in-between the last rotate() and end_recording()).

-------------

PR: https://git.openjdk.java.net/jdk/pull/4583


More information about the hotspot-jfr-dev mailing list