JDK-8181055 : PPC64: "mbind: Invalid argument" still seen after 8175813
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: ppc
  • Submitted: 2017-05-24
  • Updated: 2020-06-10
  • Resolved: 2017-06-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8
10 b21Fixed 8u162Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
After back porting 8175813 to openjdk 1.8.0, "mbind: Invalid argument" message still can be seen on one of PPC64 machines.

 The problem is that, the machine only has one node, and numa_interleave_memory() apparently does not like to be called when it is the case.

[zgu@ibm-p730-03-lp1 hotspot]$ lscpu
Architecture:          ppc64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Big Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    4
Core(s) per socket:    1
Socket(s):             2
NUMA node(s):          2
Model:                 2.1 (pvr 003f 0201)
Model name:            POWER7 (architected), altivec supported
L1d cache:             32K
L1i cache:             32K
NUMA node0 CPU(s):     0-7
NUMA node1 CPU(s):     

Following patch fixes the problem:

diff -r 56d2166223f6 src/os/linux/vm/os_linux.cpp
--- a/src/os/linux/vm/os_linux.cpp	Wed May 24 12:42:44 2017 +0200
+++ b/src/os/linux/vm/os_linux.cpp	Wed May 24 19:28:49 2017 -0400
@@ -2728,7 +2728,9 @@
 }
 
 void os::numa_make_global(char *addr, size_t bytes) {
-  Linux::numa_interleave_memory(addr, bytes);
+  if (numa_get_groups_num() > 1) {
+    Linux::numa_interleave_memory(addr, bytes);
+  }
 }
 
 // Define for numa_set_bind_policy(int). Setting the argument to 0 will set the




Comments
http://mail.openjdk.java.net/pipermail/hotspot-dev/2017-May/027000.html
31-05-2017

[zgu@ibm-p730-03-lp1 bin]$ numactl -H available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 6 7 node 0 size: 0 MB node 0 free: 0 MB node 1 cpus: node 1 size: 7680 MB node 1 free: 1896 MB node distances: node 0 1 0: 10 40 1: 40 10
26-05-2017

Hi Zhengyu, Could you please also provide the output of 'numactl -H' on the machine were the issue in question occurs? Thanks!
26-05-2017

The alternative, we can disable NUMA if there is only one configured node discovered. I am not sure the implications: 1 NUMA node = UMA?
26-05-2017