checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.79k stars 565 forks source link

can't dump unprivileged task whose /proc doesn't belong to it #2243

Closed renjinxi closed 11 months ago

renjinxi commented 11 months ago

Description

❯ criu --version
Version: 3.17
❯ uname -a
Linux ax-test 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
❯ sudo criu check --all
Warn  (criu/kerndat.c:845): Stale /run/criu.kdat file
sudo: mon_handle_sigchld: waitpid: No child processes
Looks good.

Steps to reproduce the issue: I used the criu-ns dump process successfully under root, but dump failed under normal users

Describe the results you received: I want to know if this works for normal users, and if it does, what permissions I need to set, or what other settings I need to do

CRIU logs and information:

pie: 1410490: Error (criu/pie/parasite.c:557): can't dump unprivileged task whose /proc doesn't belong to it
pie: 1410490: Error (criu/pie/parasite.c:744): can't get /proc fd
pie: 1410490: __sent ack msg: 76 76 -1
(00.036807) Fetched ack: 76 76 -1
pie: 1410490: Close the control socket for writing
(00.036809) Error (compel/src/lib/infect-rpc.c:68): Command 76 for daemon failed with -1
pie: 1410490: Daemon waits for command
(00.036811) Error (criu/parasite-syscall.c:518): Parasite failed to dump /proc/self/cgroup
(00.036813) ----------------------------------------
(00.036814) Error (criu/cr-dump.c:1674): Dump core (pid: 1410490) failed with -1
.....
ip6tables-restore v1.8.7 (nf_tables): 
line 6: CHAIN_USER_DEL failed (Device or resource busy): chain CRIU
(00.082973) Error (criu/util.c:641): exited, status=4
(00.083047) Unfreezing tasks into 1
(00.083052)     Unseizing 1410490 into 1
(00.083195) Error (criu/cr-dump.c:2053): Dumping FAILED.

dump_failed.log

renjinxi commented 11 months ago

Please let me know if you need any additional information. I NEED HELP!!!!

smmohame commented 11 months ago

@renjinxi , have you ever found the root cause or have a workaround ?

renjinxi commented 11 months ago

Thank you for your reply. I have found the reason for the failure

smmohame commented 11 months ago

@renjinxi, would you please help share your findings? i have been running in to the same issue

renjinxi commented 11 months ago

@renjinxi, would you please help share your findings? i have been running in to the same issue

proc not mounted (The pids shown in /proc are not The corresponding pid namespace but previous)