RFR(oneliner): 8205006: Assertion failure when rehashing stringtable

Daniel D. Daugherty daniel.daugherty at oracle.com
Tue Jun 19 15:05:57 UTC 2018


 > +  assert(_new_table == NULL || _new_table == POISON_PTR, "Must be 
NULL");

I'm not fond of the string "Must be NULL", but it's probably too late.
I would have gone with "Must be NULL or poisoned.".

Dan


On 6/19/18 8:33 AM, Robbin Ehn wrote:
> Thanks Lois!
>
> Pushing now under trivial rule.
>
> /Robbin
>
> On 06/19/2018 01:59 PM, Lois Foltan wrote:
>> Looks good.
>> Lois
>>
>> On 6/19/2018 7:43 AM, Robbin Ehn wrote:
>>> Hi all, please review.
>>>
>>> When grow completes it poisons the _new_table to make sure no-one 
>>> uses it after
>>> the table swap. Rehash and grow are mutual exclusive, so the assert 
>>> tries to
>>> verify that it's ok to rehash. Thus in this case NULL and POISON_PTR 
>>> are
>>> equivalent.
>>>
>>> Reproduced with first forcing table to grow then rehash, with below 
>>> that works.
>>>
>>> Thanks, Robbin
>>>
>>> [rehn at rehn-ws open]$ hg diff
>>> diff -r 9fdfe5ca0e5e 
>>> src/hotspot/share/utilities/concurrentHashTable.inline.hpp
>>> --- a/src/hotspot/share/utilities/concurrentHashTable.inline.hpp Tue 
>>> Jun 19 10:57:13 2018 +0200
>>> +++ b/src/hotspot/share/utilities/concurrentHashTable.inline.hpp Tue 
>>> Jun 19 12:39:17 2018 +0200
>>> @@ -1203,7 +1203,7 @@
>>>    if (!try_resize_lock(thread)) {
>>>      return false;
>>>    }
>>> -  assert(_new_table == NULL, "Must be NULL");
>>> +  assert(_new_table == NULL || _new_table == POISON_PTR, "Must be 
>>> NULL");
>>>    for (size_t bucket_it = 0; bucket_it < _table->_size; bucket_it++) {
>>>      Bucket* bucket = _table->get_bucket(bucket_it);
>>>      assert(!bucket->have_redirect() && !bucket->is_locked(), "Table 
>>> must be uncontended");
>>



More information about the hotspot-runtime-dev mailing list