This is an automated email from the git hooks/post-receive script.
firstyear pushed a commit to branch 389-ds-base-1.3.6
in repository 389-ds-base.
commit eaede003824690dd72ebc0daf9e6f063a0993e8d
Author: William Brown <firstyear(a)redhat.com>
Date: Thu Oct 5 09:54:48 2017 +1000
Ticket 49392 - memavailable not available
Bug Description: On certain linux platforms memAvailable is
not actually available! This means that the value was 0, so
cgroup max was read instead, setting the system ram to:
9223372036854771712
That's a bit excessive, and can cause memory allocations to fail.
Fix Description: If memavail can't be found, fall back to
memtotal instead.
https://pagure.io/389-ds-base/issue/49392
Author: wibrown
Review by: mreynolds (Thanks!)
---
ldap/servers/slapd/slapi_pal.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/ldap/servers/slapd/slapi_pal.c b/ldap/servers/slapd/slapi_pal.c
index 52e914f..e41a0c4 100644
--- a/ldap/servers/slapd/slapi_pal.c
+++ b/ldap/servers/slapd/slapi_pal.c
@@ -153,7 +153,16 @@ spal_meminfo_get() {
/* Both memtotal and memavail are in kb */
memtotal = memtotal * 1024;
- memavail = memavail * 1024;
+
+ /*
+ * Oracle Enterprise Linux doesn't provide a valid memavail value, so fall
+ * back to 80% of memtotal.
+ */
+ if (memavail == 0) {
+ memavail = memtotal * 0.8;
+ } else {
+ memavail = memavail * 1024;
+ }
/* If it's possible, get our cgroup info */
uint64_t cg_mem_soft = 0;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.