This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new e56a2fa Issue 50984 - Memory leaks in disk monitoring
e56a2fa is described below
commit e56a2fad745d8875b2ed9985b1d9cbfcdb40f77b
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Thu Mar 26 19:33:47 2020 +0100
Issue 50984 - Memory leaks in disk monitoring
Description: Memory leaks are reported by the disk monitoring test suite.
The direct leak is related to char **dirs array which is not freed at all.
Free the array when we clean up or go to shutdown.
https://pagure.io/389-ds-base/issue/50984
Reviewed by: firstyear, tbordaz (Thanks!)
---
ldap/servers/slapd/daemon.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 7c6d35f..e6aca97 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -489,8 +489,7 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
slapi_log_err(SLAPI_LOG_ALERT, "disk_monitoring_thread",
"Disk space is critically low on disk (%s), remaining space: %" PRIu64 " Kb. Signaling slapd for shutdown...\n",
dirstr, (disk_space / 1024));
- g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
- return;
+ goto cleanup;
}
/*
* If we are low, see if we are using verbose error logging, and turn it off
@@ -558,6 +557,8 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
now = start;
while ((now - start) < grace_period) {
if (g_get_shutdown()) {
+ slapi_ch_array_free(dirs);
+ dirs = NULL;
return;
}
/*
@@ -600,8 +601,7 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
slapi_log_err(SLAPI_LOG_ALERT, "disk_monitoring_thread",
"Disk space is critically low on disk (%s), remaining space: %" PRIu64 " Kb. Signaling slapd for shutdown...\n",
dirstr, (disk_space / 1024));
- g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
- return;
+ goto cleanup;
}
now = slapi_current_utc_time();
}
@@ -618,11 +618,14 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
slapi_log_err(SLAPI_LOG_ALERT, "disk_monitoring_thread",
"Disk space is still too low (%" PRIu64 " Kb). Signaling slapd for shutdown...\n",
(disk_space / 1024));
- g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
-
- return;
+ goto cleanup;
}
}
+ cleanup:
+ slapi_ch_array_free(dirs);
+ dirs = NULL;
+ g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
+ return;
}
static void
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 324b5b1 Issue 50984 - Memory leaks in disk monitoring
324b5b1 is described below
commit 324b5b1d07cda032a64f87ad98d505d427c43f10
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Thu Mar 26 19:33:47 2020 +0100
Issue 50984 - Memory leaks in disk monitoring
Description: Memory leaks are reported by the disk monitoring test suite.
The direct leak is related to char **dirs array which is not freed at all.
Free the array when we clean up or go to shutdown.
https://pagure.io/389-ds-base/issue/50984
Reviewed by: firstyear, tbordaz (Thanks!)
---
ldap/servers/slapd/daemon.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 345e292..446f91e 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -501,8 +501,7 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
slapi_log_err(SLAPI_LOG_ALERT, "disk_monitoring_thread",
"Disk space is critically low on disk (%s), remaining space: %" PRIu64 " Kb. Signaling slapd for shutdown...\n",
dirstr, (disk_space / 1024));
- g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
- return;
+ goto cleanup;
}
/*
* If we are low, see if we are using verbose error logging, and turn it off
@@ -570,6 +569,8 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
now = start;
while ((now - start) < grace_period) {
if (g_get_shutdown()) {
+ slapi_ch_array_free(dirs);
+ dirs = NULL;
return;
}
/*
@@ -612,8 +613,7 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
slapi_log_err(SLAPI_LOG_ALERT, "disk_monitoring_thread",
"Disk space is critically low on disk (%s), remaining space: %" PRIu64 " Kb. Signaling slapd for shutdown...\n",
dirstr, (disk_space / 1024));
- g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
- return;
+ goto cleanup;
}
now = slapi_current_utc_time();
}
@@ -630,11 +630,14 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
slapi_log_err(SLAPI_LOG_ALERT, "disk_monitoring_thread",
"Disk space is still too low (%" PRIu64 " Kb). Signaling slapd for shutdown...\n",
(disk_space / 1024));
- g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
-
- return;
+ goto cleanup;
}
}
+ cleanup:
+ slapi_ch_array_free(dirs);
+ dirs = NULL;
+ g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
+ return;
}
static void
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new a171670 Issue 50984 - Memory leaks in disk monitoring
a171670 is described below
commit a171670d8706f201e18223d145f8685038cfbd6a
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Fri Mar 27 11:35:55 2020 +0100
Issue 50984 - Memory leaks in disk monitoring
Description: Reset dirs pointer every time we free it.
The code may be changed in the future so we should make it
more robust.
https://pagure.io/389-ds-base/issue/50984
Reviewed by: spichugi, tbordaz (one line commit rule)
---
ldap/servers/slapd/daemon.c | 2 ++
ldap/servers/slapd/main.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index e7a5c28..65f2336 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -613,6 +613,7 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
}
}
slapi_ch_array_free(dirs);
+ dirs = NULL;
return;
}
/*
@@ -712,6 +713,7 @@ disk_monitoring_thread(void *nothing __attribute__((unused)))
}
}
slapi_ch_array_free(dirs);
+ dirs = NULL; /* now it is not needed but the code may be changed in the future and it'd better be more robust */
g_set_shutdown(SLAPI_SHUTDOWN_DISKFULL);
return;
}
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index 7d7c9ac..5eafb91 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -958,6 +958,7 @@ main(int argc, char **argv)
goto cleanup;
}
slapi_ch_array_free(dirs);
+ dirs = NULL;
}
/* log the max fd limit as it is typically set in env/systemd */
slapi_log_err(SLAPI_LOG_INFO, "main",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new 335b6de Issue 49731 - dscreate fails in silent mode because of db_home_dir
335b6de is described below
commit 335b6de103671b0256d244a788680e715c6b2463
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Thu Mar 26 16:50:35 2020 -0400
Issue 49731 - dscreate fails in silent mode because of db_home_dir
Description: The silent install was broken because of a missing key "db_home_dir"
so it is now added to the dictionary.
relates: https://pagure.io/389-ds-base/issue/49731
Reviewed by: mreynolds (one line commit rule)
---
src/lib389/lib389/instance/options.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/lib389/lib389/instance/options.py b/src/lib389/lib389/instance/options.py
index dcc7f63..0cdb7f6 100644
--- a/src/lib389/lib389/instance/options.py
+++ b/src/lib389/lib389/instance/options.py
@@ -32,6 +32,7 @@ format_keys = [
'inst_dir',
'backup_dir',
'db_dir',
+ 'db_home_dir',
'ldif_dir',
'lock_dir',
'log_dir',
@@ -240,6 +241,10 @@ class Slapd2Base(Options2):
self._type['db_dir'] = str
self._helptext['db_dir'] = "Sets the database directory of the instance."
+ self._options['db_home_dir'] = ds_paths.db_home_dir
+ self._type['db_home_dir'] = str
+ self._helptext['db_home_dir'] = "Sets the memory-mapped database files location of the instance."
+
self._options['ldif_dir'] = ds_paths.ldif_dir
self._type['ldif_dir'] = str
self._helptext['ldif_dir'] = "Sets the LDIF export and import directory of the instance."
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 80f6dbd Issue 50975 - Revise UI branding with new minimized build
80f6dbd is described below
commit 80f6dbdce75ba74588b4912f7c44ee7d343765d0
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Mar 24 11:44:10 2020 -0400
Issue 50975 - Revise UI branding with new minimized build
Description: We can no longer use the previous method of text replacement
to brand the UI for downstream vs upstream builds. Instead
we can use css files to set the branding, and the specfile
can do a text replacement on the non-miminized css file.
fixes: https://pagure.io/389-ds-base/issue/50975
Reviewed by: firstyear & mhonek (Thanks!!)
---
src/cockpit/389-console/src/css/branding.css | 3 +++
src/cockpit/389-console/src/ds.jsx | 2 +-
src/cockpit/389-console/src/index.html | 4 ++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/cockpit/389-console/src/css/branding.css b/src/cockpit/389-console/src/css/branding.css
new file mode 100644
index 0000000..0f6c409
--- /dev/null
+++ b/src/cockpit/389-console/src/css/branding.css
@@ -0,0 +1,3 @@
+#main-banner::before {
+ content: "389 Directory Server Management";
+}
diff --git a/src/cockpit/389-console/src/ds.jsx b/src/cockpit/389-console/src/ds.jsx
index c003d16..f83ce55 100644
--- a/src/cockpit/389-console/src/ds.jsx
+++ b/src/cockpit/389-console/src/ds.jsx
@@ -35,6 +35,7 @@ import {
Button
} from "patternfly-react";
import "./css/ds.css";
+import "./css/branding.css";
const staticStates = {
noPackage: (
@@ -532,7 +533,6 @@ export class DSInstance extends React.Component {
pageLoadingState.state !== "noPackage" ? (
<div className="ds-logo" hidden={pageLoadingState.state === "loading"}>
<h2 className="ds-logo-style" id="main-banner">
- 389 Directory Server Management
<div className="dropdown ds-server-action">
<select
className="btn btn-default dropdown"
diff --git a/src/cockpit/389-console/src/index.html b/src/cockpit/389-console/src/index.html
index a243e1e..1278844 100644
--- a/src/cockpit/389-console/src/index.html
+++ b/src/cockpit/389-console/src/index.html
@@ -1,13 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <title>389 Directory Server</title>
+ <title>Directory Server Management</title>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="../base1/cockpit.js"></script>
<link rel="stylesheet" href="../base1/patternfly.css">
<link href="css/ds.css" type="text/css" rel="stylesheet">
+ <link href="css/branding.css" type="text/css" rel="stylesheet">
</head>
@@ -16,4 +17,3 @@
<script src="index.js"></script>
</body>
</html>
-
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 73dd876 Issue 50975 - Revise UI branding with new minimized build
73dd876 is described below
commit 73dd876e111aa3f60d1590317907bd8e549b763b
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Mar 24 11:44:10 2020 -0400
Issue 50975 - Revise UI branding with new minimized build
Description: We can no longer use the previous method of text replacement
to brand the UI for downstream vs upstream builds. Instead
we can use css files to set the branding, and the specfile
can do a text replacement on the non-miminized css file.
fixes: https://pagure.io/389-ds-base/issue/50975
Reviewed by: firstyear & mhonek (Thanks!!)
---
src/cockpit/389-console/src/css/branding.css | 3 +++
src/cockpit/389-console/src/ds.jsx | 2 +-
src/cockpit/389-console/src/index.html | 4 ++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/cockpit/389-console/src/css/branding.css b/src/cockpit/389-console/src/css/branding.css
new file mode 100644
index 0000000..0f6c409
--- /dev/null
+++ b/src/cockpit/389-console/src/css/branding.css
@@ -0,0 +1,3 @@
+#main-banner::before {
+ content: "389 Directory Server Management";
+}
diff --git a/src/cockpit/389-console/src/ds.jsx b/src/cockpit/389-console/src/ds.jsx
index c003d16..f83ce55 100644
--- a/src/cockpit/389-console/src/ds.jsx
+++ b/src/cockpit/389-console/src/ds.jsx
@@ -35,6 +35,7 @@ import {
Button
} from "patternfly-react";
import "./css/ds.css";
+import "./css/branding.css";
const staticStates = {
noPackage: (
@@ -532,7 +533,6 @@ export class DSInstance extends React.Component {
pageLoadingState.state !== "noPackage" ? (
<div className="ds-logo" hidden={pageLoadingState.state === "loading"}>
<h2 className="ds-logo-style" id="main-banner">
- 389 Directory Server Management
<div className="dropdown ds-server-action">
<select
className="btn btn-default dropdown"
diff --git a/src/cockpit/389-console/src/index.html b/src/cockpit/389-console/src/index.html
index a243e1e..1278844 100644
--- a/src/cockpit/389-console/src/index.html
+++ b/src/cockpit/389-console/src/index.html
@@ -1,13 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <title>389 Directory Server</title>
+ <title>Directory Server Management</title>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="../base1/cockpit.js"></script>
<link rel="stylesheet" href="../base1/patternfly.css">
<link href="css/ds.css" type="text/css" rel="stylesheet">
+ <link href="css/branding.css" type="text/css" rel="stylesheet">
</head>
@@ -16,4 +17,3 @@
<script src="index.js"></script>
</body>
</html>
-
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.10
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.10 by this push:
new 3a8d5bc Issue 49437 - Fix memory leak with indirect COS
3a8d5bc is described below
commit 3a8d5bc4dce01fb800c93434181060afe9287546
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Wed Mar 25 16:55:34 2020 -0400
Issue 49437 - Fix memory leak with indirect COS
Bug Description: There are two leaks when dealing with indirect COS. The
first leak is caused by the COS cache entry's objectclass
list not being freed when the entry is removed from the
hash table.
The other leak is caused when we follow an indirect pointer
COS and do not free a tmp value set that goes unused.
Fix description: Free the COS entry objectclass list when removing an entry
from the hash table. When querying a COS attribute and the
returned attribute (out_attr) is NULL, then free the unused
tmp_val ValueSet as it's not consumed by anything.
Fixes: https://pagure.io/389-ds-base/issue/49437
Reviewed by: firstyear & tbordaz(Thanks!)
---
ldap/servers/plugins/cos/cos_cache.c | 3 +++
ldap/servers/slapd/vattr.c | 39 +++++++++++++++++++-----------------
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index 64c0441..eb9bd77 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -2372,6 +2372,9 @@ cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context, Slapi_Entry *
*out_attr = tmp_vals;
tmp_vals = NULL;
}
+ } else if (out_attr == NULL && tmp_vals) {
+ slapi_valueset_free(tmp_vals);
+ tmp_vals = NULL;
}
}
diff --git a/ldap/servers/slapd/vattr.c b/ldap/servers/slapd/vattr.c
index 852a887..d8b2c83 100644
--- a/ldap/servers/slapd/vattr.c
+++ b/ldap/servers/slapd/vattr.c
@@ -2004,6 +2004,24 @@ vattr_map_create(void)
return 0;
}
+/*
+ vattr_delete_attrvals
+ ---------------------
+ deletes a value list
+*/
+void
+vattr_delete_attrvals(objAttrValue **attrval)
+{
+ objAttrValue *val = *attrval;
+
+ while (val) {
+ objAttrValue *next = val->pNext;
+ slapi_value_free(&val->val);
+ slapi_ch_free((void **)&val);
+ val = next;
+ }
+}
+
void
vattr_map_entry_free(vattr_map_entry *vae)
{
@@ -2016,6 +2034,9 @@ vattr_map_entry_free(vattr_map_entry *vae)
}
list_entry = next_entry;
}
+ if (vae->objectclasses) {
+ vattr_delete_attrvals(&(vae->objectclasses));
+ }
slapi_ch_free_string(&(vae->type_name));
slapi_ch_free((void **)&vae);
}
@@ -2103,24 +2124,6 @@ vattr_map_insert(vattr_map_entry *vae)
}
/*
- vattr_delete_attrvals
- ---------------------
- deletes a value list
-*/
-void
-vattr_delete_attrvals(objAttrValue **attrval)
-{
- objAttrValue *val = *attrval;
-
- while (val) {
- objAttrValue *next = val->pNext;
- slapi_value_free(&val->val);
- slapi_ch_free((void **)&val);
- val = next;
- }
-}
-
-/*
vattr_add_attrval
-----------------
adds a value to an attribute value list
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 4a1251e Issue 49437 - Fix memory leak with indirect COS
4a1251e is described below
commit 4a1251e4b7d7765b57f45b14da47604c0ba1d271
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Wed Mar 25 16:55:34 2020 -0400
Issue 49437 - Fix memory leak with indirect COS
Bug Description: There are two leaks when dealing with indirect COS. The
first leak is caused by the COS cache entry's objectclass
list not being freed when the entry is removed from the
hash table.
The other leak is caused when we follow an indirect pointer
COS and do not free a tmp value set that goes unused.
Fix description: Free the COS entry objectclass list when removing an entry
from the hash table. When querying a COS attribute and the
returned attribute (out_attr) is NULL, then free the unused
tmp_val ValueSet as it's not consumed by anything.
Fixes: https://pagure.io/389-ds-base/issue/49437
Reviewed by: firstyear & tbordaz(Thanks!)
---
ldap/servers/plugins/cos/cos_cache.c | 3 +++
ldap/servers/slapd/vattr.c | 39 +++++++++++++++++++-----------------
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index 64c0441..eb9bd77 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -2372,6 +2372,9 @@ cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context, Slapi_Entry *
*out_attr = tmp_vals;
tmp_vals = NULL;
}
+ } else if (out_attr == NULL && tmp_vals) {
+ slapi_valueset_free(tmp_vals);
+ tmp_vals = NULL;
}
}
diff --git a/ldap/servers/slapd/vattr.c b/ldap/servers/slapd/vattr.c
index 852a887..d8b2c83 100644
--- a/ldap/servers/slapd/vattr.c
+++ b/ldap/servers/slapd/vattr.c
@@ -2004,6 +2004,24 @@ vattr_map_create(void)
return 0;
}
+/*
+ vattr_delete_attrvals
+ ---------------------
+ deletes a value list
+*/
+void
+vattr_delete_attrvals(objAttrValue **attrval)
+{
+ objAttrValue *val = *attrval;
+
+ while (val) {
+ objAttrValue *next = val->pNext;
+ slapi_value_free(&val->val);
+ slapi_ch_free((void **)&val);
+ val = next;
+ }
+}
+
void
vattr_map_entry_free(vattr_map_entry *vae)
{
@@ -2016,6 +2034,9 @@ vattr_map_entry_free(vattr_map_entry *vae)
}
list_entry = next_entry;
}
+ if (vae->objectclasses) {
+ vattr_delete_attrvals(&(vae->objectclasses));
+ }
slapi_ch_free_string(&(vae->type_name));
slapi_ch_free((void **)&vae);
}
@@ -2103,24 +2124,6 @@ vattr_map_insert(vattr_map_entry *vae)
}
/*
- vattr_delete_attrvals
- ---------------------
- deletes a value list
-*/
-void
-vattr_delete_attrvals(objAttrValue **attrval)
-{
- objAttrValue *val = *attrval;
-
- while (val) {
- objAttrValue *next = val->pNext;
- slapi_value_free(&val->val);
- slapi_ch_free((void **)&val);
- val = next;
- }
-}
-
-/*
vattr_add_attrval
-----------------
adds a value to an attribute value list
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.