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

Process tree output looks not totally correct. #70

Closed
adrianreber opened this issue Jun 16, 2023 · 7 comments · Fixed by #71
Closed

Process tree output looks not totally correct. #70

adrianreber opened this issue Jun 16, 2023 · 7 comments · Fixed by #71

Comments

@adrianreber
Copy link
Member

adrianreber commented Jun 16, 2023

Using --ps-tree on a container checkpoint I get following output:

counter
└── [1]  bash
    ├── [7]  bash
    ├── [7]  counter.py
    ├── [8]  bash
    └── [8]  tee

That doesn't look like what I expected. I would expect something like:

counter
└── [1]  bash
    ├── [7]  counter.py
    └── [8]  tee

@snprajwal PTAL

@snprajwal
Copy link
Member

Can you share the process you used for this? This is slightly weird

@adrianreber
Copy link
Member Author

$ skopeo copy docker://quay.io/adrianreber/checkpoint-test:tag43 oci:/tmp/test1
$ checkpointctl show /tmp/test1/blobs/sha256/65de3f48dccf3b3adde6221a90eb81f322d4367745cb3585aa7da917140415f3  --ps-tree
Process tree

counter
└── [1]  bash
    ├── [8]  bash
    ├── [8]  tee
    ├── [7]  bash
    └── [7]  counter.py

@rst0git
Copy link
Member

rst0git commented Jun 16, 2023

@adrianreber Could you also show the output of crit show pstree.img?

@adrianreber
Copy link
Member Author

{
    "magic": "PSTREE",
    "entries": [
        {
            "pid": 1,
            "ppid": 0,
            "pgid": 1,
            "sid": 1,
            "threads": [
                1
            ]
        },
        {
            "pid": 7,
            "ppid": 1,
            "pgid": 1,
            "sid": 1,
            "threads": [
                7
            ]
        },
        {
            "pid": 8,
            "ppid": 1,
            "pgid": 1,
            "sid": 1,
            "threads": [
                8
            ]
        }
    ]
}

@snprajwal
Copy link
Member

It would be great if you could also show the output of crit x . ps, ideally with the CRIT binary from go-criu. Since this is what we're using the fetch the info, it will help identify if the issue exists in go-criu or in checkpointctl.

@adrianreber
Copy link
Member Author

crit/bin/crit x /tmp/forensic/checkpoint/ ps
{
    "pId": 1,
    "pgId": 1,
    "sId": 1,
    "comm": "bash",
    "children": [
        {
            "pId": 7,
            "pgId": 1,
            "sId": 1,
            "comm": "counter.py"
        },
        {
            "pId": 8,
            "pgId": 1,
            "sId": 1,
            "comm": "tee"
        }
    ]
}

@snprajwal
Copy link
Member

Great, so the issue is not with go-criu. I must be doing something wrong while building the tree, let me check

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.

3 participants