qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Manuel Hohmann <mhohmann@physnet.uni-hamburg.de>
Cc: imammedo@redhat.com, qemu-devel@nongnu.org
Subject: Re: Error "cannot bind memory to host NUMA nodes: Operation not permitted" running inside docker
Date: Thu, 30 Apr 2020 09:52:15 +0100	[thread overview]
Message-ID: <20200430085215.GD2084570@redhat.com> (raw)
In-Reply-To: <76d8eb61-e89e-0465-974b-6901a5fb848e@physnet.uni-hamburg.de>

On Wed, Apr 29, 2020 at 11:40:32PM +0300, Manuel Hohmann wrote:
> Hi,
> 
> I encountered the following error message on the QEMU 5.0.0 release, compiled and run inside a docker image:
> 
> "cannot bind memory to host NUMA nodes: Operation not permitted"

The error is reporting that mbind() failed.

mbind() man page says it gives EPERM when

  "The  flags argument included the MPOL_MF_MOVE_ALL flag and
   the caller does not have the CAP_SYS_NICE privilege."

QEMU always uses the MPOL_MF_MOVE flag though.

Looking at the kernel source,  mbind can also return EPERM if the
process is not permitted to access the requested nodes which seems
more plausible as a cause.

I guess the container the bound to some sub-set of nodes and QEMU is
trying to place the VM on different nodes that the container isn't
allowed to accesss.

> 
> The QEMU command line to reproduce this behavior (it happens also on -x86_64, -arm, -aarch64 with similar command line):
> 
> qemu-system-i386 -m 64 -M pc -smp 1 -display none -monitor stdio -drive file=mp-acpi/NOS.iso,media=cdrom,id=d -boot order=d -d cpu_reset

There is no reference to host mem backend or NUMA binding, so I'm
puzzled why QEMU would be doing an mbind() at all. That seems bad.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2020-04-30  8:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 20:40 Error "cannot bind memory to host NUMA nodes: Operation not permitted" running inside docker Manuel Hohmann
2020-04-30  8:52 ` Daniel P. Berrangé [this message]
2020-04-30 11:45   ` Igor Mammedov
2020-04-30 11:49     ` Daniel P. Berrangé
  -- strict thread matches above, loose matches on Subject: below --
2020-04-29 19:09 Manuel Hohmann

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=20200430085215.GD2084570@redhat.com \
    --to=berrange@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mhohmann@physnet.uni-hamburg.de \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).