[Java] GLIBC issue during Ray.init() call

@ysu let me answer these questions for you
Q1: /lib64/libc.so.6: version `GLIBC_2.25’ not found (required by /tmp/ray/1682382173023/libcore_worker_library_java.so)
A1: Maybe you take a look for version of GLIBC, compile ‘‘libcore_worker_library_java.so’’ without specifying GLIBC version. I guess it’s caused by the compilation environment where GLIBC is 2.25, and you can take a look for version of GLIBC by “ldd --version”.

Q2: java.lang.NoSuchFieldError: isAsync
As you build your project with the following Ray depemdencures:
“ray-api”: “io.ray:ray-api:2.0.0”,
“ray-runtime”: “io.ray:ray-runtime:2.0.0”,
“ray”: “pypi:ray:2.2.0”
The Field if IsAsync is added to ray by [Ray][xlang]Setting async flag for Python actor actor in Java by XiaodongLv · Pull Request #28149 · ray-project/ray · GitHub and released in Ray-2.1.0, so it’s incompatible.

As you build your project with Ray dependences:
“ray-api”: “io.ray:ray-api:2.0.0”,
“ray-runtime”: “io.ray:ray-runtime:2.0.0”,
“ray”: “pypi:ray:2.2.0”

The “isAsync” is added by [Ray][xlang]Setting async flag for Python actor actor in Java by XiaodongLv · Pull Request #28149 · ray-project/ray · GitHub and released in Ray-2.1.0, so it’s icompatible.

Building “libcore_worker_library_java.so” without specifying the version of GLiBC, I guess that the GLIBC version of the machine used to compile Ray is 2.25. Maybe you can take a look at version of GLIBC by command “ldd --version”. As you see, you can rebuild ray to solve the question.

@XiaodongLv Thanks a lot for this info. So just to confirm: if I update “ray-api” and “ray-runtime” to any released version >= 2.1.0, the libcore_worker_library_java.so would be compatible with our machine, right?

@XiaodongLv I tried to use the publicly released ray-api and ray-runtime 2.4.0, but unfortunately, the GLIBC issue occurs again. So the libcore_worker_library_java.so in the new version of ray-runtime is still not compatible with CentOS 3.9. Wondering if you could help take a look at the compiling way of that so file? Thanks.

I think the root cause is that we build jar in the CI environment, not in the manylinux2014 image. ray/pipeline.build.yml at master · ray-project/ray · GitHub

We release the jars in this steps ray/java-release-guide.md at master · ray-project/ray · GitHub.

@XiaodongLv Let’s move the compiling to the manylinux2014 image!

I agree with @GuyangSong , because the glibc version of the machine where ray is released is 2.25, so you build ray on your computer will be successful.

@GuyangSong @XiaodongLv Thank you both for your response. So when can we expect the new version based on the compiling in the manylinux2014 image to be released?

@ysu we will fix it in the next release version. But I don’t know the release date now, I will confirm it this week.

@GuyangSong Thanks a lot! This is really helpful to us as we do not need to build the libs on our own and track the version. Please do keep us updated once the date is confirmed :slight_smile:

Hi @GuyangSong , as we are waiting for the new libs that are compatible with CentOS 7.9, wondering if there is any update about when they will be released? Thanks.

We have fixed it and the new release will come at the end of this month.

@ysu Can you help to verify this jar first https://ray-wheels.s3-us-west-2.amazonaws.com/jars/master/946459a63eb82fbc9c9e60beb867d6fd3e3aa849/linux/ray-runtime-2.0.0-SNAPSHOT-sources.jar?

@GuyangSong Thanks for the good news. W.r.t. the jar, wondering if you have a 2.4.0 version that I can try? Because we had some other issues with 2.0.0, we have updated the Python Ray to 2.4.0. So wondering if you could provide a snapshot version of ray-runtime-2.4.0 jar? Thanks again.

Hi @ysu ,

We have release Ray java 2.4.0: Installing Ray — Ray 2.4.0

@jjyao Thanks for your response, but I assume this 2.4.0 is still the version that was built in the CI environment, right? That has caused the GLIBC issue (as described in the main post) for us, since it is not compatible with CentOS 7.9. That is why @GuyangSong proposed to build the jars on the manylinux2014 image (see here).

@ysu Actually, the jar which I pasted above is 2.4.0. The version name is “2.0.0-SNAPSHOT” now because it is built in ray OSS master CI and we didn’t use a real version. You can check it in your environment first and use the next release version when we release.

Got it, thanks for the clarification. I will try the jar out.

@GuyangSong I verified that the jar that you provided solved the GLIBC issue.

@ysu Thanks for your feedback! I think the new version will be out this week.