@cryptotaxi247 / netdata-1 / commits / 9ba79d3a1

Fix crash during shutdown of cgroups internal plugin. (#10614)

Markos Fountoulakis committed Feb 8, 2021 at 17:38 UTC 9ba79d3a1aec40d66b2d9570ae51715b151461bd
1 file changed +2 -1
collectors/cgroups.plugin/sys_fs_cgroup.c
+2 -1
@@ -3937,9 +3937,10 @@ static void cgroup_main_cleanup(void *ptr) {
3937
3938 if (!discovery_thread.exited) {
3939 info("stopping discovery thread worker");
3940 - uv_mutex_unlock(&discovery_thread.mutex);
3940 + uv_mutex_lock(&discovery_thread.mutex);
3941 discovery_thread.start_discovery = 1;
3942 uv_cond_signal(&discovery_thread.cond_var);
3943 + uv_mutex_unlock(&discovery_thread.mutex);
3944 }
3945
3946 while (!discovery_thread.exited && max > 0) {