set min thread stack size to 1 MB (#17317)
Ilya Mashchenko committed
Apr 3, 2024 at 18:06 UTC
ee0beeb9ebc94c2ccc40a86692442a344e53277f
1 file changed
+3
src/daemon/main.c
+3
@@ -2023,6 +2023,9 @@ int main(int argc, char **argv) {
2023
2024
// setup threads configs
2025
default_stacksize = netdata_threads_init();
2026
+ // musl default thread stack size is 128k, let's set it to a higher value to avoid random crashes
2027
+ if (default_stacksize < 1 * 1024 * 1024)
2028
+ default_stacksize = 1 * 1024 * 1024;
2029
2030
#ifdef NETDATA_INTERNAL_CHECKS
2031
config_set_boolean(CONFIG_SECTION_PLUGINS, "netdata monitoring", true);