summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2024-04-03 18:06:19 +0300
committerGitHub <noreply@github.com>2024-04-03 18:06:19 +0300
commitee0beeb9ebc94c2ccc40a86692442a344e53277f (patch)
tree223c904ddd577816c7a3048c2a474a019eab58fa
parent0cec40e5252f8a7b1f68ff8ab5a1c4cbf1d8afe6 (diff)
set min thread stack size to 1 MB (#17317)
-rw-r--r--src/daemon/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 6b170d81f0..c9602432a2 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -2023,6 +2023,9 @@ int main(int argc, char **argv) {
// setup threads configs
default_stacksize = netdata_threads_init();
+ // musl default thread stack size is 128k, let's set it to a higher value to avoid random crashes
+ if (default_stacksize < 1 * 1024 * 1024)
+ default_stacksize = 1 * 1024 * 1024;
#ifdef NETDATA_INTERNAL_CHECKS
config_set_boolean(CONFIG_SECTION_PLUGINS, "netdata monitoring", true);