[crac] RFR: Report checkpoint processing to jcmd

Ilarion Nakonechnyy inakonechnyy at openjdk.java.net
Sun Jun 12 22:27:25 UTC 2022


On Tue, 25 Jan 2022 15:07:55 GMT, Ilarion Nakonechnyy <inakonechnyy at openjdk.org> wrote:

> pass output stream from diagnosticCommand.cpp through java code into os_linux.cpp::VM_crac::doit()

With the new changes, the opened socket (from jcmd) is checked "if the socket is from jcmd" - 
by parsing the /proc/<jcmd pid>/net/unix  file and getting inode number, comparing inode with file descriptor information in checkpoint processing ( function `VM_Crac::doit()` ) 
The opened socket is closed after writing all information regarding command processing just before calling the CRIU engine. 

An output example: 


oot at be23d3635404:/home/source/git/crac# /home/source/git/crac/build/linux-x86_64-server-release/images/jdk/bin/jcmd target/example-jetty-1.0-SNAPSHOT.jar JDK.checkpoint
72107:
JDK.checkpoint command start processing
JVM: FD fd=0 type=character: details1="/dev/pts/0" OK: inherited from process env
JVM: FD fd=1 type=character: details1="/dev/pts/0" OK: inherited from process env
JVM: FD fd=2 type=character: details1="/dev/pts/0" OK: inherited from process env
JVM: FD fd=3 type=regular: details1="/home/source/git/crac/build/linux-x86_64-server-release/images/jdk/lib/modules" OK: inherited from process env
JVM: FD fd=4 type=regular: details1="/home/zulu-17381/example-jetty/target/example-jetty-1.0-SNAPSHOT.jar" OK: in classpath
JVM: FD fd=5 type=regular: details1="/home/zulu-17381/example-jetty/target/dependency/jetty-server-9.4.30.v20200611.jar" OK: assured persistent
JVM: FD fd=6 type=regular: details1="/home/zulu-17381/example-jetty/target/dependency/javax.servlet-api-3.1.0.jar" OK: assured persistent
JVM: FD fd=7 type=regular: details1="/home/zulu-17381/example-jetty/target/dependency/jetty-http-9.4.30.v20200611.jar" OK: assured persistent
JVM: FD fd=8 type=regular: details1="/home/zulu-17381/example-jetty/target/dependency/jetty-util-9.4.30.v20200611.jar" OK: assured persistent
JVM: FD fd=9 type=regular: details1="/home/zulu-17381/example-jetty/target/dependency/jetty-io-9.4.30.v20200611.jar" OK: assured persistent
JVM: FD fd=10 type=regular: details1="/home/zulu-17381/example-jetty/target/dependency/crac-999-20211028.191702-5.jar" OK: assured persistent
JVM: FD fd=23 type=socket: details1="socket:[735739]" issock, details2="socket:[735739]" OK: jcmd socket
CR: CR Checkpoint ...

-------------

PR: https://git.openjdk.org/crac/pull/10


More information about the crac-dev mailing list