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

Issues running tests on ubuntu bionic #3

Open
tjwatson opened this issue Apr 1, 2021 · 4 comments
Open

Issues running tests on ubuntu bionic #3

tjwatson opened this issue Apr 1, 2021 · 4 comments

Comments

@tjwatson
Copy link

tjwatson commented Apr 1, 2021

I have the following installed:

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic

adoptopenjdk-8-openj9xl/bionic,now 8u282-b08.openj9-0.24.0-3 amd64 [installed]

criu/bionic,now 3.6-2 amd64 [installed]

The classes and native library compile fine. In order to find the libcriu.so library I had to add /usr/lib/x86_64-linux-gnu to the LD_LIBRARY_PATH. Not sure why the library was not automatically available from the install of criu to Java. After that the tests still fail but now with this error:

[ERROR] /usr/lib/jvm/adoptopenjdk-8-openj9xl-amd64/jre/bin/java: symbol lookup error: /tmp/libCheckpointRestore.so: undefined symbol: criu_init_opts

What version of criu must be installed for this to work? (warning, I am very rusty on developing and building JNI libraries so this could just be a simple error on my part.

@tjwatson
Copy link
Author

tjwatson commented Apr 1, 2021

This seems the same as others had with the previous prototype at chflood/CRIUForJava#1

Maybe this is ubuntu specific.

@tjwatson
Copy link
Author

tjwatson commented Apr 5, 2021

This seems to make it work on ubuntu:

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcriu.so

While adding /usr/lib/x86_64-linux-gnu/ to LD_LIBRARY_PATH does not seem to help.

@vijaysun-omr
Copy link

https://stackoverflow.com/questions/9558909/jni-symbol-lookup-error-in-shared-library-on-linux/13086028

has some other comments that look relevant (in addition to the LD_PRELOAD option) around how the code should be built using gcc

@tjwatson
Copy link
Author

tjwatson commented Apr 5, 2021

More clarification. I still need to make sure to set LD_LIBRARY_PATH AND LD_PRELOAD to get the tests to pass. If I remove the explicit call to System.loadLibrary("criu"); then I can get it to pass by only setting export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcriu.so

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

2 participants