numa_node_of_cpu() returns warning when cpu_index > 79

Bug #1358835 reported by bugproxy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
numactl (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned
Utopic
Fix Released
High
Unassigned
Vivid
Fix Released
High
Unassigned

Bug Description

========================================================================
SRU Justification
1. Impact: numactl fails on systems with > 79 cpus
2. Test case: see 'steps to reproduce' below in the description.
3. Regression potential: this is a straight cherrypick of an upstream commit and should be safe. It changes core code so if there were regressions we can't say they'd be contained in any way, but they should not affect other packages
========================================================================

== Comment: #0 - TSAI-YANG JEA <email address hidden> - 2014-08-12 14:52:38 ==

---Problem Description---

In a ppc64le P8 node with SMT 8 mode, numa_node_of_cpu (80) returns following warning:

libnuma: Warning: /sys not mounted or invalid. Assuming one node: No such file or directory

---uname output---

Linux c656f2n01 3.13.0-30-generic #55-Ubuntu SMP Fri Jul 4 21:29:58 UTC 2014 ppc64le ppc64le ppc64le GNU/Linux

Machine Type = Tuletta P8 22L

---Debugger---

A debugger is not configured

---Steps to Reproduce---

 Problem can be created with following test case on a P8 LE machine with SMT=8.

#include <dlfcn.h>

#include <stdio.h>

int main(int argc, char *argv[])

{

    int dlopen_flags = RTLD_NOW|RTLD_GLOBAL;

    int(*node_of_cpu)(int cpu);

    int node = 0;

    int cpu;

    if(argc != 2) {

        printf("Usage: %s <cpu index>\n", argv[0]);

        return -1;

    }

    cpu = atoi(argv[1]);

    printf("%d\n", cpu);

    void *handle = dlopen("libnuma.so.1", dlopen_flags);

    if(handle) {

        node_of_cpu = (__typeof__(node_of_cpu))dlsym(handle, "numa_node_of_cpu");

        if(node_of_cpu) {

            node = node_of_cpu(cpu);

            printf("cpu %d belongs to node %d\n", cpu, node);

        }

    }

    return 0;

}

To compile the test: gcc test.c -ldl -o test

To run: ./test 80

Other information:

$ numactl -H

available: 4 nodes (0-1,16-17)

node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

node 0 size: 65115 MB

node 0 free: 2955 MB

node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79

node 1 size: 65473 MB

node 1 free: 3313 MB

node 16 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119

node 16 size: 65457 MB

node 16 free: 9310 MB

node 17 cpus: 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159

node 17 size: 65209 MB

node 17 free: 10999 MB

node distances:

node 0 1 16 17

  0: 10 20 40 40

  1: 20 10 40 40

 16: 40 40 10 20

 17: 40 40 20 10

Userspace tool common name: libnuma

The userspace tool has the following bit modes: 64-bit

== Comment: #4 - Kamalesh Babulal <email address hidden> - 2014-08-19 12:29:15 ==

numa_node_of_cpu

|

|_numa_node_to_cpus_v2:

                                                  Allocates and updates bitmask of /sys/devices/system/node/node%d/cpumap for node 0,1 and checks if the CPU is present/isset in the node bitmap of CPU0 and CPU1. As CPU 80 is present in node 16, it continues to allocate buffer for node 2 (basically till the configured nodes)

and tries to read /sys/devices/system/node/node2/cpumap which does not exist, so it assumes that the /sys was not mounted or some thing wrong with map file and sets all the cpus in the node2 as present.

That's the reason why your seeing the warning and wrong information about node. We should be skipping the nodes which are not set in the numa_nodes_ptr

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-114573 severity-medium targetmilestone-inin1404
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1358835/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → numactl (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2014-08-21 14:33 EDT-------
I have changed the source package to numactl in the Launchpad, kindly let us know if you require more information.

bugproxy (bugproxy)
tags: added: severity-high
removed: severity-medium
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2014-11-11 19:13 EDT-------
In the note below you state "Using last trusty ISO, I installed numactl package". Our support requires us to be at 14.04.1, I went out to the Ubuntu numactl page: https://launchpad.net/ubuntu/trusty/+package/numactl
It looks like the latest trusty numactl package is numactl 2.0.9~rc5-1ubuntu2 in ppc64el which we have on our system.
Can you elaborate on where the fix is available, if it is not in 14.04.1 can a patch be provided?
Thanks. Mark

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2014-11-18 15:49 EDT-------
We have found the issue - On a bare LE system, nodes are name 0, 1 , 16 , 17 and the library search for these nodes for the meminfo file however it search for nodes 0, 1, 2 for the cpumap file.
On a VM started by qemu, the nodes are named 0,1,2,3 and the problem doesn't occures.

In libnuma.c, function numa_node_of_cpu() doesn't use previously created list of valid nodes but use the entire array indexed with the maximum number of nodes available on the system.
Fix is to check node is valid before calling numa_node_to_cpus_v2_int() which check that the cpu belongs to that node.

$ diff -urN libnuma.c libnuma.c.new
--- libnuma.c 2014-11-18 10:44:32.563683894 -0500
+++ libnuma.c.new 2014-11-18 10:44:04.431683894 -0500
@@ -1403,10 +1403,12 @@
bmp = numa_bitmask_alloc(ncpus);
nnodes = numa_max_node();
for (node = 0; node <= nnodes; node++){
- numa_node_to_cpus_v2_int(node, bmp);
- if (numa_bitmask_isbitset(bmp, cpu)){
- ret = node;
- goto end;
+ if (_getbit(numa_nodes_ptr,node)) {
+ numa_node_to_cpus_v2_int(node, bmp);
+ if (numa_bitmask_isbitset(bmp, cpu)){
+ ret = node;
+ goto end;
+ }
}
}
ret = -1;

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2014-11-18 16:45 EDT-------
Sent patch to the community:

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2014-11-18 19:13 EDT-------
Hi,

Are you sure the fix is in the new libnuma.so.1?

I copied it to our node and re-tested it. I didn't see any difference. The test still failed.

root@c656f2n01:/usr/lib/powerpc64le-linux-gnu# sum libnuma.so.1 libnuma.so.1.orig
63898 51 libnuma.so.1 <---------- the fix libnuma.so.1
12964 51 libnuma.so.1.orig <----------- the original libnuma.so.1

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Changed in numactl (Ubuntu):
status: New → Confirmed
Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

tags: added: severity-critical
removed: severity-high
Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : Patch for libnuma.c

------- Comment (attachment only) From <email address hidden> 2014-12-08 16:02 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2014-12-08 18:16 EDT-------
Canonical, can we get this included in 15.04 also please?

tags: added: targetmilestone-inin14042
removed: targetmilestone-inin1404
Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2014-12-09 16:00 EDT-------
Patch sent to <email address hidden> as commit 0c422464b672cb731fb325454b60a48310e60eeb

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
Breno Leitão (breno-leitao) wrote :

Canonical,

Do you agree on this patch? We sent it upstream but didn't received any comment so far.

Changed in numactl (Ubuntu):
assignee: nobody → Taco Screen team (taco-screen-team)
Revision history for this message
bugproxy (bugproxy) wrote : new libnuma.so with fix

------- Comment on attachment From <email address hidden> 2014-11-18 15:55 EDT-------

Please have a test

Steve Langasek (vorlon)
Changed in numactl (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Serge Hallyn (serge-hallyn)
Changed in numactl (Ubuntu):
importance: Undecided → High
status: Confirmed → Incomplete
Changed in numactl (Ubuntu):
status: Incomplete → In Progress
Changed in numactl (Ubuntu):
status: In Progress → Fix Released
Steve Langasek (vorlon)
Changed in numactl (Ubuntu Trusty):
importance: Undecided → High
description: updated
Adam Conrad (adconrad)
Changed in numactl (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Adam Conrad (adconrad)
Changed in numactl (Ubuntu Utopic):
status: New → Fix Committed
tags: added: verification-done
removed: verification-needed
bugproxy (bugproxy)
tags: added: verification-done-trusty verification-done-vivid
removed: verification-done
Mathew Hodson (mhodson)
tags: added: verification-needed-utopic
Changed in numactl (Ubuntu Trusty):
status: Fix Committed → Fix Released
bugproxy (bugproxy)
tags: removed: verification-done-trusty verification-done-vivid verification-needed-utopic
Changed in numactl (Ubuntu Utopic):
status: Fix Committed → Fix Released
103 comments hidden view all 183 comments
Revision history for this message
Thierry FAUCK (thierry-j) wrote :

After moving to wily and using -proposed deb archive, I get:
ubuntu@fenix:~$ apt-cache policy libnuma1
libnuma1:
  Installed: 2.0.10-1ubuntu3
  Candidate: 2.0.10-1ubuntu3
  Version table:
 *** 2.0.10-1ubuntu3 0
        500 http://ports.ubuntu.com/ubuntu-ports/ wily/main ppc64el Packages
        100 /var/lib/dpkg/status
ubuntu@fenix:~$ cd NUMACTL/
ubuntu@fenix:~/NUMACTL$ ./test 80
80
cpu 80 belongs to node 16
L$ numactl -H
available: 4 nodes (0-1,16-17)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 32499 MB
node 0 free: 18926 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 32721 MB
node 1 free: 28857 MB
node 16 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
node 16 size: 32721 MB
node 16 free: 28814 MB
node 17 cpus: 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 17 size: 32577 MB
node 17 free: 31739 MB
node distances:
node 0 1 16 17
  0: 10 20 40 40
  1: 20 10 40 40
 16: 40 40 10 20
 17: 40 40 20 10

when under 15.04 I got:
$ ./test 80
80
libnuma: Warning: /sys not mounted or invalid. Assuming one node: No such file or directory
cpu 80 belongs to node 16

so it is validated on Wily

tags: added: targetmilestone-inin1510
removed: targetmilestone-inin14042
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla
Download full text (4.2 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

tags: added: targetmilestone-inin14042
removed: targetmilestone-inin1510
Changed in numactl (Ubuntu Trusty):
status: Fix Released → Confirmed
Changed in numactl (Ubuntu Utopic):
status: Fix Released → Confirmed
importance: Undecided → High
Changed in numactl (Ubuntu Vivid):
status: New → Confirmed
importance: Undecided → High
3 comments hidden view all 183 comments
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted numactl into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/numactl/2.0.9~rc5-1ubuntu3.14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in numactl (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in numactl (Ubuntu Utopic):
status: Confirmed → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello bugproxy, or anyone else affected,

Accepted numactl into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/numactl/2.0.9~rc5-1ubuntu3.14.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in numactl (Ubuntu Vivid):
status: Confirmed → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello bugproxy, or anyone else affected,

Accepted numactl into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/numactl/2.0.10-1ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

2 comments hidden view all 183 comments
Revision history for this message
Breno Leitão (breno-leitao) wrote :

Still waiting for the fix to be released in 14.04 LTS.

Revision history for this message
bugproxy (bugproxy) wrote :
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

tags: added: verification-done
removed: verification-needed
1 comments hidden view all 183 comments
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package numactl - 2.0.10-1ubuntu2.1

---------------
numactl (2.0.10-1ubuntu2.1) vivid-proposed; urgency=medium

  * d/p/libnuma-ppc64el-cpu-number-not-contiguous - patch from Thierry FAUCK
    (LP: #1358835)

 -- Serge Hallyn <email address hidden> Thu, 21 May 2015 15:15:21 -0700

Changed in numactl (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package numactl - 2.0.9~rc5-1ubuntu3.14.10.1

---------------
numactl (2.0.9~rc5-1ubuntu3.14.10.1) utopic-proposed; urgency=medium

  * d/p/libnuma-ppc64el-cpu-number-not-contiguous - patch from Thierry FAUCK
    (LP: #1358835)
  * d/patches/from-git-6a7c2cf3-fix-uninitialised-mask.patch: Fix libnuma SEGV
    due to uninitialised mask. (LP: #1441388)
  * d/rules: include simple-patchsys.mk to get patches applied

 -- Serge Hallyn <email address hidden> Thu, 21 May 2015 15:30:52 -0700

Changed in numactl (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package numactl - 2.0.9~rc5-1ubuntu3.14.04.1

---------------
numactl (2.0.9~rc5-1ubuntu3.14.04.1) trusty-proposed; urgency=medium

  * d/p/libnuma-ppc64el-cpu-number-not-contiguous - patch from Thierry FAUCK
    (LP: #1358835)
  * d/patches/from-git-6a7c2cf3-fix-uninitialised-mask.patch: Fix libnuma SEGV
    due to uninitialised mask. (LP: #1441388)
  * d/rules: include simple-patchsys.mk to get patches applied

 -- Serge Hallyn <email address hidden> Thu, 21 May 2015 15:43:11 -0700

Changed in numactl (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

4 comments hidden view all 183 comments
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

> Has this patch been accepted by maintainers? The Canonical status is fix

By "this patch" d you mean:

 libnuma.so On ppc64el, cpu number are not contigous

?

> released. Is there a fix that should be pulled and tested?

As far as I can tell this patch has never been sent to the libnuma
mailing list (I had assumed it had been). It is not in the upstream git
tree. Were you planning on sending it?

The bug is 'Fix Released' because it is fixed in our packages.

If you have no intention of sending the patch to the mailing list please
let us know, and I'll mail it.

*Please* reply, if possible, with a regular email to
<email address hidden> .

Revision history for this message
bugproxy (bugproxy) wrote :
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

1 comments hidden view all 183 comments
Revision history for this message
bugproxy (bugproxy) wrote : libnuma.so.1 sum 55709

------- Comment (attachment only) From <email address hidden> 2014-11-19 14:45 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : Patch for libnuma.c

------- Comment (attachment only) From <email address hidden> 2014-12-08 16:02 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

2 comments hidden view all 183 comments
Revision history for this message
bugproxy (bugproxy) wrote : Patch for libnuma.c

------- Comment (attachment only) From <email address hidden> 2014-12-08 16:02 EDT-------

Changed in numactl (Ubuntu):
assignee: Serge Hallyn (serge-hallyn) → nobody
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

2 comments hidden view all 183 comments
Revision history for this message
Thierry FAUCK (thierry-j) wrote :
Revision history for this message
bugproxy (bugproxy) wrote :
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

The patch in our package has the upstream patch except for one apparent
error - it checks for

 if (f)

instead of

 if (numa_bitmask_isbitset(numa_nodes_ptr, node)) {

I think it will be easiest to open a new bug to fix that. I'll note the new bug# here.

Revision history for this message
bugproxy (bugproxy) wrote :
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :
Revision history for this message
bugproxy (bugproxy) wrote :
Download full text (4.4 KiB)

------- Comment From <email address hidden> 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu@vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu@vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node 0 1 2 3
0: 10 40 40 40
1: 40 10 40 40
2: 40 40 10 40
3: 40 40 40 10
ubuntu@vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From <email address hidden> 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3 and numactl 2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry Fauck worked but it was not used in 14.04.02

------- Comment From <email address hidden> 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From <email address hidden> 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <email address hidden>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <email address hidden>

modified: libnuma.c
---
libnuma.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
- numa_warn(W_nosysfs2,
- "/sys not mounted or invalid. Assuming one node: %s",
+ if (f) {
+ numa_warn(W_nosysfs2,
+ "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
- numa_warn(W_nosysfs2,
- "(cannot open or correctly pars...

Read more...

Displaying first 40 and last 40 comments. View all 183 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.