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

Robbin Ehn robbin.ehn at oracle.com
Tue Jun 19 12:33:25 UTC 2018


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