[jdk18] RFR: 8273383: vmTestbase/vm/gc/containers/Combination05/TestDescription.java crashes verifying length of DCQS
Kim Barrett
kbarrett at openjdk.java.net
Tue Jan 18 03:25:23 UTC 2022
On Mon, 17 Jan 2022 08:45:29 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
> Fix looks good.
>
> In addition I think we should update the docs in the `nonblockingQueue.hpp` to say that `append(...)`/`push(...)` are also subject to ABA behavior, like we do for `try_pop(...)`.
I was planning to do that as one of several planned JDK 19 RFEs, while keeping
the bug fix change minimal. If you prefer, I can bring forward the comment
changes.
> Also spent some time thinking about the `append(...)` done in `enqueue_paused_buffers_aux(...)`, can we guarantee that an element can't re-enter the queue this way under the special circumstances just after a safepoint where buffers are paused "wrongly" (if this can happen). I guess this might be prevented by, the fact that no other thread could process the element in the first place making it impossible for something to be "re-used" at this point.
The buffers that get pushed by enqueue_previous_paused_buffers were taken from
the queue and paused before the previous safepoint. No thread can be in
push/append or try_pop (via DCQS) across a safepoint boundary. So no ABA.
enqueue_all_paused_buffers is called by the VMThread during a safepoint, with
no concurrent push/append or try_pop operations. So again, no ABA.
-------------
PR: https://git.openjdk.java.net/jdk18/pull/104
More information about the hotspot-gc-dev
mailing list