[CRIU] Dumping a 32-bit process on aarch64 kernel
Andrei Vagin
avagin at virtuozzo.com
Fri Dec 15 22:11:34 MSK 2017
On Fri, Dec 08, 2017 at 08:13:44AM -0500, Rayson Ho wrote:
> On Fri, Dec 8, 2017 at 7:44 AM, Dmitry Safonov <0x7f454c46 at gmail.com> wrote:
> > Well, you can try.. quite sure no one did it before you.
> > But for production, you'll need 32-bit support in criu.
>
> Yup, for my use case I just need to checkpoint & restore 32-bit
> processes, so a 32-bit criu is good enough for me!
>
> However, I am still debugging the following failure -- as soon as criu
> hits the compel code, then it hits the error:
>
> (00.274647) ----------------------------------------
> (00.274650)
> (00.274653) Collecting fds (pid: 26575)
> (00.274656) ----------------------------------------
> (00.274678) Found 3 file descriptors
> (00.274681) ----------------------------------------
> (00.274692) Dump private signals of 26575
> (00.274702) Dump shared signals of 26575
> (00.274712) Parasite syscall_ip at 0x8000
> (00.274839) Error (compel/src/lib/infect.c:773): Can't rmap memfd for
> parasite blob
> (00.274890) Error (criu/cr-dump.c:1265): Can't infect (pid: 26575) with parasite
> (00.275005) Unlock network
> (00.275012) Unfreezing tasks into 1
> (00.275015) Unseizing 26575 into 1
> (00.275026) Error (criu/cr-dump.c:1654): Dumping FAILED.
>
> So the dumpee fails to execute the mmap that is injected by
> remote_mmap, and I am still trying to find an easier way to debug this
> than doing debug printfs inside the compel code... Kind of hard to
> debug the dumpee as ptrace can't be used (so no strace or gdb for
> me!).
you can try to use "perf trace", it is like strace.
And could you show a log with this patch:
diff --git a/compel/arch/aarch64/src/lib/infect.c b/compel/arch/aarch64/src/lib/infect.c
index 166ec2363..75d58aac7 100644
--- a/compel/arch/aarch64/src/lib/infect.c
+++ b/compel/arch/aarch64/src/lib/infect.c
@@ -119,8 +119,10 @@ void *remote_mmap(struct parasite_ctl *ctl,
err = compel_syscall(ctl, __NR_mmap, &map,
(unsigned long)addr, length, prot, flags, fd, offset);
- if (err < 0 || (long)map < 0)
+ if (err < 0 || (long)map < 0) {
+ pr_err("err = %d map = %lx\n", err, map);
map = 0;
+ }
return (void *)map;
}
>
> Rayson
>
> ==================================================
> Open Grid Scheduler - The Official Open Source Grid Engine
> http://gridscheduler.sourceforge.net/
> http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html
>
>
>
>
>
> > Imagine, you have 32-bit bash that calls some helpers
> > like sed/awk/tail/anything. That way you'll have this
> > tree of:
> >
> > 64-bit parent
> > |
> > bash (32-bit)
> > / \
> > sed (64) ...
> >
> > So, you might found that you anyway need 32-bit C/R
> > support in criu in case of such mixed-bitness trees.
> >
> >>
> >> BTW, thanks for the replies, Dmitry & Andrei!
> >>
> >
> > --
> > Dmitry
More information about the CRIU
mailing list