-
Notifications
You must be signed in to change notification settings - Fork 613
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
Criu-ns restore fails with error: Failed to set group 1 on 0: Inappropriate ioctl for device #1893
Labels
Comments
I am also facing same issue. Restore with criu-ns fails with this message:
|
Snorch
added a commit
to Snorch/criu
that referenced
this issue
Jun 22, 2022
When we are restoring in new pidns we specifically do setsid() from criu-ns init so that sids of restored tasks are non-zero in this pidns and on next dump CRIU would not have problems with zero sids, see [1]. But after this CRIU tries to inherit and setup a tty for the restored process, and it fails to set it's process group via TIOCSPGRP to be a foreground group for it's tty, because tty already is a controlling tty for other session (which we had before setsid). So to make it restore we need to reset tty to be a controlling tty of criu-ns init via TIOCSCTTY before calling criu. checkpoint-restore#232 [1] Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Snorch
added a commit
to Snorch/criu
that referenced
this issue
Jun 22, 2022
When we restore a shell-job we would inherit tty-s, so even if we don't have a right mount for it in container on dump, on restore it should just be right. Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Snorch
added a commit
to Snorch/criu
that referenced
this issue
Jun 22, 2022
When we are restoring in new pidns we specifically do setsid() from criu-ns init so that sids of restored tasks are non-zero in this pidns and on next dump CRIU would not have problems with zero sids, see [1]. But after this CRIU tries to inherit and setup a tty for the restored process, and it fails to set it's process group via TIOCSPGRP to be a foreground group for it's tty, because tty already is a controlling tty for other session (which we had before setsid). So to make it restore we need to reset tty to be a controlling tty of criu-ns init via TIOCSCTTY before calling criu. Else when restoring first time via criu-ns (from criu-ns dump) we get: Error (criu/tty.c:689): tty: Failed to set group 40816 on 0: Inappropriate ioctl for device checkpoint-restore#232 [1] Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Snorch
added a commit
to Snorch/criu
that referenced
this issue
Jun 22, 2022
When we restore a shell-job we would inherit tty-s, so even if we don't have a right mount for it in container on dump, on restore it should just be right. Else when dumping second time via criu-ns we get: (00.005678) Error (criu/files-reg.c:1710): Can't lookup mount=29 for fd=0 path=/dev/pts/20 Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Merged
@Niteesh26 @ashu-mehra Please try the fix from #1922, at least it helps for me to c/r simple
|
Snorch
added a commit
to Snorch/criu
that referenced
this issue
Jul 20, 2022
When we are restoring in new pidns we specifically do setsid() from criu-ns init so that sids of restored tasks are non-zero in this pidns and on next dump CRIU would not have problems with zero sids, see [1]. But after this CRIU tries to inherit and setup a tty for the restored process, and it fails to set it's process group via TIOCSPGRP to be a foreground group for it's tty, because tty already is a controlling tty for other session (which we had before setsid). So to make it restore we need to reset tty to be a controlling tty of criu-ns init via TIOCSCTTY before calling criu. Else when restoring first time via criu-ns (from criu-ns dump) we get: Error (criu/tty.c:689): tty: Failed to set group 40816 on 0: Inappropriate ioctl for device checkpoint-restore#232 [1] v2: add why and what comment in code, set controlling tty only for --shell-job and fail if stdin is not a tty. Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Snorch
added a commit
to Snorch/criu
that referenced
this issue
Jul 20, 2022
When we restore a shell-job we would inherit tty-s, so even if we don't have a right mount for it in container on dump, on restore it should just be right. Else when dumping second time via criu-ns we get: (00.005678) Error (criu/files-reg.c:1710): Can't lookup mount=29 for fd=0 path=/dev/pts/20 Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
A friendly reminder that this issue had no activity for 30 days. |
Snorch
added a commit
to Snorch/criu
that referenced
this issue
Aug 14, 2022
When we are restoring in new pidns we specifically do setsid() from criu-ns init so that sids of restored tasks are non-zero in this pidns and on next dump CRIU would not have problems with zero sids, see [1]. But after this CRIU tries to inherit and setup a tty for the restored process, and it fails to set it's process group via TIOCSPGRP to be a foreground group for it's tty, because tty already is a controlling tty for other session (which we had before setsid). So to make it restore we need to reset tty to be a controlling tty of criu-ns init via TIOCSCTTY before calling criu. Else when restoring first time via criu-ns (from criu-ns dump) we get: Error (criu/tty.c:689): tty: Failed to set group 40816 on 0: Inappropriate ioctl for device checkpoint-restore#232 [1] v2: add why and what comment in code, set controlling tty only for --shell-job and fail if stdin is not a tty. Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Snorch
added a commit
to Snorch/criu
that referenced
this issue
Aug 14, 2022
When we restore a shell-job we would inherit tty-s, so even if we don't have a right mount for it in container on dump, on restore it should just be right. Else when dumping second time via criu-ns we get: (00.005678) Error (criu/files-reg.c:1710): Can't lookup mount=29 for fd=0 path=/dev/pts/20 Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
avagin
pushed a commit
that referenced
this issue
Aug 30, 2022
When we are restoring in new pidns we specifically do setsid() from criu-ns init so that sids of restored tasks are non-zero in this pidns and on next dump CRIU would not have problems with zero sids, see [1]. But after this CRIU tries to inherit and setup a tty for the restored process, and it fails to set it's process group via TIOCSPGRP to be a foreground group for it's tty, because tty already is a controlling tty for other session (which we had before setsid). So to make it restore we need to reset tty to be a controlling tty of criu-ns init via TIOCSCTTY before calling criu. Else when restoring first time via criu-ns (from criu-ns dump) we get: Error (criu/tty.c:689): tty: Failed to set group 40816 on 0: Inappropriate ioctl for device #232 [1] v2: add why and what comment in code, set controlling tty only for --shell-job and fail if stdin is not a tty. Fixes: #1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
avagin
pushed a commit
that referenced
this issue
Aug 30, 2022
When we restore a shell-job we would inherit tty-s, so even if we don't have a right mount for it in container on dump, on restore it should just be right. Else when dumping second time via criu-ns we get: (00.005678) Error (criu/files-reg.c:1710): Can't lookup mount=29 for fd=0 path=/dev/pts/20 Fixes: #1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
avagin
pushed a commit
to avagin/criu
that referenced
this issue
Mar 13, 2023
When we are restoring in new pidns we specifically do setsid() from criu-ns init so that sids of restored tasks are non-zero in this pidns and on next dump CRIU would not have problems with zero sids, see [1]. But after this CRIU tries to inherit and setup a tty for the restored process, and it fails to set it's process group via TIOCSPGRP to be a foreground group for it's tty, because tty already is a controlling tty for other session (which we had before setsid). So to make it restore we need to reset tty to be a controlling tty of criu-ns init via TIOCSCTTY before calling criu. Else when restoring first time via criu-ns (from criu-ns dump) we get: Error (criu/tty.c:689): tty: Failed to set group 40816 on 0: Inappropriate ioctl for device checkpoint-restore#232 [1] v2: add why and what comment in code, set controlling tty only for --shell-job and fail if stdin is not a tty. Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
avagin
pushed a commit
to avagin/criu
that referenced
this issue
Mar 13, 2023
When we restore a shell-job we would inherit tty-s, so even if we don't have a right mount for it in container on dump, on restore it should just be right. Else when dumping second time via criu-ns we get: (00.005678) Error (criu/files-reg.c:1710): Can't lookup mount=29 for fd=0 path=/dev/pts/20 Fixes: checkpoint-restore#1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
avagin
pushed a commit
that referenced
this issue
Apr 16, 2023
When we are restoring in new pidns we specifically do setsid() from criu-ns init so that sids of restored tasks are non-zero in this pidns and on next dump CRIU would not have problems with zero sids, see [1]. But after this CRIU tries to inherit and setup a tty for the restored process, and it fails to set it's process group via TIOCSPGRP to be a foreground group for it's tty, because tty already is a controlling tty for other session (which we had before setsid). So to make it restore we need to reset tty to be a controlling tty of criu-ns init via TIOCSCTTY before calling criu. Else when restoring first time via criu-ns (from criu-ns dump) we get: Error (criu/tty.c:689): tty: Failed to set group 40816 on 0: Inappropriate ioctl for device #232 [1] v2: add why and what comment in code, set controlling tty only for --shell-job and fail if stdin is not a tty. Fixes: #1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
avagin
pushed a commit
that referenced
this issue
Apr 16, 2023
When we restore a shell-job we would inherit tty-s, so even if we don't have a right mount for it in container on dump, on restore it should just be right. Else when dumping second time via criu-ns we get: (00.005678) Error (criu/files-reg.c:1710): Can't lookup mount=29 for fd=0 path=/dev/pts/20 Fixes: #1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
criu-ns dump works properly as .img files are created in the CRIU folder.
criu-ns restore fails to restore the process with the error:
Failed to set group 1 on 0: Inappropriate ioctl for device
Steps to reproduce the issue:
Describe the results you received:
Failed to set group 1 on 0: Inappropriate ioctl for device
Describe the results you expected:
Restore completed successfully
Additional information you deem important (e.g. issue happens only occasionally):
CRIU logs and information:
CRIU full dump/restore logs:
Output of `criu --version`:
Output of `criu check --all`:
Additional environment details:
The text was updated successfully, but these errors were encountered: