RFR: 8312401: SymbolTable::do_add_if_needed hangs when called in InstanceKlass::add_initialization_error path with requesting length exceeds max_symbol_length [v3]
Jiangli Zhou
jiangli at openjdk.org
Tue Jul 25 16:35:57 UTC 2023
On Tue, 25 Jul 2023 05:59:59 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>>> There are other calls to `java_lang_Throwable::detail_message()` that will overflow `Symbol::max_length()`, so adding this assert will just change the hang into a crash, neither is desirable.
>>>
>>> If we want to properly fix `java_lang_Throwable::detail_message()` in a future RFE, it's better to temporarily change `java_lang_Throwable::detail_message()` in this PR to truncate the string (instead of hanging). That's a better alternative than crashing or hanging.
>>
>> Thanks for the thoughts. We have't seen issues in other call paths. It's better to fix the other callers properly with JDK-8312616 instead of using a workaround (truncate) with an undefined behavior.
>>
>> Failing with assert provides more useful information than hang, however most end users only run on release binary (so most users would not see asserts). As no hang has been reported in other call paths, I think the new asserts would not be triggered in those cases with debug binaries. I can also revert the new asserts in this PR if there's a concern.
>
> OK, sounds good to me. I think the current PR is fine.
>
> But the name of the JBS issue should be changed, since this PR doesn't fix the fundamental cause of the hanging.
Clarified JBS issue title and PR title.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14938#discussion_r1273815182
More information about the hotspot-runtime-dev
mailing list