[CRIU] criu check --extra output and dump failure

Brinkmann, Harald Harald.Brinkmann at bst-international.com
Wed Apr 12 04:46:26 PDT 2017


Hi Dmitry,

On Tue, 2017-04-11 at 18:47 +0300, Dmitry Safonov wrote:
> 2017-04-11 16:16 GMT+03:00 Brinkmann, Harald
> <Harald.Brinkmann at bst-international.com>:
> > On Tue, 2017-04-11 at 14:51 +0300, Dmitry Safonov wrote:
> >> 2017-04-11 14:43 GMT+03:00 Dmitry Safonov <0x7f454c46 at gmail.com>:
> >> > 2017-04-11 11:56 GMT+03:00 Brinkmann, Harald
> >> > <Harald.Brinkmann at bst-international.com>:
> >> >> On Mon, 2017-04-10 at 17:07 +0300, Dmitry Safonov wrote:
> >> >>> 2017-04-10 16:59 GMT+03:00 Dmitry Safonov <0x7f454c46 at gmail.com>:
> >> >>> > 2017-04-07 16:23 GMT+03:00 Dmitry Safonov <0x7f454c46 at gmail.com>:
> >> >>> >> 2017-04-07 16:14 GMT+03:00 Brinkmann, Harald
> >> >>> >> <Harald.Brinkmann at bst-international.com>:
> >> >>> >>>> could you check it on the last release (which is 2.12.1)?
> >> >>> >>>> I assume that arm port was broken during last changes.
> >> >>> >>>> We'll try to check and fix them till v3.0 release.
> >> >>> >>>
> >> >>> >>> Yes, it is 2.12.1.
> >> >>> >>>
> >> >>> >>> Is there a "last known good" ARM-version I might try to go back to?
> >> >>> >>
> >> >>> >> Ok, try 2.11, please.
> >> >>> >
> >> >>> > Hi Harald,
> >> >>> >
> >> >>> > Have you managed your problems with CRIU on ARM32?
> >> >>> > Because I just tried it on RPI2 board with 4.11.0-rc5 kernel
> >> >>> > and it works. Yes, there are some problems with tests, etc,
> >> >>> > but simple setsid loop C/R normally, as many tests.
> >> >>> >
> >> >>> > Please, if you still have problems, provide info about your
> >> >>> > environment: gcc, ld versions, as this looks to depend on it.
> >> >>> >
> >> >>> > Will you be able to recompile criu and run some commands?
> >> >>>
> >> >>> More info about my env, JFI:
> >> >>>
> >> >>> [criu]# gcc --version
> >> >>> gcc (GCC) 6.3.1 20170306
> >> >>> Copyright (C) 2016 Free Software Foundation, Inc.
> >> >>> This is free software; see the source for copying conditions.  There is NO
> >> >>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> >> >>> [criu]# ld --version
> >> >>> GNU ld (GNU Binutils) 2.28.0.20170322
> >> >>> Copyright (C) 2017 Free Software Foundation, Inc.
> >> >>> This program is free software; you may redistribute it under the terms of
> >> >>> the GNU General Public License version 3 or (at your option) a later version.
> >> >>> This program has absolutely no warranty.
> >> >>>
> >> >>> I've checked criu-dev, master and v2.12.1 tag.
> >> >>
> >> >> I have been away for a couple of days, so I didn't yet have a chance to
> >> >> do further tests.
> >> >>
> >> >> I am on a custom imx6q-based board. We do full cross-compilation from an
> >> >> x86-based Linux system. Our versions are quite old compared to yours:
> >> >>
> >> >>> platform-imx6/selected_toolchain/arm-v7a-linux-gnueabihf-gcc --version
> >> >> arm-v7a-linux-gnueabihf-gcc (OSELAS.Toolchain-2014.12.2) 4.9.2
> >> >> Copyright (C) 2014 Free Software Foundation, Inc.
> >> >> This is free software; see the source for copying conditions.  There is NO
> >> >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> >> >>
> >> >>> platform-imx6/selected_toolchain/arm-v7a-linux-gnueabihf-ld --version
> >> >> GNU ld (GNU Binutils) 2.24
> >> >> Copyright 2013 Free Software Foundation, Inc.
> >> >> This program is free software; you may redistribute it under the terms of
> >> >> the GNU General Public License version 3 or (at your option) a later version.
> >> >> This program has absolutely no warranty.
> >
> > This is from my objdump:
> >
> > 00000000 <__export_parasite_head_start>:
> >    0:   e24f2008        sub     r2, pc, #8
> >    4:   e28f0018        add     r0, pc, #24
> >    8:   e5900000        ldr     r0, [r0]
> >    c:   e28f100c        add     r1, pc, #12
> >   10:   e5911000        ldr     r1, [r1]
> >   14:   e0811002        add     r1, r1, r2
> >   18:   ebfffffe        bl      15a4 <parasite_service>
> >   1c:   e7f001f0        .word   0xe7f001f0
> >
> > And it looks like the jump to parasite_service() is broken as you first
> > suspected. Maybe this does give a signal 11 after all - as I understand
> > it is sort of an illegal address after all.
>
> Looks like 11 was generated by
> >   1c:   e7f001f0        .word   0xe7f001f0
> according to
> > [  154.088060] pc : [<76e78680>]    lr : [<76e7701c>]    psr: 20080010

Forgive me for being a bit slow today, but how did you work that out?

> So, that's cool: we know the reason right here.
> Is your toolchain available to download somewhere?
>
> To fix this it's needed to find flags for ld which will produce relocated
> pie file for your toolchain.

The toolchain is essentially just the well known gcc and ld compiled to
generate ARM code by default, but there are a few patches.

To build this toolchain you need to download this:

http://public.pengutronix.de/software/ptxdist/ptxdist-2014.12.0.tar.bz2

http://public.pengutronix.de/oselas/toolchain/OSELAS.Toolchain-2014.12.2.tar.bz2

Those are our versions, not the latest ones.

Install ptxdist in the usual manner (./configure && make && make
install). This will install a set of scripts and documentation
under /usr/local/lib/ptxdist-2014.12.0 plus links in /usr/local/bin and
a bash completion script.

Extract the toolchain archive and cd into the base directory.

In file
ptxconfigs/arm-v7a-linux-gnueabihf_gcc-4.9.2_glibc-2.20_binutils-2.24_kernel-3.16-sanitized.ptxconfig replace

# PTXCONF_CROSS_ELF2FLT is not set

which is line 59 with

PTXCONF_CROSS_ELF2FLT=y
PTXCONF_CROSS_ELF2FLT_VERSION="20110404-g40f0d17"
PTXCONF_CROSS_ELF2FLT_MD5="29daec85dd21b8b308f45c53da510a20"

Then you type

ptxdist menu

choose Select Software Platform and go to the file you just modified.
Then exit.

And then simply type

ptxdist go

This will install the toolchain under /opt and will complain right at
the start before doing anything if it cannot write there.

This *will* take a while. Most particularly it will download the actual
software source packages (gcc, glibc, binutils, etc.), but once the
download is successful, it will work from the saved copy if you ever
need to rebuild or change something. If you already have the packages
available offline and don't want to download them again, you can put
them into subdirectory 'src' of the extracted toolchain base directory,
otherwise that is where they will end up automatically anyway.


Hope this helps

Harald






More information about the CRIU mailing list