-
Enhancement
-
Resolution: Fixed
-
P4
-
15
-
b25
~G1DirtyCardQueue calls flush(), but that's too late. The final flush must occur in on_thread_detach(), with no further queued log entries after that, else operations like concatenate_logs won't be able to find and process those late logs. on_thread_detach() already contains the necessary flush(), so the one in the destructor is just a waste of time, and possibly hides bugs. Better to just remove it.
However, it's not so simple as just removing the call (and possibly the now empty destructor). There are bootstrapping problems (seeJDK-8240722). There are write barrier invocations by the initial thread before it has been added to the threads list (which includes calling BarrierSet::on_thread_attach). Those are occurring in init_globals. If init_globals ultimately returns failure, the initial thread gets deleted, without calling BarrierSet::on_thread_detach (where the flush would normally occur for a running thread being deleted). This leaves a partially filled buffer in place, triggering the assert in ~PtrQueue.
However, it's not so simple as just removing the call (and possibly the now empty destructor). There are bootstrapping problems (see
- relates to
-
JDK-8308764 Reporting errors from create_vm may crash
-
- Resolved
-
-
JDK-8240722 [BACKOUT] G1DirtyCardQueue destructor has useless flush
-
- Resolved
-
-
JDK-8240133 G1DirtyCardQueue destructor has useless flush
-
- Closed
-