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

Robbin Ehn robbin.ehn at oracle.com
Wed Jun 20 06:42:22 UTC 2018


Hi Dan,

On 2018-06-19 17:05, Daniel D. Daugherty wrote:
>  > +  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.

Yes, I had pushed when I received this, Robbin

> 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