Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One or more namespaces doesn't belong to the target user namespace #2315

Open
Spiderfffun opened this issue Dec 18, 2023 · 3 comments
Open

Comments

@Spiderfffun
Copy link

Criu gives an error message which I can't find any information about online.

Steps to reproduce the issue:

  1. Install criu
  2. Run roblox (currently using vinegar)
  3. Attempt to dump the game, using any of the PIDs that pop up in the system monitor.

Describe the results you received:
Error (criu/namespaces.c:934): Unable to convert uid or gid
Error (criu/namespaces.c:1000): One or more namespaces doesn't belong to the target user namespace
Segmentation fault

Describe the results you expected:
It creates files in the folder which I can use to reboot the process in the exact same state.

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

CRIU logs and information:

CRIU full dump/restore logs:

(00.000004) Version: 3.16.1 (gitid 0)
(00.000027) Running on spiderfffun-mint Linux 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64
(00.000057) Loaded kdat cache from /run/criu.kdat
(00.000064) ========================================
(00.000069) Dumping processes (pid: 131314)
(00.000073) ========================================
(00.000081) rlimit: RLIMIT_NOFILE unlimited for self
(00.000095) Running pre-dump scripts
(00.000127) irmap: Searching irmap cache in work dir
(00.000147) No irmap-cache image
(00.000152) irmap: Searching irmap cache in parent
(00.000160) No parent images directory provided
(00.000166) irmap: No irmap cache
(00.000177) cpu: x86_family 23 x86_vendor_id AuthenticAMD x86_model_id AMD Ryzen 5 PRO 4650G with Radeon Graphics
(00.000183) cpu: fpu: xfeatures_mask 0x5 xsave_size 832 xsave_size_max 896 xsaves_size 832
(00.000189) cpu: fpu: x87 floating point registers     xstate_offsets      0 / 0      xstate_sizes    160 / 160   
(00.000195) cpu: fpu: AVX registers                    xstate_offsets    576 / 576    xstate_sizes    256 / 256   
(00.000199) cpu: fpu:1 fxsr:1 xsave:1 xsaveopt:1 xsavec:1 xgetbv1:1 xsaves:1
(00.000409) cg-prop: Parsing controller "cpu"
(00.000414) cg-prop: 	Strategy "replace"
(00.000417) cg-prop: 	Property "cpu.shares"
(00.000420) cg-prop: 	Property "cpu.cfs_period_us"
(00.000422) cg-prop: 	Property "cpu.cfs_quota_us"
(00.000424) cg-prop: 	Property "cpu.rt_period_us"
(00.000426) cg-prop: 	Property "cpu.rt_runtime_us"
(00.000429) cg-prop: Parsing controller "memory"
(00.000431) cg-prop: 	Strategy "replace"
(00.000434) cg-prop: 	Property "memory.limit_in_bytes"
(00.000437) cg-prop: 	Property "memory.memsw.limit_in_bytes"
(00.000443) cg-prop: 	Property "memory.swappiness"
(00.000447) cg-prop: 	Property "memory.soft_limit_in_bytes"
(00.000455) cg-prop: 	Property "memory.move_charge_at_immigrate"
(00.000466) cg-prop: 	Property "memory.oom_control"
(00.000473) cg-prop: 	Property "memory.use_hierarchy"
(00.000478) cg-prop: 	Property "memory.kmem.limit_in_bytes"
(00.000482) cg-prop: 	Property "memory.kmem.tcp.limit_in_bytes"
(00.000487) cg-prop: Parsing controller "cpuset"
(00.000490) cg-prop: 	Strategy "replace"
(00.000495) cg-prop: 	Property "cpuset.cpus"
(00.000500) cg-prop: 	Property "cpuset.mems"
(00.000504) cg-prop: 	Property "cpuset.memory_migrate"
(00.000508) cg-prop: 	Property "cpuset.cpu_exclusive"
(00.000512) cg-prop: 	Property "cpuset.mem_exclusive"
(00.000516) cg-prop: 	Property "cpuset.mem_hardwall"
(00.000519) cg-prop: 	Property "cpuset.memory_spread_page"
(00.000522) cg-prop: 	Property "cpuset.memory_spread_slab"
(00.000527) cg-prop: 	Property "cpuset.sched_load_balance"
(00.000530) cg-prop: 	Property "cpuset.sched_relax_domain_level"
(00.000534) cg-prop: Parsing controller "blkio"
(00.000538) cg-prop: 	Strategy "replace"
(00.000541) cg-prop: 	Property "blkio.weight"
(00.000544) cg-prop: Parsing controller "freezer"
(00.000547) cg-prop: 	Strategy "replace"
(00.000551) cg-prop: Parsing controller "perf_event"
(00.000554) cg-prop: 	Strategy "replace"
(00.000558) cg-prop: Parsing controller "net_cls"
(00.000561) cg-prop: 	Strategy "replace"
(00.000564) cg-prop: 	Property "net_cls.classid"
(00.000567) cg-prop: Parsing controller "net_prio"
(00.000569) cg-prop: 	Strategy "replace"
(00.000572) cg-prop: 	Property "net_prio.ifpriomap"
(00.000575) cg-prop: Parsing controller "pids"
(00.000577) cg-prop: 	Strategy "replace"
(00.000581) cg-prop: 	Property "pids.max"
(00.000587) cg-prop: Parsing controller "devices"
(00.000590) cg-prop: 	Strategy "replace"
(00.000594) cg-prop: 	Property "devices.list"
(00.000633) Preparing image inventory (version 1)
(00.000670) Add pid ns 1 pid 140923
(00.000679) Add net ns 2 pid 140923
(00.000689) Add ipc ns 3 pid 140923
(00.000698) Add uts ns 4 pid 140923
(00.000707) Add time ns 5 pid 140923
(00.000723) Add mnt ns 6 pid 140923
(00.000732) Add user ns 7 pid 140923
(00.000740) Add cgroup ns 8 pid 140923
(00.000744) cg: Dumping cgroups for 140923
(00.000757) cg:  `- New css ID 1
(00.000763) cg:     `- [] -> [/user.slice/user-1000.slice/session-1.scope] [0]
(00.000766) cg: Set 1 is criu one
(00.000821) Detected cgroup V1 freezer
(00.000963) Seized task 131314, state 1
(00.000974) seccomp: Collected tid_real 131314 mode 0x2
(00.001021) Collected (4 attempts, 0 in_progress)
(00.001042) Collected (4 attempts, 0 in_progress)
(00.001050) Collected 131314 in 1 state
(00.001084) Will take pid namespace in the image
(00.001088) Add pid ns 9 pid 131314
(00.001122) Will take mnt namespace in the image
(00.001129) Add mnt ns 10 pid 131314
(00.001139) Will take user namespace in the image
(00.001142) Add user ns 11 pid 131314
(00.001152) Lock network
(00.001168) id_map: 1000 1000 1
(00.001182) id_map: 1000 1000 1
(00.001493) Error (criu/namespaces.c:934): Unable to convert uid or gid
(00.002114) Error (criu/namespaces.c:1000): One or more namespaces doesn't belong to the target user namespace
(00.002151) Unlock network
(00.002157) Unfreezing tasks into 1
(00.002159) 	Unseizing 131314 into 1
Segmentation fault

Output of `criu --version`:

$ criu --version
Version: 3.16.1

Output of `criu check --all`:

$ criu check --all
Warn  (criu/kerndat.c:831): Can't load /run/criu.kdat
Error (criu/util.c:635): exited, status=4
Error (criu/util.c:635): exited, status=4
Warn  (criu/proc_parse.c:886): Write 4294967295 to /proc/self/loginuid failed: Operation not permitted
Warn  (criu/net.c:3442): Unable to get tun network namespace
Warn  (criu/sk-unix.c:224): unix: Unable to open a socket file: Operation not permitted
Error (criu/net.c:3726): Unable create a network namespace: Operation not permitted
Warn  (criu/net.c:3782): NSID isn't reported for network links
Warn  (criu/net.c:3442): Unable to get socket network namespace
Error (criu/net.c:1246): Unexpected error: -1(Operation not permitted)
Error (criu/kerndat.c:1166): Unable create a network namespace: Operation not permitted
Error (criu/util.c:1339): Can't wait or bad status: errno=0, status=256
Error (criu/kerndat.c:1359): kerndat_has_nftables_concat failed when initializing kerndat.
Error (criu/crtools.c:210): Could not initialize kernel features detection.
$ sudo criu check --all
sudo: mon_handle_sigchld: waitpid: No child processes
Looks good.

Additional environment details:
Running Linux Mint 21.2.

@adrianreber
Copy link
Member

Not sure about your application, but Roblox sounds like a game and games usually have a graphical user interface. Applications which are using the graphics card can usually not be checkpointed as CRIU cannot figure out the state of the GPU.

All this is independent of the error you are currently seeing, but if the current error is fixable then it will fail at some later point.

@Snorch
Copy link
Member

Snorch commented Dec 26, 2023

I agree with @adrianreber about graphical problem.

(00.001168) id_map: 1000 1000 1
(00.001182) id_map: 1000 1000 1
(00.001493) Error (criu/namespaces.c:934): Unable to convert uid or gid

As for the mentioned error message, CRIU just needs mapping for root (uid=0) in dumped usernamespace (e.g. to do setns to proper netns and multiple other things).

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants