Skip to content

[FFI/Jtreg_JDK20] Keep the downcall address alive for downcall - #17553

Merged
pshipton merged 1 commit into
eclipse-openj9:masterfrom
ChengJin01:ffi_jtreg_liblookuptest_keep_downcall_addr_alive_jdk20
Jun 8, 2023
Merged

[FFI/Jtreg_JDK20] Keep the downcall address alive for downcall#17553
pshipton merged 1 commit into
eclipse-openj9:masterfrom
ChengJin01:ffi_jtreg_liblookuptest_keep_downcall_addr_alive_jdk20

Conversation

@ChengJin01

Copy link
Copy Markdown

The changes aim to prevent the downcall address from being
released unexpectedly by leveraging the existing code to
hold the downcall address during the downcall.

Fixes: #17524

Signed-off-by: ChengJin01 jincheng@ca.ibm.com

The changes aim to prevent the downcall address from being
released unexpectedly by leveraging the existing code to
hold the downcall address during the downcall.

Fixes: eclipse-openj9#17524

Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
@ChengJin01

ChengJin01 commented Jun 8, 2023

Copy link
Copy Markdown
Author

The idea of the PR (updated on top of #17528) is holding the downcall address by performing acquire/release in OpenJDK when the corresponding scope is still alive, in which case Arena.close() in the process of downcall will end up with IllegalStateException as expected; otherwise, IllegalStateException is thrown out when the scope is closed when accessing the downcall address.

@ChengJin01

ChengJin01 commented Jun 8, 2023

Copy link
Copy Markdown
Author

The PR is verified in OpenJ9 FFI test suites & Jtreg test suites in JDK17 & 20.

Reviewer: @pshipton
FYI: @tajila

@ChengJin01
ChengJin01 requested a review from pshipton June 8, 2023 03:28
@ChengJin01 ChengJin01 added comp:vm project:panama Used to track Project Panama related work jdk17 jdk20 labels Jun 8, 2023
@pshipton

pshipton commented Jun 8, 2023

Copy link
Copy Markdown
Member

jenkins compile zlinux jdk17,jdk20,jdknext

@ChengJin01

ChengJin01 commented Jun 8, 2023

Copy link
Copy Markdown
Author

Launched Grinders x50 jdk_foreign at https://openj9-jenkins.osuosl.org/job/Grinder/2492/ with the compiled build at https://openj9-jenkins.osuosl.org/job/Build_JDK20_s390x_linux_Personal/50/ and Grinder x5 for sanity.opendk at https://openj9-jenkins.osuosl.org/job/Grinder/2494/consoleText to see how it goes with the changes.

@pshipton

pshipton commented Jun 8, 2023

Copy link
Copy Markdown
Member

@pshipton

pshipton commented Jun 8, 2023

Copy link
Copy Markdown
Member

Seems https://openj9-jenkins.osuosl.org/job/Grinder/2492 has passed, although it's still archiving results.

@ChengJin01 pls create PRs for 0.39 and 0.40.

@pshipton
pshipton merged commit bad620f into eclipse-openj9:master Jun 8, 2023
@ChengJin01

Copy link
Copy Markdown
Author

@ChengJin01 pls create PRs for 0.39 and 0.40.

PRs are created at #17563 (0.39) and #17565 (0.40).

@ChengJin01
ChengJin01 deleted the ffi_jtreg_liblookuptest_keep_downcall_addr_alive_jdk20 branch October 30, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:vm jdk17 jdk20 project:panama Used to track Project Panama related work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenJDK java/foreign/LibraryLookupTest crash vmState=0x0000000

2 participants