You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After PR #1387 disabled crash reporting by setting send_crash_reports.enabled=false and clearing the endpoint in embedded.xml, the crash report is no longer uploaded to crash.clickhouse.com (confirmed via tcpdump). However, the crash-report sending code path is still executed during a crash, resulting in a BAD_ARGUMENTS exception (Empty protocol in the URL).
This happens because CrashWriter::initialize() always creates a CrashWriter instance regardless of the enabled setting. When a crash occurs, CrashWriter::onSignal() checks if (instance) — which is always true — and proceeds to call sendError(), which tries to construct an HTTP request with an empty endpoint URL and throws.
This issue:
Produces misleading error log output during crashes
Executes unnecessary code in a crash handler, where minimal work is preferred
The constructor skips setting the endpoint when enabled=false, leaving it as an empty string. But since instance is non-null, the guard in sendError() does not short-circuit:
voidCrashWriter::sendError(...)
{
if (!instance) // always false — instance is always created
{
LOG_INFO(logger, "Not sending crash report");
return;
}
// proceeds to use empty endpoint → exception
}
Suggested fix
Don't create the instance when crash reporting is disabled:
voidCrashWriter::initialize(Poco::Util::LayeredConfiguration & config)
{
if (config.getBool("send_crash_reports.enabled", false))
instance.reset(newCrashWriter(config));
}
This way the existing if (instance) guards in onSignal() and onException() will correctly skip the send path.
✅ I checked the Altinity Stable Builds lifecycle table, and the Altinity Stable Build version I'm using is still supported.
Type of problem
Bug report - something's broken
Describe the situation
After PR #1387 disabled crash reporting by setting
send_crash_reports.enabled=falseand clearing the endpoint inembedded.xml, the crash report is no longer uploaded tocrash.clickhouse.com(confirmed viatcpdump). However, the crash-report sending code path is still executed during a crash, resulting in aBAD_ARGUMENTSexception (Empty protocol in the URL).This happens because
CrashWriter::initialize()always creates aCrashWriterinstance regardless of theenabledsetting. When a crash occurs,CrashWriter::onSignal()checksif (instance)— which is always true — and proceeds to callsendError(), which tries to construct an HTTP request with an empty endpoint URL and throws.This issue:
embedded.xmlchange from PR Antalya 25.8 - disable crash report in more places #1387How to reproduce the behavior
Environment
Steps
Expected behavior
When crash reporting is disabled, the send path should be fully skipped — no send attempt and no exception:
Actual behavior
The server attempts to send the crash report and fails with an exception:
Root cause analysis
In
src/Daemon/CrashWriter.cpp,initialize()unconditionally creates the singleton instance:The constructor skips setting the
endpointwhenenabled=false, leaving it as an empty string. But sinceinstanceis non-null, the guard insendError()does not short-circuit:Suggested fix
Don't create the instance when crash reporting is disabled:
This way the existing
if (instance)guards inonSignal()andonException()will correctly skip the send path.Additional context
Related PR
embedded.xmlandconfig.yaml.exampleNetwork verification
tcpdumpconfirms no data is sent tocrash.clickhouse.comafter PR Antalya 25.8 - disable crash report in more places #1387 — the PR achieves its goal