I was getting the error:
map size mismatch; abort
when running the daemon-conf tests.
I traced it to two places in which we were passing a parameter as a
number of bits to numa_node_to_cpus which expects a number of bytes (see
numa_node_to_cpus_compat in numa.h in the numactl source).
The attached patch fixes the problem.
Dave
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index e6c378f..7019c14 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -324,7 +324,7 @@ qemudCapsInitNUMA(virCapsPtr caps)
for (n = 0 ; n <= numa_max_node() ; n++) {
- if (numa_node_to_cpus(n, mask, MAX_CPUS_MASK_LEN) < 0)
+ if (numa_node_to_cpus(n, mask, MAX_CPUS_MASK_LEN / 8) < 0)
goto cleanup;
for (ncpus = 0, i = 0 ; i < MAX_CPUS ; i++)
diff --git a/src/uml_conf.c b/src/uml_conf.c
index 7eb630d..3659c6b 100644
--- a/src/uml_conf.c
+++ b/src/uml_conf.c
@@ -80,7 +80,7 @@ umlCapsInitNUMA(virCapsPtr caps)
for (n = 0 ; n <= numa_max_node() ; n++) {
- if (numa_node_to_cpus(n, mask, MAX_CPUS_MASK_LEN) < 0)
+ if (numa_node_to_cpus(n, mask, MAX_CPUS_MASK_LEN / 8) < 0)
goto cleanup;
for (ncpus = 0, i = 0 ; i < MAX_CPUS ; i++)
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list