#3 fix sparse node ids
Opened by paelzer. Modified
paelzer/numad fix-sparse-node-ids  into  master

Download 3.patch

CPU-ids can be sparse due to disabling a subset of CPUs.
On ppc64le this even will make the node_ids sparse, this is actually pretty
common on ppc64 when SMT is disabled.

Numad has the assumption of cpu/node-ids always being linear and due to that
accesses the 'node' array out of bounds. That triggers crashes like the
following:

  Thread 1 "numad" received signal SIGSEGV, Segmentation fault.
  #0 0x00000fb6cd2779f4 in bind_process_and_migrate_memory (p=0xfb6fc1e0f70)
    at numad.c:998
  #1 0x00000fb6cd27d148 in manage_loads () at numad.c:2225
  #2 0x00000fb6cd2734dc in main (argc=<optimized out>, argv=<optimized out>)
    at numad.c:2654

Instead of directly indexing with node_id we need to detect which array
element has the matching node_id and use that.

Signed-off-by: Christian Ehrhardt christian.ehrhardt@canonical.com

Much more details, repro steps and the debugging path that was used can be found at the launchpad bug 1832915.

Metadata