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

Zhengyu Gu zgu at redhat.com
Tue Jun 19 11:55:31 UTC 2018


Hi Robbin,

Looks good to me.

Thanks for fixing it.

-Zhengyu

On 06/19/2018 07: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