checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.77k stars 561 forks source link

After using the criu checkpoint provided by docker, a stream copy error occurs when performing a restore: reading from a closed fifo #2325

Closed ToviHe closed 6 months ago

ToviHe commented 6 months ago

Description

I used the checkpoint and restore cases provided at this address to operate. When I executed docker start --checkpoint checkpoint1 looper, I found that the command was stuck. I checked the docker log through the command journalctl -u docker.service -fand found that the log is as follows

January 08 14:02:12 toviserver dockerd[29907]: time="2024-01-08T14:02:12.787647444+08:00" level =warning msg="Security options with `:` as a separator are deprecated and will be completely unsupported in 17.04, use `=` instead."
January 08 14:02:13 toviserver dockerd[29907]: time="2024-01-08T14:02:13.039217277+08:00" level=error msg="stream copy error: reading from a closed fifo"
January 08 14:02:13 toviserver dockerd[29907]: time="2024-01-08T14:02:13.039244985+08:00" level=error msg="stream copy error: reading from a closed fifo"

Steps to reproduce the issue: 1.Make a checkpoint as shown in the guide 2.Perform restore

Describe the results you received: When I executed the restore command, I hung up.

Describe the results you expected: Successfully restore the container and restore subsequent output

Additional information you deem important (e.g. issue happens only occasionally):

CRIU logs and information:

CRIU full dump/restore logs:

``` I don’t know where to check. I directly use the checkpoint and restore functions provided by docker. ```

Output of `criu --version`:

``` tovi@toviserver:~$ sudo criu --version Version: 3.16.1 ```

Output of `criu check --all`:

``` tovi@toviserver:~$ sudo criu check --all Warn (criu/cr-check.c:855): Dirty tracking is OFF. Memory snapshot will not work. Warn (criu/cr-check.c:1284): Do not have API to map vDSO - will use mremap() to restore vDSO Warn (criu/cr-check.c:1204): CRIU built without CONFIG_COMPAT - can't C/R compatible tasks Looks good but some kernel features are missing which, depending on your process tree, may cause dump or restore failure. sudo: mon_handle_sigchld:waitpid: 没有子进程 ```

Additional environment details: I am using the ubuntu 22.04 operating system and the kernel version is 5.15.0-91-generic,docker version is 24.0.7

adrianreber commented 6 months ago

Unfortunately Ubuntu ships a broken version of CRIU and they are not fixing it. You need to use another distribution or install CRIU from one of our repositories.

ToviHe commented 6 months ago

Thank you for your answer. I am currently installing it through apt install criu. What do i need to do to install from your repositories?

adrianreber commented 6 months ago

https://criu.org/Packages

ToviHe commented 6 months ago

OK, thanks. Is it possible to download this criu_3.17.1-3_arm64.deb ?

image
adrianreber commented 6 months ago

OK, thanks. Is it possible to download this criu_3.17.1-3_arm64.deb ?

Not sure what your question is. Do you have problems downloading it?

ToviHe commented 6 months ago

OK, thanks. Is it possible to download this criu_3.17.1-3_arm64.deb ?

Not sure what your question is. Do you have problems downloading it?

It's not a download problem, I just want to ask if the downloaded version is feasible. I just tried it and it works with version 3.17.1-3. There is no hang during restore.

adrianreber commented 6 months ago

Ah, sounds good. Newer would be better, but I see we have not updated the packages there. The problem is just the version from Ubuntu. Anything not from their repository is good.

Please close the ticket if your problem is solved.

ToviHe commented 6 months ago

Ah, sounds good. Newer would be better, but I see we have not updated the packages there. The problem is just the version from Ubuntu. Anything not from their repository is good.

Please close the ticket if your problem is solved.

OK, thank you

ToviHe commented 6 months ago

Ah, sounds good. Newer would be better, but I see we have not updated the packages there. The problem is just the version from Ubuntu. Anything not from their repository is good.

Please close the ticket if your problem is solved.

OK, thank you