Re: 回复:VM crashed at StringTable expansion
Thomas Schatzl
thomas.schatzl at oracle.com
Mon Mar 9 09:47:52 UTC 2020
Hi,
On 09.03.20 04:18, 向伟(识月) wrote:
> Hi,
>
> To avoid the crash, I have a proposal:
> 1. add a new field "size_t _hash" in class Node.
> 2. when insert the new Node into ConcurrentHashTable, set the hash in the node.
> 3. For stringtable:
> Find an invalid node
> --> check whether the aux_hash is equal to _hash in the node.
> --> if no, it means that the value in the node is changed. The node can be considered as an dead node,
> and take care of the invalid node following the rule for the node whose dead_hash is true.
> --> if yes, still regard it as fatal error.
>
> please review the proposal. If it is feasible, I will propose a patch to solve the problem.
>
Since there are other users of ConcurrentHashTable than the stringtabale
I would prefer if this mitigation were limited to cases that may be
affected by this issue, i.e. StringTable.
I am sure your description meant to, but just in case: I.e. I have a
prototype that uses CHT for remembered sets, and increasing a Node by a
size_t (8 bytes) would increase memory usage of a Node significantly
(+25%) which is a problem because remembered sets can consist mostly of
Nodes, encoding its data into its VALUE without additional memory use.
For such internal cases I would also prefer that the code just errors
out instead of potentially (mostly silently) dropping nodes, i.e. in
this case remembered sets.
Thanks,
Thomas
More information about the hotspot-runtime-dev
mailing list