Skip to content

AIX stability improvements#1445

Merged
matthiasblaesing merged 2 commits into
java-native-access:masterfrom
matthiasblaesing:aix
Jun 15, 2022
Merged

AIX stability improvements#1445
matthiasblaesing merged 2 commits into
java-native-access:masterfrom
matthiasblaesing:aix

Conversation

@matthiasblaesing

Copy link
Copy Markdown
Member

No description provided.

@matthiasblaesing

Copy link
Copy Markdown
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?

@dbwiddis dbwiddis left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread contrib/platform/test/com/sun/jna/platform/unix/LibCTest.java Outdated
Comment thread src/com/sun/jna/NativeLibrary.java
AIX JDK mapped dynamic libraries to ".a", while Semeru maps dynamic
libraries to ".so". This change unifies this to ".a".
@matthiasblaesing

Copy link
Copy Markdown
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.

@dbwiddis dbwiddis left a comment

Copy link
Copy Markdown
Contributor

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
@matthiasblaesing matthiasblaesing deleted the aix branch October 30, 2022 11:38
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.

2 participants