[CRIU] [PATCHv2 0/9] Compatible (mostly) fixes
Andrew Vagin
avagin at virtuozzo.com
Thu Aug 4 18:47:15 PDT 2016
On Thu, Aug 04, 2016 at 09:48:55PM +0300, Cyrill Gorcunov wrote:
> On Thu, Aug 04, 2016 at 06:07:40PM +0300, Dmitry Safonov wrote:
> > v2: rebase on criu-dev with autofixed conflict by git
> >
> > There is three patches for issues I've found while was introducing
> > CONFIG_COMPAT compile&make option, that do nothing with compat:
> > build/nmk: simplify try-cc and return true/false
> > make: drop check-build-packages - we can use try-cc now
> > make: propagate config DEFINES in CFLAGS
> >
> > For other patches: first four -- some fixes for compatible vdso
> > on 3.X kernels (found while testing criu on vzkernel with compat
> > patches set). Mostly -- there are different symbols in vdso for
> > compat & native tasks, the sizes of vdso blob differ from native
> > to compat and it's hard to make mremap() for vdso vma working --
> > so use arch_prctl() API in the case when mremap() does not work.
> >
> > The last two patches in the set introduce CONFIG_COMPAT option
> > which make gcc-multilib & glibc6-i686 *optional* dependencies
> > for building CRIU.
[root at fc24 criu]# python test/zdtm.py run -t zdtm/static/env00
=== Run 1/1 ================
========================== Run zdtm/static/env00 in h ==========================
Start test
./env00 --pidfile=env00.pid --outfile=env00.out --envname=ENV_00_TEST
Run criu dump
Run criu restore
=[log]=> dump/zdtm/static/env00/24/1/restore.log
------------------------ grep Error ------------------------
(00.086424) Error (criu/cr-restore.c:1136): 24 killed by signal 11: Segmentation fault
(00.086458) Error (criu/cr-restore.c:2018): Restoring FAILED.
------------------------ ERROR OVER ------------------------
################# Test zdtm/static/env00 FAIL at CRIU restore ##################
##################################### FAIL #####################################
[root at fc24 criu]# tail test/dump/zdtm/static/env00/24/1/restore.log
pie: 24: vdso: nbucket 0x3 nchain 0xb bucket 0x7fff77544128 chain 0x7f>
pie: 24: ff77544134
pie: 24: vdso: image [vdso] 0x7fff77544000-0x7fff77546000 [vvar] 0x7ff>
pie: 24: f77541000-0x7fff77544000
pie: 24: vdso: Runtime vdso/vvar matches dumpee, remap inplace
pie: 24: vdso: Remap dumpee 0x26000 -> 0x7fff77541000
pie: 24: vdso: Remap dumpee 0x29000 -> 0x7fff77544000
pie: 24: Restoring scheduler params 0.0.0
(00.086424) Error (criu/cr-restore.c:1136): 24 killed by signal 11: Segmentation fault
(00.086458) Error (criu/cr-restore.c:2018): Restoring FAILED.
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x0000000000011ca5 in ?? ()
#2 0x0000000000000000 in ?? ()
(gdb) disassemble 0x0000000000011c80,0x0000000000011cbf
Dump of assembler code from 0x11c80 to 0x11cbf:
0x0000000000011c80: jnp 0x11c8a
0x0000000000011c82: cmp $0xffffffff,%edi
0x0000000000011c85: je 0x11c8c
0x0000000000011c87: callq 0x1306c
0x0000000000011c8c: test %r13,%r13
0x0000000000011c8f: jne 0x115e8
0x0000000000011c95: mov (%rbx),%rdi
0x0000000000011c98: mov (%rdi),%rax
0x0000000000011c9b: mov %rax,0x8(%rsp)
0x0000000000011ca0: callq 0x100e0
0x0000000000011ca5: test %eax,%eax
0x0000000000011ca7: mov %eax,%r13d
0x0000000000011caa: jne 0x115e8
0x0000000000011cb0: cmpl $0x1,0x18(%rbx)
0x0000000000011cb4: jle 0x12459
0x0000000000011cba: mov 0x3b4(%rbx),%edi
/root/git/criu/criu/pie/restorer.c:1372
1c20: e8 3b e4 ff ff callq 60 <restore_thread_common>
1c25: 85 c0 test %eax,%eax
1c27: 41 89 c5 mov %eax,%r13d
1c2a: 0f 85 38 f9 ff ff jne 1568 <__export_restore_task+0x3c8>
(gdb) i r
rax 0x0 0
rbx 0x1b000 110592
rcx 0x13045 77893
rdx 0x1fec0 130752
rsi 0x0 0
rdi 0x21678 136824
rbp 0x21000 0x21000
rsp 0x1fee8 0x1fee8
r8 0x0 0
r9 0x0 0
r10 0x13045 77893
r11 0x246 582
r12 0x21240 135744
r13 0x0 0
r14 0x400000 4194304
r15 0x130 304
rip 0x0 0x0
eflags 0x10212 [ AF IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x6b 107
>
> Reviewed-by: Cyrill Gorcunov <gorcunov at openvz.org>
>
> OK, lets see how it flows.
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list