Re: [10] RFR(S): 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(S): 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"

Vladimir Kozlov
Looks good.

Thanks,
Vladimir

On 11/7/17 4:04 AM, Tobias Hartmann wrote:

> Hi,
>
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8190797
> http://cr.openjdk.java.net/~thartmann/8190797/webrev.00/
>
> When oop map creation fails, we try to throw a LinkageError to propagate the error message. If this happens in the
> compiler thread (for example, during OSR compilation), we fail because a compiler thread cannot initialize an exception
> object.
>
> I've fixed this by bailing out with a meaningful message in case !Thread::can_call_java(). Please note that even if we
> are able to instantiate an exception, we will still fail with ShouldNotReachHere because compute_map(TRAPS) is called
> with CATCH (see comments in the bug for a detailed explanation). This fix is not about changing this behavior but to
> fail with a meaningful error message during compilation. This should only happen if something is seriously broken (for
> example, incorrect bytecode with -noverify, see TestLinkageErrorInGenerateOopMap). In this case we would probably hit
> other issues as well if we would continue execution.
>
> Thanks,
> Tobias
>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(S): 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"

Tobias Hartmann-2
Hi Vladimir,

thanks for the review!

Best regards,
Tobias

On 07.11.2017 19:56, Vladimir Kozlov wrote:

> Looks good.
>
> Thanks,
> Vladimir
>
> On 11/7/17 4:04 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8190797
>> http://cr.openjdk.java.net/~thartmann/8190797/webrev.00/
>>
>> When oop map creation fails, we try to throw a LinkageError to propagate the error message. If this happens in the
>> compiler thread (for example, during OSR compilation), we fail because a compiler thread cannot initialize an exception
>> object.
>>
>> I've fixed this by bailing out with a meaningful message in case !Thread::can_call_java(). Please note that even if we
>> are able to instantiate an exception, we will still fail with ShouldNotReachHere because compute_map(TRAPS) is called
>> with CATCH (see comments in the bug for a detailed explanation). This fix is not about changing this behavior but to
>> fail with a meaningful error message during compilation. This should only happen if something is seriously broken (for
>> example, incorrect bytecode with -noverify, see TestLinkageErrorInGenerateOopMap). In this case we would probably hit
>> other issues as well if we would continue execution.
>>
>> Thanks,
>> Tobias
>>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(S): 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"

Tobias Hartmann-2
Hi,

could I please get a second review from the runtime team?

Thanks,
Tobias

On 08.11.2017 08:58, Tobias Hartmann wrote:

> Hi Vladimir,
>
> thanks for the review!
>
> Best regards,
> Tobias
>
> On 07.11.2017 19:56, Vladimir Kozlov wrote:
>> Looks good.
>>
>> Thanks,
>> Vladimir
>>
>> On 11/7/17 4:04 AM, Tobias Hartmann wrote:
>>> Hi,
>>>
>>> please review the following patch:
>>> https://bugs.openjdk.java.net/browse/JDK-8190797
>>> http://cr.openjdk.java.net/~thartmann/8190797/webrev.00/
>>>
>>> When oop map creation fails, we try to throw a LinkageError to propagate the error message. If this happens in the
>>> compiler thread (for example, during OSR compilation), we fail because a compiler thread cannot initialize an exception
>>> object.
>>>
>>> I've fixed this by bailing out with a meaningful message in case !Thread::can_call_java(). Please note that even if we
>>> are able to instantiate an exception, we will still fail with ShouldNotReachHere because compute_map(TRAPS) is called
>>> with CATCH (see comments in the bug for a detailed explanation). This fix is not about changing this behavior but to
>>> fail with a meaningful error message during compilation. This should only happen if something is seriously broken (for
>>> example, incorrect bytecode with -noverify, see TestLinkageErrorInGenerateOopMap). In this case we would probably hit
>>> other issues as well if we would continue execution.
>>>
>>> Thanks,
>>> Tobias
>>>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(S): 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"

David Holmes
On 10/11/2017 6:35 PM, Tobias Hartmann wrote:
> Hi,
>
> could I please get a second review from the runtime team?

Reviewed.

Thanks,
David

PS. Never knew that -noverify existed as an alias for -Xverify:none :)

> Thanks,
> Tobias
>
> On 08.11.2017 08:58, Tobias Hartmann wrote:
>> Hi Vladimir,
>>
>> thanks for the review!
>>
>> Best regards,
>> Tobias
>>
>> On 07.11.2017 19:56, Vladimir Kozlov wrote:
>>> Looks good.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 11/7/17 4:04 AM, Tobias Hartmann wrote:
>>>> Hi,
>>>>
>>>> please review the following patch:
>>>> https://bugs.openjdk.java.net/browse/JDK-8190797
>>>> http://cr.openjdk.java.net/~thartmann/8190797/webrev.00/
>>>>
>>>> When oop map creation fails, we try to throw a LinkageError to propagate the error message. If this happens in the
>>>> compiler thread (for example, during OSR compilation), we fail because a compiler thread cannot initialize an exception
>>>> object.
>>>>
>>>> I've fixed this by bailing out with a meaningful message in case !Thread::can_call_java(). Please note that even if we
>>>> are able to instantiate an exception, we will still fail with ShouldNotReachHere because compute_map(TRAPS) is called
>>>> with CATCH (see comments in the bug for a detailed explanation). This fix is not about changing this behavior but to
>>>> fail with a meaningful error message during compilation. This should only happen if something is seriously broken (for
>>>> example, incorrect bytecode with -noverify, see TestLinkageErrorInGenerateOopMap). In this case we would probably hit
>>>> other issues as well if we would continue execution.
>>>>
>>>> Thanks,
>>>> Tobias
>>>>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(S): 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"

Tobias Hartmann-2
Hi David,

On 10.11.2017 13:00, David Holmes wrote:
> Reviewed.

Thank you!

Best regards,
Tobias