Avatar: TCP connection migration with CRIU

Hope we can find Avatar and goal in.

Program: simple client/server, loopback

Tools: CRIU does checkpoint/restore work

ps -ef

liuqius+ 20052 2464 0 22:00 pts/6 00:00:00 ./server 7022

liuqius+ 20053 2464 0 22:00 pts/6 00:00:00 ./client 127.0.0.1 7022

When I start server and client, and then use CRIU to do checkpoint:

[email protected]:/home/liuqiushan/BCMatrix/criu/deps/criu-x86_64#

criu dump -D checkpoint -t 20052 –shell-job –tcp-established

Though it can generate the checkpoint image files, but some errors happen:

Error (parasite-syscall.c:389): si_code=1 si_pid=20114 si_status=0

Error (parasite-syscall.c:389): si_code=1 si_pid=20119 si_status=0

So let’s see parasite-syscall.c:

I think we can ignore the Error, because it uses SIGCHLD to do exit.

Continue.

We finish the dump work on server and client respectively. If we restore them at once, then it will succeed. But if we reboot the laptop, we will encounter the following Errors:

[email protected]:/home/liuqiushan/BCMatrix/criu/deps/criu-x86_64#

criu restore -d -D checkpoint –shell-job –tcp-established

iptables: Bad rule (does a matching rule exist in that chain?).

Error (util.c:580): exited, status=1

Error (netfilter.c:69): Iptables configuration failed: No such file or directory

iptables: Bad rule (does a matching rule exist in that chain?).

Error (util.c:580): exited, status=1

Error (netfilter.c:69): Iptables configuration failed: No such file or directory

Can’t read socket: Connection reset by peer

[email protected]:/home/liuqiushan/BCMatrix/criu/deps/criu-x86_64# criu restore -d -D checkpoint_client –shell-job –tcp-established

iptables: Bad rule (does a matching rule exist in that chain?).

Error (util.c:580): exited, status=1

Error (netfilter.c:69): Iptables configuration failed: No such file or directory

iptables: Bad rule (does a matching rule exist in that chain?).

Error (util.c:580): exited, status=1

Error (netfilter.c:69): Iptables configuration failed: No such file or directory

PP 26 -> -1

Pay attention to :

iptables: Bad rule (does a matching rule exist in that chain?).

And also through util.c and netfilter.c, we can focus on the problem of iptables.

More importantly, the server can restore successfully, but the client, it seems that:

the client also restores, but after ‘PP 26->-1 (above)’, it exit abnormally.

We should pay attention to these information:

  • iptables: Bad rule (does a matching rule exist in that chain?).
  • Can’t read socket: Connection reset by peer
  • PP 26 -> -1

According to SIGCHLD mentioned above, I try such work:

first dump client. then server,

and restore server, then client

Also failed.

A little confusing.

                          2015-02-28

时间: 2024-08-03 11:00:19

Avatar: TCP connection migration with CRIU的相关文章

idea启动tomcat服务失败 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild:

我的工程是从eclipse生成的,个人习惯用idea开发.重复了一遍以往正常的不能再正常了的导入配置,结果遇到了如下问题: SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start comp

A TCP connection is distinguished by four values

4个值唯一地定义一条TCP连接. HTTP The Definitive Guide A computer might have several TCP connections open at any one time. TCP keeps all these connections straight through port numbers. Port numbers are like employees' phone extensions. Just as a company's main

HttpWebRequest's Timeout and ReadWriteTimeout — What do these mean for the underlying TCP connection?

http://stackoverflow.com/questions/7250983/httpwebrequests-timeout-and-readwritetimeout-what-do-these-mean-for-the-unde https://support.microsoft.com/en-us/kb/904262 https://msdn.microsoft.com/library/e1ax3cw0.aspx?f=255&MSPPError=-2147217396 https:/

ASA TCP Connection Flags

Have you ever wondered what the flags meant when you issued the show conn or show connections command? This post will demystify that for you. Viewing the Connections Use the command show conn to view the connections currently going through the firewa

Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: PermGen space

在Eclipse 调试 springside showcase项目中,tomcat报异常 Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: PermGen space 在google半天后,找到解决方法: Tomcat直接运行 Catalina.sh/Catalina.bat 设置: windows: set JAVA_OPTS="-Xms1024m -Xmx10246m -X

TCP Connection Management(1)

Introduction Recall that TCP's service model is a byte stream. TCP detects and repairs essentially all the data transfer problems that may be introduced by packet loss, duplication, or errors at the IP layer (or below). UDP is a connectionless protoc

TCP Connection Management(4)

Reset Segments A segment hav- ing this bit set to "on" is called a "reset segment" or simply a "reset." In general, a reset is sent by TCP whenever a segment arrives that does not appear to be correct for the referenced conne

RT: TCP connection close

CLOSE is an operation meaning "I have no more data to send." The notion of closing a full-duplex connection is subject to ambiguous interpretation, of course, since it may not be obvious how to treat the receiving side of the connection. We have

TCP Connection Management(2)

Connections and Translators NAT TCP Options Every option begins with a 1-byte kind that specifies the type of option. Options that are not understood are simply ignored, according to [RFC1122]. The options with a kind value of 0 and 1 occupy a single