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

criu-ns returns non-0 exit code after successful dump #1739

Closed
PavloMykhailyshyn opened this issue Jan 31, 2022 · 2 comments · Fixed by #1740
Closed

criu-ns returns non-0 exit code after successful dump #1739

PavloMykhailyshyn opened this issue Jan 31, 2022 · 2 comments · Fixed by #1740

Comments

@PavloMykhailyshyn
Copy link

I noticed one strange error
when I run the dump with criu and it succeeds, criu returns 0
but when I run criu-ns and it succeeds too - return code is now 5
I checked the logs for both criu and criu-ns everything is the same (dump successful)

@PavloMykhailyshyn
Copy link
Author

@rst0git you did a mistake here

def wrap_dump():
    (pid, pid_idx) = get_varg(('-t', '--tree'))
    if pid is None:
        raise OSError(errno.EINVAL, 'No --tree option given')

    set_pidns(pid, pid_idx)
    set_mntns(pid)

    criu_pid = os.fork()
    if criu_pid == 0:
        run_criu(sys.argv[1:])
    return _wait_for_process_status(pid)

Instead of passing criu_pid to the function _wait_for_process_status(PID) you passed PID of the dumping process
that is why criu-ns always returns 5 (-251)

rst0git added a commit to rst0git/criu that referenced this issue Feb 1, 2022
@rst0git
Copy link
Member

rst0git commented Feb 1, 2022

@PavloMykhailyshyn Thank you for pointing this out. I've opened a pull request with a fix: #1740

rst0git added a commit to rst0git/criu that referenced this issue Feb 1, 2022
rst0git added a commit to rst0git/criu that referenced this issue Feb 4, 2022
avagin pushed a commit that referenced this issue Feb 5, 2022
Fixes: #1739

Reported-by: @PavloMykhailyshyn
Signed-off-by: Radostin Stoyanov <[email protected]>
Yangfisher1 pushed a commit to Yangfisher1/criu that referenced this issue Feb 8, 2022
Yangfisher1 pushed a commit to Yangfisher1/criu that referenced this issue Feb 8, 2022
adrianreber pushed a commit to adrianreber/criu that referenced this issue Mar 21, 2022
azhadchenko pushed a commit to azhadchenko/criu that referenced this issue Mar 28, 2022
rst0git added a commit to rst0git/criu that referenced this issue Apr 5, 2022
rst0git added a commit to rst0git/criu that referenced this issue Apr 5, 2022
rst0git added a commit to rst0git/criu that referenced this issue Apr 5, 2022
avagin pushed a commit that referenced this issue Apr 29, 2022
Fixes: #1739

Reported-by: @PavloMykhailyshyn
Signed-off-by: Radostin Stoyanov <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants