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

unit test BasicFunctionalityTest stalls when run with JDK 17 in M1 Mac #101

Open
subramani927 opened this issue Oct 11, 2023 · 1 comment

Comments

@subramani927
Copy link

subramani927 commented Oct 11, 2023

Hi,
I cloned the project and built the project with JDK 8. And I ran the unit tests with JDK 17. All but one unit test BasicFunctionalityTest stalls when the client tries to read from the channel.

Screenshots:
Screenshot 2023-10-11 at 12 51 57 PM
Screenshot 2023-10-11 at 12 51 17 PM

We are using a similar pattern in our project's Unit tests and we see the same issue.

My Setup is as follows:

  • M1 Mac
  • Intellij
  • JDK 17

Could you help me with this? We are currently migrating our project to JDK 17, as a result, bumped up the version from 0.18 to 0.38.21.

Older versions fail with the following error with JDK 17:
java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider at jnr.ffi.provider.InvalidRuntime.newLoadError(InvalidRuntime.java:101) at jnr.ffi.provider.InvalidRuntime.findType(InvalidRuntime.java:42) at jnr.ffi.Struct$NumberField.<init>(Struct.java:872) at jnr.ffi.Struct$Unsigned8.<init>(Struct.java:1113) at jnr.unixsocket.SockAddrUnix$BSDSockAddrUnix.<init>(SockAddrUnix.java:187) at jnr.unixsocket.SockAddrUnix.create(SockAddrUnix.java:174) at jnr.unixsocket.UnixSocketAddress.<init>(UnixSocketAddress.java:47) at jnr.unixsocket.UnixSocketPair.<init>(UnixSocketPair.java:25) at jnr.unixsocket.BasicFunctionalityTest.setUp(BasicFunctionalityTest.java:36) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

Caused by: java.lang.UnsatisfiedLinkError: could not get native definition for type POINTER, original error message follows: java.lang.UnsatisfiedLinkError: Unable to execute or load jffi binary stub from /var/folders/v8/fpwjm10x3mxck_1j2_1_13qm0000gn/T/. Set TMPDIRor Java propertyjava.io.tmpdir to a read/write path that is not mounted "noexec".
Can't load library: /Users/xxx/IdeaProjects/jnr-unixsocket/jffi833868370737744349.dylib at com.kenai.jffi.internal.StubLoader.tempLoadError(StubLoader.java:424) at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:409) at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:278) at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:487)

@subramani927
Copy link
Author

subramani927 commented Oct 11, 2023

Update: It works with OpenLogic OpenJDK 17 and not with Oracle Open JDK 17.

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

No branches or pull requests

1 participant