aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/blockchain_utilities/blockchain_export.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_import.cpp2
-rw-r--r--src/common/util.cpp15
-rw-r--r--src/common/util.h2
-rw-r--r--src/daemon/main.cpp2
-rw-r--r--src/debug_utilities/cn_deserialize.cpp2
-rw-r--r--src/debug_utilities/object_sizes.cpp2
-rw-r--r--src/wallet/wallet_args.cpp2
8 files changed, 23 insertions, 6 deletions
diff --git a/src/blockchain_utilities/blockchain_export.cpp b/src/blockchain_utilities/blockchain_export.cpp
index 20eca09f2..d27756c66 100644
--- a/src/blockchain_utilities/blockchain_export.cpp
+++ b/src/blockchain_utilities/blockchain_export.cpp
@@ -55,7 +55,7 @@ int main(int argc, char* argv[])
uint64_t block_stop = 0;
bool blocks_dat = false;
- tools::sanitize_locale();
+ tools::on_startup();
boost::filesystem::path default_data_path {tools::get_default_data_dir()};
boost::filesystem::path default_testnet_data_path {default_data_path / "testnet"};
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp
index eeff5fb76..0a7efccc1 100644
--- a/src/blockchain_utilities/blockchain_import.cpp
+++ b/src/blockchain_utilities/blockchain_import.cpp
@@ -571,7 +571,7 @@ int main(int argc, char* argv[])
std::string m_config_folder;
std::string db_arg_str;
- tools::sanitize_locale();
+ tools::on_startup();
boost::filesystem::path default_data_path {tools::get_default_data_dir()};
boost::filesystem::path default_testnet_data_path {default_data_path / "testnet"};
diff --git a/src/common/util.cpp b/src/common/util.cpp
index 74a6babf1..30746f680 100644
--- a/src/common/util.cpp
+++ b/src/common/util.cpp
@@ -30,6 +30,10 @@
#include <cstdio>
+#ifdef __GLIBC__
+#include <gnu/libc-version.h>
+#endif
+
#include "include_base_utils.h"
#include "file_io_utils.h"
using namespace epee;
@@ -536,6 +540,17 @@ std::string get_nix_version_display_string()
}
return false;
}
+ bool on_startup()
+ {
+ sanitize_locale();
+
+#ifdef __GLIBC__
+ const char *ver = gnu_get_libc_version();
+ if (!strcmp(ver, "2.25"))
+ MCLOG_RED(el::Level::Warning, "global", "Running with glibc " << ver << ", hangs may occur - change glibc version if possible");
+#endif
+ return true;
+ }
void set_strict_default_file_permissions(bool strict)
{
#if defined(__MINGW32__) || defined(__MINGW__)
diff --git a/src/common/util.h b/src/common/util.h
index 48bdbbc28..2e4d6e917 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -129,6 +129,8 @@ namespace tools
bool sanitize_locale();
+ bool on_startup();
+
/*! \brief Defines a signal handler for win32 and *nix
*/
class signal_handler
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index acc23b9f9..5d06f65dd 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -61,7 +61,7 @@ int main(int argc, char const * argv[])
// TODO parse the debug options like set log level right here at start
- tools::sanitize_locale();
+ tools::on_startup();
epee::string_tools::set_module_name_and_folder(argv[0]);
diff --git a/src/debug_utilities/cn_deserialize.cpp b/src/debug_utilities/cn_deserialize.cpp
index a1b569554..7235ef855 100644
--- a/src/debug_utilities/cn_deserialize.cpp
+++ b/src/debug_utilities/cn_deserialize.cpp
@@ -45,7 +45,7 @@ int main(int argc, char* argv[])
uint32_t log_level = 0;
std::string input;
- tools::sanitize_locale();
+ tools::on_startup();
boost::filesystem::path output_file_path;
diff --git a/src/debug_utilities/object_sizes.cpp b/src/debug_utilities/object_sizes.cpp
index 47ba5cf6c..63b702700 100644
--- a/src/debug_utilities/object_sizes.cpp
+++ b/src/debug_utilities/object_sizes.cpp
@@ -64,7 +64,7 @@ int main(int argc, char* argv[])
{
size_logger sl;
- tools::sanitize_locale();
+ tools::on_startup();
mlog_configure("", true);
diff --git a/src/wallet/wallet_args.cpp b/src/wallet/wallet_args.cpp
index 22cfcc269..6137a0e02 100644
--- a/src/wallet/wallet_args.cpp
+++ b/src/wallet/wallet_args.cpp
@@ -91,7 +91,7 @@ namespace wallet_args
std::string lang = i18n_get_language();
- tools::sanitize_locale();
+ tools::on_startup();
tools::set_strict_default_file_permissions(true);
epee::string_tools::set_module_name_and_folder(argv[0]);