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

Restore is not working with following capabilities #2262

Closed
PSoni8 opened this issue Sep 12, 2023 · 1 comment
Closed

Restore is not working with following capabilities #2262

PSoni8 opened this issue Sep 12, 2023 · 1 comment

Comments

@PSoni8
Copy link

PSoni8 commented Sep 12, 2023

Description
I am running checkpoint and restore using CLI mode with following capabilities on fedora 34 based system, criu-3.16.1 version.
$ uname -a
Linux localhost.localdomain 5.12.3.valarch.master.1.2 #1 SMP Thu Oct 14 17:01:59 MDT 2021 x86_64 x86_64 x86_64 GNU/Linux
setcap
'cap_dac_override=eip
cap_chown=eip
cap_setpcap=eip
cap_setgid=eip
cap_audit_control=eip
cap_dac_read_search=eip
cap_net_admin=eip
cap_sys_admin=eip
cap_sys_chroot=eip
cap_sys_ptrace=eip
cap_fowner=eip
cap_kill=eip
cap_fsetid=eip
cap_sys_resource=eip
cap_setuid=eip'
/usr/sbin/criu

Describe the results you received:
Dump is successful but restore is failing with below issues:
[2023-09-08T11:53:53.719Z] (00.010083) 39524: timens: monotonic -6 965717522
[2023-09-08T11:53:53.719Z] (00.010099) 39524: Error (criu/timens.c:97): Unable to set a monotonic clock offset: Operation not permitted
[2023-09-08T11:53:53.719Z] (00.010122) Error (criu/cr-restore.c:2447): Restoring FAILED.
[2023-09-08T11:53:53.719Z] (00.010301) Error (criu/cr-restore.c:1480): 39524 killed by signal 9: Killed

But when executing it with superuser permissions (sudo) both checkpoint-restore is successful.

Want to konw which other cap permissions are required apart from this.

CRIU logs and information:

CRIU full dump/restore logs:

[dump_log.txt](https://github.com/checkpoint-restore/criu/files/12583167/dump_log.txt)

[restore_log.txt](https://github.com/checkpoint-restore/criu/files/12583127/restore_log.txt)

Output of `criu --version`:

3.16.1

Additional environment details:
$ uname -a
Linux localhost.localdomain 5.12.3.valarch.master.1.2 #1 SMP Thu Oct 14 17:01:59 MDT 2021 x86_64 x86_64 x86_64 GNU/Linux
sample_code_in_system.txt

@rst0git
Copy link
Member

rst0git commented Sep 12, 2023

(00.010384)   2309: timens: monotonic -6 966515607
(00.010402)   2309: Error (criu/timens.c:97): Unable to set a monotonic clock offset: Operation not permitted

@PSoni8 This error appears because CRIU attempts to write to timens_offsets. This requires CAP_SYS_TIME capability.

@avagin avagin closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants