回复:回复:VM crashed at StringTable expansion

向伟(识月) shiyue.xw at alibaba-inc.com
Mon Mar 9 10:39:31 UTC 2020


Hi Thomas,

The proposal is only limited to stringtable, and the code still errors 
out for other cases which use ConcurrentHashTable.

I change the proposal as below:
For StringTable, find an invalid node 
   --> No matter what causes it,regard the node as an dead node, 
         and take care of the invalid node following the rule for the node whose dead_hash is true.
For other cases using ConcurrentHashTable, find an invalid node
   ->  directly error out

It doesn't increase the memory, and avoid the crash for Stringtable.

Thanks,
Wei Xiang

------------------------------------------------------------------
发件人:Thomas Schatzl <thomas.schatzl at oracle.com>
发送时间:2020年3月9日(星期一) 17:48
收件人:hotspot-runtime-dev <hotspot-runtime-dev at openjdk.java.net>
主 题:Re: 回复:VM crashed at StringTable expansion

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