RFR: 8305625: Stress test crashes with SEGV in Deoptimization::deoptimize_frame_internal(JavaThread*, long*, Deoptimization::DeoptReason)

Patricio Chilano Mateo pchilanomate at openjdk.org
Fri Apr 14 19:05:31 UTC 2023


On Fri, 14 Apr 2023 18:36:10 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

> Thanks, seems good!
> 
> But question, I believe the query is wrong. We actually don't care if it's a virtual thread or if it is a plain continuation, right? It's a bit wired since some of the code is 'prepared' for plain continuations, while some is not.
> 
> The query does:
> 
> ```
> const ContinuationEntry* JavaThread::vthread_continuation() const {                                                   
>   for (ContinuationEntry* c = last_continuation(); c != nullptr; c = c->parent()) {                                   
>     if (c->is_virtual_thread())                                                  
>       return c;                                                                 
>   }                                                                                                                   
>   return nullptr;                                                                                                     
> }
> ```
> 
> But if we had a plain continuation, the same bug would happen AFAICT.
> 
> So I would like the question to be jt->have_continuation_mounted().
>
Yes, this code would have the same issue with plain continuations. It's just that we are never supposed to encounter one today since they are only used by virtual threads. But I can change the check and use jt->last_continuation() which is already there.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13446#issuecomment-1509094961


More information about the hotspot-dev mailing list