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

java.lang.UnsatisfiedLinkError: Can't load library: /tmp/libh3-java6591047064313530667.so #97

Open
ytdxwhy opened this issue Jun 6, 2022 · 2 comments

Comments

@ytdxwhy
Copy link

ytdxwhy commented Jun 6, 2022

Hi,
I have a flink job, H3Core.newInstance() is initialized in the open method , when restore from flink state , it throws an exception like this

java.lang.UnsatisfiedLinkError: Can't load library: /tmp/libh3-java6591047064313530667.so

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1820)

at java.lang.Runtime.load0(Runtime.java:810)

at java.lang.System.load(System.java:1086)

at com.uber.h3core.H3CoreLoader.loadNatives(H3CoreLoader.java:125)

at com.uber.h3core.H3CoreLoader.loadNatives(H3CoreLoader.java:89)

at com.uber.h3core.H3Core.newInstance(H3Core.java:73)

at com.sankuai.meituan.banma.rtdw.flink.business.function.BusinessWorkStatusH3ClearRiderRichSinkFunction.open(BusinessWorkStatusH3ClearRiderRichSinkFunction.java:60)

at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)

at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102)

at org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:46)

at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:466)

at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$2(StreamTask.java:547)

at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.runThrowing(StreamTaskActionExecutor.java:50)

at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:537)

at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:577)

at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:767)

at org.apache.flink.runtime.taskmanager.Task.run(Task.java:578)

at java.lang.Thread.run(Thread.java:748)

@TRReeve
Copy link

TRReeve commented Jul 26, 2022

I had a similar problem using the H3 library in a docker container.

java.lang.UnsatisfiedLinkError: /tmp/libh3-java2646520615962866068.so: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/libh3-java2646520615962866068.so)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at com.uber.h3core.H3CoreLoader.loadNatives(H3CoreLoader.java:129)
at com.uber.h3core.H3CoreLoader.loadNatives(H3CoreLoader.java:96)
at com.uber.h3core.H3Core.newInstance(H3Core.java:79)

@isaacbrodsky
Copy link
Collaborator

@TRReeve Which version are you using? If you're on 3.x, could you try with the latest 4.0.0-rc4 prerelease version as the GLIBC requirement should be lower? I believe this is a different issue than @ytdxwhy's.

@ytdxwhy Unfortunately it's a little tough to tell from that error what went wrong. My main suspect would be that the shared object file couldn't be written to the temp directory for some reason, or that the file was deleted between being written and being loaded by H3-Java. Is it possible that the application environment is different when resuming than the environment used when starting your application?

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

3 participants