[CRIU] pstree C/R problems
Huang Qiang
h.huangqiang at huawei.com
Thu Sep 27 03:59:49 EDT 2012
HI:
I use a simple code to test CRIU, when it runs, the ids seem like this:
UID PID PPID PGID SID C STIME TTY TIME CMD
root 11988 9904 11988 11988 0 10:37 ? 00:00:00 sshd: root at pts/3
root 11996 11988 11996 11996 0 10:37 pts/3 00:00:00 -bash
root 12056 11996 12056 11996 0 10:38 pts/3 00:00:00 ./multitask_simple
root 12057 12056 12056 11996 0 10:38 pts/3 00:00:00 ./multitask_simple
then I run:
# ./crtools dump -D /home/hq/image -t 12056
it is successful.
then restore it:
# ./crtools restore -D /home/hq/image -t 12056
I got error:
12057: Error (cr-restore.c:677): Requested sid 11996 doesn't match inherited 11952
12056: Error (cr-restore.c:633): 12057 exited, status=1
Error (cr-restore.c:911): Someone can't be restored
I read the pstree C/R code, and found that it didn't handle the situation that
the root task is not the session leader. But if there is only one task in the tree,
C/R can successful, otherwise, will face the error.
Is this a bug? Or is CRIU has a limitation right now for the root task?
And what's your plan for this situation?
I think we may also need a helper for root task, of course have other things to consider.
BTW, the born_sid mechanism seems didn't do any really work for rebuild the pstree,
but for the check. We may neither support the tree like this:
pid = 5
sid = 5
/
/
pid = 7
sid = 6
/
/
pid = 9
sid = 8
Right?
Since I didn't find any scheme for the the problems I mentioned above in the TODO
list, if you guys have any plan or thoughts, could you share them here?
And maybe I can help to do this work.
regards.
Huang Qiang
More information about the CRIU
mailing list