Hey, thanks for the prototype
I am trying to run this on ubuntu 18.10, oracle jdk 1.8.0_201, criu 3.11, gcc 8.2
When I am trying to run the prototype though, I get the following output:
keks@ubuntu:~/CRIUForJava$ sudo setsid /opt/jdk/jdk1.8.0_201/bin/java -XX:+UseSerialGC -XX:-UsePerfData -Djava.library.path=$LOAD_LIBRARY_PATH TestRandom 1000000 1000
Before any goodness
Library path = /usr/lib:./
About to load Checkpoint Restore library libCheckpointRestore.so
About to load criu library libcriu.so
Before call to load CheckpointRestore
After call to load CheckpointRestore
After call to load criu
/opt/jdk/jdk1.8.0_201/bin/java: symbol lookup error: /home/keks/CRIUForJava/libCheckpointRestore.so: undefined symbol: criu_init_opts
Here is what I did:
-
Ensured that my system has checkpointrestore enabled
-
Ensured criu version criu 3.11
-
Ran sudo criu service& in the cloned git directory ( it doesnt matter where i create the socket file, right? )
-
Checked criu -> looked good
-
Compiled the CheckpointRestore.java ( aparently it compiled just this file, so I had to do javac *.java in order to run the example )
6-7. Generated the .h file and made it an hpp file
-
Exported the LOAD_LIBRARY_PATH export LOAD_LIBRARY_PATH=/usr/lib:./
( In the readme you use the /usr/lib64 directory, on ubuntu somehow i don't have this one, so I copied the libcriu.so file manually into /usr/lib and exported the path )
-
Built the criu native library
gcc -shared -fPIC -I/opt/jdk/jdk1.8.0_201/include -I/opt/jdk/jdk1.8.0_201/include/linux -I/usr/lib/ -I/usr/include/criu -lcriu -o libCheckpointRestore.so CheckpointRestore.cpp
( It appeared that the -l/usr/include could not find the criu.h as it didnt exist under the path, so I copied the {criu_sources_path}/lib/c folder into the /usr/include/criu )
-
Ran the example (see error in the beginning)
Elaborations:
so it looks like criu_init_opts symbol could not be found.
The symbol is not defined in the libCheckpointRestore.so
keks@ubuntu:~/CRIUForJava$ nm libCheckpointRestore.so
...
U criu_check
U criu_dump
U criu_init_opts
...
The symbol is defined in libcriu.so
keks@ubuntu:~/CRIUForJava$ nm /usr/lib/libcriu.so
...
0000000000009370 T criu_init_opts
...
So somehow the symbols are not being loaded properly... Am I doing something wrong here? Should I just should use RedHat Linux instead of Ubuntu?
Hey, thanks for the prototype
I am trying to run this on ubuntu 18.10, oracle jdk 1.8.0_201, criu 3.11, gcc 8.2
When I am trying to run the prototype though, I get the following output:
Here is what I did:
Ensured that my system has checkpointrestore enabled
Ensured criu version criu 3.11
Ran
sudo criu service&in the cloned git directory ( it doesnt matter where i create the socket file, right? )Checked criu -> looked good
Compiled the CheckpointRestore.java ( aparently it compiled just this file, so I had to do javac *.java in order to run the example )
6-7. Generated the .h file and made it an hpp file
Exported the LOAD_LIBRARY_PATH
export LOAD_LIBRARY_PATH=/usr/lib:./( In the readme you use the
/usr/lib64directory, on ubuntu somehow i don't have this one, so I copied thelibcriu.sofile manually into/usr/liband exported the path )Built the criu native library
gcc -shared -fPIC -I/opt/jdk/jdk1.8.0_201/include -I/opt/jdk/jdk1.8.0_201/include/linux -I/usr/lib/ -I/usr/include/criu -lcriu -o libCheckpointRestore.so CheckpointRestore.cpp( It appeared that the -l/usr/include could not find the criu.h as it didnt exist under the path, so I copied the
{criu_sources_path}/lib/cfolder into the/usr/include/criu)Ran the example (see error in the beginning)
Elaborations:
so it looks like
criu_init_optssymbol could not be found.The symbol is not defined in the libCheckpointRestore.so
The symbol is defined in libcriu.so
So somehow the symbols are not being loaded properly... Am I doing something wrong here? Should I just should use RedHat Linux instead of Ubuntu?