[CRIU] Questions in CRIU restore mechanism.
Chanho Park
chanho61.park at samsusng.com
Mon May 6 08:48:35 EDT 2013
> > On 03/29/2013 03:26 PM, Chanho Park wrote:
> > > Hi Alexander,
> > > Hmm, our platform/library/application may be compiled in thumb mode.
> > That's OK. The problem is that the parasite and restorer blobs
> > (pie/parasite.built-in.bin.o and pie/restorer.built-in.bin.o) may be
> > compiled in the Thumb mode that is unacceptable.
> >
> > My gcc -v output is:
> >
> > Using built-in specs.
> > COLLECT_GCC=gcc
> > COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper
> > Target: arm-linux-gnueabi
> > Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-
> 11'
> > --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
> > --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
> > --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-
> > system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-
> > threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
> > --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
> > -- enable-libstdcxx-debug --enable-libstdcxx-time=yes
> > --enable-gnu-unique- object --enable-plugin --enable-objc-gc
> > --disable-sjlj-exceptions --with- arch=armv4t --with-float=soft
> > --enable-checking=release --build=arm-linux- gnueabi --host=arm-linux-
> gnueabi --target=arm-linux-gnueabi Thread model:
> > posix gcc version 4.6.3 (Debian 4.6.3-11)
> >
> > My GCC compiles the parasite and restorer blobs in the ARM mode.
> > Please make sure that your GCC does the same.
>
> My GCC compiler(gcc-arm-linux-gnueabihf-4.7) always compiled with -with-
> mode=thumb.
> So I've changed my gcc compiler to gcc-arm-linux-gnueabi(4.6.3).
> Since then, I've successfully dumped the test program even if thumb mode.
> Thanks for pointing out gcc options :)
Hi Alexander,
I found a problem when dumping a thumb mode application.
As I told previously, the crtools always compiled with arm mode.
However, out application is built with thumb2 mode for size and efficiency.
When I tried to call exec operation of the test application, I got below error message.
(00.005342) Error (parasite-syscall.c:150): Task is still running (pid: 5874)
(00.005456) Error (cr-exec.c:121): Can't execute syscall remotely
(00.005487) Error (parasite-syscall.c:619): Can't restore syscall blob (pid: 5874)
(00.005510) Error (parasite-syscall.c:624): Can't restore registers (pid: 5874)
./exec_run.sh: line 35: 5874 Segmentation fault (core dumped) setsid ./${PROG}
The program was killed with SEGSEV signal.
I think some information is missing in the parasite code.
I attached my test application and script.
When I built the test.c with marm option, the result was good.
$ arm-linux-gnueabi-gcc -o test test.c -static -marm
However build with thumb mode, always failed.
$ arm-linux-gnueabi-gcc -o test test.c -static -mthumb
IMHO we need more works for supporting the thumb-mode application.
Can you run the test with attached file?
Thanks
Best regards,
Chanho Park
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exec_run.sh
Type: application/octet-stream
Size: 502 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130506/35f08456/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: application/octet-stream
Size: 84 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130506/35f08456/attachment-0001.obj>
More information about the CRIU
mailing list