public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: <daniel.sangorrin@toshiba.co.jp>
To: <ben.hutchings@codethink.co.uk>, <henning.schild@siemens.com>,
	<jan.kiszka@siemens.com>
Cc: <kas-devel@googlegroups.com>, <isar-users@googlegroups.com>,
	<cip-dev@lists.cip-project.org>
Subject: RE: [cip-dev] isar error log
Date: Tue, 16 Apr 2019 02:47:03 +0000	[thread overview]
Message-ID: <OSAPR01MB37635280DF780D10C67B37EBD0240@OSAPR01MB3763.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <1555070397.3557.19.camel@codethink.co.uk>

Henning, Ben, Jan: thanks for your answers.

Actually, in my PC (Ubuntu 16.04.6) binfmt_misc is mounted, both outside and inside the container.
# Henning: not sure why yours wasn't but it could be because I have also qemu-user-static installed on the host OS or because of something I installed in the past.

I tried to dig a bit deeper.

- The error:
update-binfmts: warning: unable to close /proc/sys/fs/binfmt_misc/register: Invalid argument
- This error appears when /kas/docker-entrypoint calls "dpkg-configure qemu-user-static"
- I added a set -x to qemu-user-static's postinstall script (/var/lib/dpkg/info/qemu-user-static.postinst) and the error comes from this line:
update-binfmts --package qemu-user-static --install qemu-aarch64 ... --credential yes --fix-binary yes
- I tried to run update-binfmts (with the same arguments) and I could reproduce the problem
- If I remove the "--fix-binary yes" part and execute it twice, then the first time fails with the same error but the second time it succeeds
- I straced update-binfmts with --fix-binary yes
  - it opens /proc/sys/fs/binfmt_misc/register
  - writes :qemu-aarch64:M:0:x7fx45x4cx46x0"
  - returns EINVAL

And then I found the real reason of the problem:
- The qemu-user-static on the host side was conflicting with the one inside docker.
- If I remove qemu-user-static from the host then, it works.

Thanks,
Daniel

> -----Original Message-----
> From: cip-dev-bounces@lists.cip-project.org <cip-dev-bounces@lists.cip-
> project.org> On Behalf Of Ben Hutchings
> Sent: Friday, April 12, 2019 9:00 PM
> To: Henning Schild <henning.schild@siemens.com>; [ext] Jan Kiszka
> <jan.kiszka@siemens.com>
> Cc: kas-devel@googlegroups.com; isar-users@googlegroups.com; cip-
> dev@lists.cip-project.org
> Subject: Re: [cip-dev] isar error log
> 
> On Fri, 2019-04-12 at 13:37 +0200, Henning Schild wrote:
> [...]
> > Just had a look at a ubuntu 16.04. It does support the fs but it is
> > not mounted. So a pseudo-code patch for the docker entry could be:
> >
> > if not mounted
> >  if grep binfmt_misc /proc/filesystems
> >   mount
> >  else
> >   echo "Get a real and recent distro"
> >  fi
> > fi
> 
> Actual code should be something like:
> 
> if ! mountpoint -q /proc/sys/fs/binfmt_misc \
>    && ! mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc; then
>     echo >&2 "E: Unable to mount binfmt_misc"
>     exit 1
> fi
> 
> Ben.
> 
> --
> Ben Hutchings, Software Developer                         Codethink Ltd
> https://www.codethink.co.uk/                 Dale House, 35 Dale Street
>                                      Manchester, M1 2HF, United Kingdom
> _______________________________________________
> cip-dev mailing list
> cip-dev@lists.cip-project.org
> https://lists.cip-project.org/mailman/listinfo/cip-dev

  reply	other threads:[~2019-04-16  2:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02  3:17 daniel.sangorrin
2019-04-02  6:13 ` Jan Kiszka
2019-04-03  0:56   ` daniel.sangorrin
2019-04-03  5:55     ` Jan Kiszka
2019-04-11  9:08       ` daniel.sangorrin
2019-04-11  9:15         ` Jan Kiszka
2019-04-11 10:05           ` daniel.sangorrin
2019-04-11 10:13             ` daniel.sangorrin
2019-04-11 12:42               ` Jan Kiszka
2019-04-12 11:37                 ` Henning Schild
2019-04-12 11:59                   ` [cip-dev] " Ben Hutchings
2019-04-16  2:47                     ` daniel.sangorrin [this message]
2019-04-16  3:04                       ` daniel.sangorrin
2019-04-03 13:53     ` Ben Hutchings
2019-04-05  7:44       ` daniel.sangorrin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OSAPR01MB37635280DF780D10C67B37EBD0240@OSAPR01MB3763.jpnprd01.prod.outlook.com \
    --to=daniel.sangorrin@toshiba.co.jp \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=cip-dev@lists.cip-project.org \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kas-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox