Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIX stability improvements #1445

Merged
merged 2 commits into from Jun 15, 2022

Conversation

matthiasblaesing
Copy link
Member

No description provided.

@matthiasblaesing
Copy link
Member Author

@dbwiddis could you please have a look at this? It was triggered by your observations that there were problems on AIX. This might or might not improve the situation for you, but at least after this, on the gcc build farm both ant test and ant test-platform run with success.

What I'm not sure about is this:

String mappedName = System.mapLibraryName(libName);
if(Platform.isAIX() && mappedName.endsWith(".so")) {
return mappedName.replaceAll(".so$", ".a");
} else {
return mappedName;
}

It basicly maps everything Semeru might map to xyz.so to xyz.a. While this brings Semeru in line with the traditional AIX JDK it might not be what people expect. The alternative would be to only apply that mapping to libjnidispatch, which we control. What do you think?

Copy link
Contributor

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments/questions below.

I went from being able to reliably reproduce it to not reproducing it at all, so never really got to the root cause of the issues I was having. If you believe this would create a "mapped name" from the jna...tmp file ending in .so and change it to .a, then this change seems sane.

I still think there's something else amiss with the tmp file deleteOnExit stuff, but this code should at least improve on the current state.

src/com/sun/jna/NativeLibrary.java Show resolved Hide resolved
AIX JDK mapped dynamic libraries to ".a", while Semeru maps dynamic
libraries to ".so". This change unifies this to ".a".
@matthiasblaesing
Copy link
Member Author

I went from being able to reliably reproduce it to not reproducing it at all, so never really got to the root cause of the issues I was having. If you believe this would create a "mapped name" from the jna...tmp file ending in .so and change it to .a, then this change seems sane.

As described above it will not do that. However I doubt, that that is the problem. I read the issue you referenced and my reading is, that Semeru has a problem because it decided to drop using ".a" as the default shared library extension and switched to ".so". This in turn let different tests fails and they tried to fix this by introducing new API.

Copy link
Contributor

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@matthiasblaesing matthiasblaesing merged commit fa86166 into java-native-access:master Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants