criu icon indicating copy to clipboard operation
criu copied to clipboard

CRIU hang on dump or restore

Open biozit opened this issue 2 years ago • 7 comments

I am trying to dump or restore any process (even a process that no exists) using sudo or root access:

root@test:~#  criu dump -t 1211114 -vvvvv
(00.000005) Version: 3.17.1 (gitid 0)
(00.000026) Running on osdftest.t2.ucsd.edu Linux 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64
(00.000041) File /run/criu.kdat does not exist
(00.000065) sockets: Probing sock diag modules
(00.000128) sockets: Done probing
(00.027251) Pagemap is fully functional
(00.027305) Found anon-shmem device at 1
(00.027339) Hugetlb size 2 Mb is supported but cannot get dev's number
(00.027358) Hugetlb size 1024 Mb is supported but cannot get dev's number
(00.027376) Reset 46767's dirty tracking
(00.027461)  ... done
(00.027502) Dirty track supported on kernel
(00.027589) Found task size of 7ffffffff000

kernel:

root@test:~# uname -a
Linux  5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

No error msg. It only hangs.

biozit avatar Jan 03 '23 21:01 biozit

Run it under strace and attach logs here:

$ strace -s 1024 -f -o strace.log criu dump -t XXX -vvvv 

avagin avatar Jan 03 '23 23:01 avagin

strace.log

biozit avatar Jan 03 '23 23:01 biozit

Could you try out with this patch?

diff --git a/criu/kerndat.c b/criu/kerndat.c
index 5b567e79f..a2d4e2a89 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -599,7 +599,7 @@ static int kerndat_loginuid(void)
 static int kerndat_iptables_has_xtlocks(void)
 {
        int fd;
-       char *argv[4] = { "sh", "-c", "iptables -w -L", NULL };
+       char *argv[4] = { "sh", "-c", "iptables -n -w -L", NULL };
 
        fd = open("/dev/null", O_RDWR);
        if (fd < 0) {

avagin avatar Jan 04 '23 16:01 avagin

Hi, now it is working! Thank you!

biozit avatar Jan 04 '23 18:01 biozit

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Feb 05 '23 00:02 github-actions[bot]

Please, could I help with this?

biozit avatar Feb 05 '23 17:02 biozit

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Mar 08 '23 00:03 github-actions[bot]