RFR: JDK-8190187: C++ code calling JNI_CreateJavaVM can be killed by Java
Adam Farley8
adam.farley at uk.ibm.com
Thu Feb 15 09:37:20 UTC 2018
On 15/02/2018 12:13 AM, Adam Farley8 wrote:
>> Hi All,
>>
>> -- Short version --
>>
>> Could a committer please take the fix for JDK-8190187 (full code
included
>> in the bug) and:
>>
>> 1) Complete the CSR process for the new JNI Return code.
>> 2) Commit the changes that contain (a) the new return code, and (b) the
>> non-Hotspot code that handles the new code.
>
> As I stated here:
>
>
https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.openjdk.java.net_pipermail_core-2Dlibs-2Ddev_2017-2DOctober_049597.html&d=DwICaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=P5m8KWUXJf-CeVJc0hDGD9AQ2LkcXDC0PMV9ntVw5Ho&m=OUKJytaKUZmaM4zCoF2GSmIrYLPEE4cSP1LkBgAIduo&s=DIuL0lNnE0xXAqlADCHi8uv2u6kcKcOWbob0WHHArSU&e=
>
> "I can file a bug for this, but it will take some work to see how to fit
> this into the existing specifications and file CSR requests for those
> changes. This won't make 18.3 (or whatever it gets called). You will
> need a "champion" to help flesh this out in full and work with you on
> those CSR requests. I can't volunteer to do that at this time."
>
> Nobody has offered to champion this. Sorry.
>
> David
> -----
Yup, I remember you saying that David.
I plan to work on the issues you raised in your previous email, and
continue to post messages in these lists until someone who has
free cycles spots my emails and agrees to commit the code.
It'll happen sooner or later. :)
- Adam
>
>> Backporting would be appreciated, but is optional.
>>
>> Also optional: Commit the jdwp code that serves as an example for how
this
>> code should be used. CSR again, unfortunately.
>>
>>
>> -- Long Version --
>>
>> We have a bug in OpenJDK where if you pass an info-only option (like
>> -agentlib:jdwp=help) in through the JNI interface, it can exit your
code
>> with RC 0.
>>
>> I think this is a bug because if you planned to do anything after
starting
>> a Java VM, you have to do it in an exit hook.
>>
>> If an info-only option is used, exit(0) should not happen. Instead, the
>> user's code should be told the VM cannot be used.
>>
>> Bug Link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.openjdk.java.net_browse_JDK-2D8190187&d=DwICaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=P5m8KWUXJf-CeVJc0hDGD9AQ2LkcXDC0PMV9ntVw5Ho&m=OUKJytaKUZmaM4zCoF2GSmIrYLPEE4cSP1LkBgAIduo&s=P_S35LF3YxaxKQWY7-svCzm_WvvcUU0nSx8QP9dH9O0&e=
>>
>> I have proposed the creation of a new JNI return code indicating a
"silent
>> exit", where the vm encountered no error, but that it is not in a fit
>> state to be used.
>>
>> See the link for an implementation of this, along with a handy test.
>>
>> In short, if you agree that this is a problem, we need a champion to:
>>
>> 1) Complete the CSR process for the new JNI Return code.
>> 2) Commit the changes that contain (a) the new return code, and (b) the
>> non-Hotspot code that handles the new code.
>>
>> Optionally, if you want to commit the code containing an example of the
>> fix, you will need to:
>>
>> 3) Commit the Hotspot code that channels the new return code.
>> 4) Complete the CSR process for the jdwp behaviour change.
>> 5) Commit the jdwp code.
>>
>> Note that all of this code has *already been written*. This should be
an
>> easy commit once the CSR is done with.
>>
>> Best Regards
>>
>> Adam Farley
>>
>>
>>
>> Best Regards
>>
>> Adam Farley
>>
>> Unless stated otherwise above:
>> IBM United Kingdom Limited - Registered in England and Wales with
number
>> 741598.
>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
>>
>
>
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
More information about the core-libs-dev
mailing list