From 7b04181dd94ab9bb6d201aa7e84bc538cdb06405 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Fri, 28 May 2021 16:22:50 +0300 Subject: [PATCH 1/6] suppress msan cassandra --- contrib/cassandra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/cassandra b/contrib/cassandra index c097fb5c7e6..eb9b68dadbb 160000 --- a/contrib/cassandra +++ b/contrib/cassandra @@ -1 +1 @@ -Subproject commit c097fb5c7e63cc430016d9a8b240d8e63fbefa52 +Subproject commit eb9b68dadbb4417a2c132ad4a1c2fa76e65e6fc1 From 095f06c8a35b876b64b247d77e8eec2dc27dc1c9 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Fri, 28 May 2021 17:37:05 +0300 Subject: [PATCH 2/6] raise timeout for test_host_ip_change/test.py::test_user_access_ip_change --- tests/integration/helpers/cluster.py | 9 ++++++--- .../configs/dictionaries/.gitkeep | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 tests/integration/test_dictionaries_all_layouts_separate_sources/configs/dictionaries/.gitkeep diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index 6287064b616..733af0cb8f9 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -126,7 +126,7 @@ class ClickHouseCluster: """ def __init__(self, base_path, name=None, base_config_dir=None, server_bin_path=None, client_bin_path=None, - odbc_bridge_bin_path=None, library_bridge_bin_path=None, zookeeper_config_path=None, + odbc_bridge_bin_path=None, library_bridge_bin_path=None, zookeeper_config_path=None, custom_dockerd_host=None): for param in list(os.environ.keys()): print("ENV %40s %s" % (param, os.environ[param])) @@ -455,7 +455,10 @@ class ClickHouseCluster: run_and_check(self.base_cmd + ["up", "--force-recreate", "--no-deps", "-d", node.name]) node.ip_address = self.get_instance_ip(node.name) node.client = Client(node.ip_address, command=self.client_bin_path) - node.wait_for_start(start_timeout=20.0, connection_timeout=600.0) # seconds + print("Restart node with ip change") + # In builds with sanitizer the server can take a long time to start + node.wait_for_start(start_timeout=60.0, connection_timeout=600.0) # seconds + print("Restarted") return node def get_instance_ip(self, instance_name): @@ -1524,7 +1527,7 @@ class ClickHouseInstance: if self.stay_alive: entrypoint_cmd = CLICKHOUSE_STAY_ALIVE_COMMAND.replace("{main_config_file}", self.main_config_name) - + print("Entrypoint cmd: {}".format(entrypoint_cmd)) networks = app_net = ipv4_address = ipv6_address = net_aliases = net_alias1 = "" diff --git a/tests/integration/test_dictionaries_all_layouts_separate_sources/configs/dictionaries/.gitkeep b/tests/integration/test_dictionaries_all_layouts_separate_sources/configs/dictionaries/.gitkeep deleted file mode 100644 index 9568549054c..00000000000 --- a/tests/integration/test_dictionaries_all_layouts_separate_sources/configs/dictionaries/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -#Keep From d9cc77c4290bd854364f943685570106e012b735 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Fri, 28 May 2021 21:22:25 +0300 Subject: [PATCH 3/6] keep --- .../configs/dictionaries/.gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/integration/test_dictionaries_all_layouts_separate_sources/configs/dictionaries/.gitkeep diff --git a/tests/integration/test_dictionaries_all_layouts_separate_sources/configs/dictionaries/.gitkeep b/tests/integration/test_dictionaries_all_layouts_separate_sources/configs/dictionaries/.gitkeep new file mode 100644 index 00000000000..9568549054c --- /dev/null +++ b/tests/integration/test_dictionaries_all_layouts_separate_sources/configs/dictionaries/.gitkeep @@ -0,0 +1 @@ +#Keep From 202e5773bf833aaf6d5d9c14d1859db677375773 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Fri, 28 May 2021 21:58:28 +0300 Subject: [PATCH 4/6] fix sentry --- base/daemon/BaseDaemon.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/base/daemon/BaseDaemon.cpp b/base/daemon/BaseDaemon.cpp index 01e700ebba3..a226b5e21c8 100644 --- a/base/daemon/BaseDaemon.cpp +++ b/base/daemon/BaseDaemon.cpp @@ -350,15 +350,16 @@ private: , calculated_binary_hash, daemon.stored_binary_hash); } #endif - - /// Write crash to system.crash_log table if available. - if (collectCrashLog) - collectCrashLog(sig, thread_num, query_id, stack_trace); + LOG_FATAL(log, "Here. {} {}", sig, SanitizerTrap); /// Send crash report to developers (if configured) if (sig != SanitizerTrap) SentryWriter::onFault(sig, error_message, stack_trace); + /// Write crash to system.crash_log table if available. + if (collectCrashLog) + collectCrashLog(sig, thread_num, query_id, stack_trace); + /// When everything is done, we will try to send these error messages to client. if (thread_ptr) thread_ptr->onFatalError(); From 00ce7feafbf109f8a38256bc656f93e30423c7f4 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Fri, 28 May 2021 22:00:15 +0300 Subject: [PATCH 5/6] better --- base/daemon/BaseDaemon.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/base/daemon/BaseDaemon.cpp b/base/daemon/BaseDaemon.cpp index a226b5e21c8..857a758bc71 100644 --- a/base/daemon/BaseDaemon.cpp +++ b/base/daemon/BaseDaemon.cpp @@ -350,7 +350,6 @@ private: , calculated_binary_hash, daemon.stored_binary_hash); } #endif - LOG_FATAL(log, "Here. {} {}", sig, SanitizerTrap); /// Send crash report to developers (if configured) if (sig != SanitizerTrap) From f3c81f4c9bd0574f621af7a3efd11871044b09a4 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Mon, 31 May 2021 17:30:02 +0300 Subject: [PATCH 6/6] disable test under msan --- base/daemon/BaseDaemon.cpp | 8 ++++---- tests/integration/test_send_crash_reports/test.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/base/daemon/BaseDaemon.cpp b/base/daemon/BaseDaemon.cpp index 857a758bc71..01e700ebba3 100644 --- a/base/daemon/BaseDaemon.cpp +++ b/base/daemon/BaseDaemon.cpp @@ -351,14 +351,14 @@ private: } #endif - /// Send crash report to developers (if configured) - if (sig != SanitizerTrap) - SentryWriter::onFault(sig, error_message, stack_trace); - /// Write crash to system.crash_log table if available. if (collectCrashLog) collectCrashLog(sig, thread_num, query_id, stack_trace); + /// Send crash report to developers (if configured) + if (sig != SanitizerTrap) + SentryWriter::onFault(sig, error_message, stack_trace); + /// When everything is done, we will try to send these error messages to client. if (thread_ptr) thread_ptr->onFatalError(); diff --git a/tests/integration/test_send_crash_reports/test.py b/tests/integration/test_send_crash_reports/test.py index 3f88f719fe4..ab52879c7c3 100644 --- a/tests/integration/test_send_crash_reports/test.py +++ b/tests/integration/test_send_crash_reports/test.py @@ -24,7 +24,7 @@ def started_node(): def test_send_segfault(started_node): - if started_node.is_built_with_thread_sanitizer(): + if started_node.is_built_with_thread_sanitizer() or started_node.is_built_with_memory_sanitizer(): pytest.skip("doesn't fit in timeouts for stacktrace generation") started_node.copy_file_to_container(os.path.join(SCRIPT_DIR, "fake_sentry_server.py"), "/fake_sentry_server.py")