23.8 Aarch64 builds with better introspection#396
Merged
Conversation
Collaborator
|
This is an automated comment for commit 636a295 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
Member
|
Without no-pie, trace_log / crash_log etc. can't be directly symbolized after clickhouse restart (with ASLR enabled on OS level). (still can be done using some math and guessing the 'old' base address by comparing adresses in the current & old stacktraces). |
Member
Author
|
For the reference, there is a draft of adding run-time warning at startup, but this doesn't compile against 23.8 because of incompatible linux headers baked into CH repo: diff --git a/src/Interpreters/SystemLog.cpp b/src/Interpreters/SystemLog.cpp
index 23a5a96584c..7f049cda173 100644
--- a/src/Interpreters/SystemLog.cpp
+++ b/src/Interpreters/SystemLog.cpp
@@ -37,6 +37,10 @@
#include <Common/logger_useful.h>
#include <Common/setThreadName.h>
+#if defined(OS_LINUX)
+#include <sys/personality.h>
+#endif
+
namespace DB
{
@@ -295,7 +299,17 @@ SystemLogs::SystemLogs(ContextPtr global_context, const Poco::Util::AbstractConf
if (part_log)
logs.emplace_back(part_log.get());
if (trace_log)
+ {
+#if defined(OS_LINUX)
+ if (!(personality(0xffffffff) & ADDR_NO_RANDOMIZE))
+ {
+ global_context->addWarningMessage("Table system.trace_log is enabled on PIC/PIE build. "
+ "Stack traces from previous launches (e.g. before ClickHouse restart) "
+ "would produce incorrect results when used with addressToSymbol/ToSymbol/ToLineWithInlines.");
+ }
+#endif
logs.emplace_back(trace_log.get());
+ }
if (crash_log)
logs.emplace_back(crash_log.get());
if (text_log) |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Building aarch64 builds with '-no-pie' to allow better introspection