Skip to content

Call to estimateCompressionRatio('DoubleDelta, T64, ZSTD')(...) leads to a crash #89282

@ShoshinNikita

Description

@ShoshinNikita

Company or project name

No response

Describe what's wrong

Call to estimateCompressionRatio('DoubleDelta, T64, ZSTD')(value) leads to a ClickHouse crash:

  • process is terminated with exit code 139
  • queries from the clients (official Go driver) start to return error read: connection reset by peer

Does it reproduce on the most recent release?

Yes

How to reproduce

Fiddle - https://fiddle.clickhouse.com/dc902919-23a4-447f-a441-b076df04e64a

CREATE TABLE compression_estimate_example (
    number UInt64
)
ENGINE = MergeTree()
ORDER BY number;

INSERT INTO compression_estimate_example
SELECT number FROM system.numbers LIMIT 100_000;

SELECT estimateCompressionRatio('DoubleDelta, T64, ZSTD')(number) AS estimate FROM compression_estimate_example;

Expected behavior

No response

Error message and/or stacktrace

[481c0ddc8f6c] 2025.10.31 10:39:53.190487 [ 88 ] <Fatal> BaseDaemon: ########################################
[481c0ddc8f6c] 2025.10.31 10:39:53.190544 [ 88 ] <Fatal> BaseDaemon: (version 25.11.1.836 (official build), build id: 771ABFEB91DE7030C10F59476517078738EB50A5, git hash: 94901ebfb1ef2adcebe0ac046e0900069d649386) (from thread 774) (query_id: 324fd213-8b9d-47c4-b0c6-252dfebf2009) (query: SELECT estimateCompressionRatio('DoubleDelta, T64, ZSTD')(number) AS estimate FROM compression_estimate_example;) Received signal Aborted (6)
[481c0ddc8f6c] 2025.10.31 10:39:53.190583 [ 88 ] <Fatal> BaseDaemon: 
[481c0ddc8f6c] 2025.10.31 10:39:53.190616 [ 88 ] <Fatal> BaseDaemon: Stack trace: 0x00007038755da9fd 0x0000703875586476 0x000070387556c7f3 0x0000000016ab5e66 0x0000000020b591c3 0x0000000020b591af 0x000000000cb2c65b 0x00000000145d06ea 0x0000000018415c7b 0x00000000184157fd 0x000000001aa6da89 0x000000001a7b2002 0x000000001a7a441b 0x000000001a7a8183 0x0000000013fcc2eb 0x0000000013fd3766 0x0000000013fc9212 0x0000000013fd0e9a 0x00007038755d8ac3 0x0000703875669a74
[481c0ddc8f6c] 2025.10.31 10:39:53.190668 [ 88 ] <Fatal> BaseDaemon: 2. ? @ 0x00000000000969fd
[481c0ddc8f6c] 2025.10.31 10:39:53.190700 [ 88 ] <Fatal> BaseDaemon: 3. ? @ 0x0000000000042476
[481c0ddc8f6c] 2025.10.31 10:39:53.190731 [ 88 ] <Fatal> BaseDaemon: 4. ? @ 0x00000000000287f3
[481c0ddc8f6c] 2025.10.31 10:39:53.190783 [ 88 ] <Fatal> BaseDaemon: 5. terminate_handler() @ 0x0000000016ab5e66
[481c0ddc8f6c] 2025.10.31 10:39:53.190829 [ 88 ] <Fatal> BaseDaemon: 6. std::__terminate(void (*)()) @ 0x0000000020b591c3
[481c0ddc8f6c] 2025.10.31 10:39:53.190865 [ 88 ] <Fatal> BaseDaemon: 7. std::terminate() @ 0x0000000020b591af
[481c0ddc8f6c] 2025.10.31 10:39:53.190897 [ 88 ] <Fatal> BaseDaemon: 8. ? @ 0x000000000cb2c65b
[481c0ddc8f6c] 2025.10.31 10:39:53.190925 [ 88 ] <Fatal> BaseDaemon: 9. ? @ 0x00000000145d06ea
[481c0ddc8f6c] 2025.10.31 10:39:53.190978 [ 88 ] <Fatal> BaseDaemon: 10. void DB::Aggregator::insertAggregatesIntoColumns<char*>(char*&, std::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn>>>&, DB::Arena*) const @ 0x0000000018415c7b
[481c0ddc8f6c] 2025.10.31 10:39:53.191014 [ 88 ] <Fatal> BaseDaemon: 11. DB::Aggregator::prepareBlockAndFillWithoutKey(DB::AggregatedDataVariants&, bool, bool) const @ 0x00000000184157fd
[481c0ddc8f6c] 2025.10.31 10:39:53.191042 [ 88 ] <Fatal> BaseDaemon: 12. DB::ConvertingAggregatedToChunksTransform::work() @ 0x000000001aa6da89
[481c0ddc8f6c] 2025.10.31 10:39:53.191080 [ 88 ] <Fatal> BaseDaemon: 13. DB::ExecutionThreadContext::executeTask() @ 0x000000001a7b2002
[481c0ddc8f6c] 2025.10.31 10:39:53.191121 [ 88 ] <Fatal> BaseDaemon: 14. DB::PipelineExecutor::executeStepImpl(unsigned long, DB::IAcquiredSlot*, std::atomic<bool>*) @ 0x000000001a7a441b
[481c0ddc8f6c] 2025.10.31 10:39:53.191167 [ 88 ] <Fatal> BaseDaemon: 15. void std::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0, void ()>>(std::__function::__policy_storage const*) @ 0x000000001a7a8183
[481c0ddc8f6c] 2025.10.31 10:39:53.191202 [ 88 ] <Fatal> BaseDaemon: 16. ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::worker() @ 0x0000000013fcc2eb
[481c0ddc8f6c] 2025.10.31 10:39:53.191239 [ 88 ] <Fatal> BaseDaemon: 17. void std::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x0000000013fd3766
[481c0ddc8f6c] 2025.10.31 10:39:53.191280 [ 88 ] <Fatal> BaseDaemon: 18. ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x0000000013fc9212
[481c0ddc8f6c] 2025.10.31 10:39:53.191311 [ 88 ] <Fatal> BaseDaemon: 19. void* std::__thread_proxy[abi:ne190107]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x0000000013fd0e9a
[481c0ddc8f6c] 2025.10.31 10:39:53.191361 [ 88 ] <Fatal> BaseDaemon: 20. ? @ 0x0000000000094ac3
[481c0ddc8f6c] 2025.10.31 10:39:53.191399 [ 88 ] <Fatal> BaseDaemon: 21. ? @ 0x0000000000125a74
[481c0ddc8f6c] 2025.10.31 10:39:53.365753 [ 88 ] <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: C8DE168912130AECDD584BD5CF021329)
[481c0ddc8f6c] 2025.10.31 10:39:53.941864 [ 88 ] <Fatal> BaseDaemon: Report this error to https://github.com/ClickHouse/ClickHouse/issues
[481c0ddc8f6c] 2025.10.31 10:39:53.942171 [ 88 ] <Fatal> BaseDaemon: Changed settings: output_format_pretty_color = 0, output_format_pretty_grid_charset = 'ASCII'
[481c0ddc8f6c] 2025.10.31 10:39:57.190567 [ 88 ] <Fatal> BaseDaemon: ########################################
[481c0ddc8f6c] 2025.10.31 10:39:57.190587 [ 88 ] <Fatal> BaseDaemon: (version 25.11.1.836 (official build), build id: 771ABFEB91DE7030C10F59476517078738EB50A5, git hash: 94901ebfb1ef2adcebe0ac046e0900069d649386) (from thread 774) (query_id: 324fd213-8b9d-47c4-b0c6-252dfebf2009) (query: SELECT estimateCompressionRatio('DoubleDelta, T64, ZSTD')(number) AS estimate FROM compression_estimate_example;) Received signal Segmentation fault (11)
[481c0ddc8f6c] 2025.10.31 10:39:57.190602 [ 88 ] <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Unknown si_code.
[481c0ddc8f6c] 2025.10.31 10:39:57.190626 [ 88 ] <Fatal> BaseDaemon: Stack trace: 0x000070387556c899 0x0000000016ab5e66 0x0000000020b591c3 0x0000000020b591af 0x000000000cb2c65b 0x00000000145d06ea 0x0000000018415c7b 0x00000000184157fd 0x000000001aa6da89 0x000000001a7b2002 0x000000001a7a441b 0x000000001a7a8183 0x0000000013fcc2eb 0x0000000013fd3766 0x0000000013fc9212 0x0000000013fd0e9a 0x00007038755d8ac3 0x0000703875669a74
[481c0ddc8f6c] 2025.10.31 10:39:57.190667 [ 88 ] <Fatal> BaseDaemon: 2. ? @ 0x0000000000028899
[481c0ddc8f6c] 2025.10.31 10:39:57.190709 [ 88 ] <Fatal> BaseDaemon: 3. terminate_handler() @ 0x0000000016ab5e66
[481c0ddc8f6c] 2025.10.31 10:39:57.190739 [ 88 ] <Fatal> BaseDaemon: 4. std::__terminate(void (*)()) @ 0x0000000020b591c3
[481c0ddc8f6c] 2025.10.31 10:39:57.190766 [ 88 ] <Fatal> BaseDaemon: 5. std::terminate() @ 0x0000000020b591af
[481c0ddc8f6c] 2025.10.31 10:39:57.190793 [ 88 ] <Fatal> BaseDaemon: 6. ? @ 0x000000000cb2c65b
[481c0ddc8f6c] 2025.10.31 10:39:57.190819 [ 88 ] <Fatal> BaseDaemon: 7. ? @ 0x00000000145d06ea
[481c0ddc8f6c] 2025.10.31 10:39:57.190854 [ 88 ] <Fatal> BaseDaemon: 8. void DB::Aggregator::insertAggregatesIntoColumns<char*>(char*&, std::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn>>>&, DB::Arena*) const @ 0x0000000018415c7b
[481c0ddc8f6c] 2025.10.31 10:39:57.190881 [ 88 ] <Fatal> BaseDaemon: 9. DB::Aggregator::prepareBlockAndFillWithoutKey(DB::AggregatedDataVariants&, bool, bool) const @ 0x00000000184157fd
[481c0ddc8f6c] 2025.10.31 10:39:57.190914 [ 88 ] <Fatal> BaseDaemon: 10. DB::ConvertingAggregatedToChunksTransform::work() @ 0x000000001aa6da89
[481c0ddc8f6c] 2025.10.31 10:39:57.190942 [ 88 ] <Fatal> BaseDaemon: 11. DB::ExecutionThreadContext::executeTask() @ 0x000000001a7b2002
[481c0ddc8f6c] 2025.10.31 10:39:57.190971 [ 88 ] <Fatal> BaseDaemon: 12. DB::PipelineExecutor::executeStepImpl(unsigned long, DB::IAcquiredSlot*, std::atomic<bool>*) @ 0x000000001a7a441b
[481c0ddc8f6c] 2025.10.31 10:39:57.191004 [ 88 ] <Fatal> BaseDaemon: 13. void std::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0, void ()>>(std::__function::__policy_storage const*) @ 0x000000001a7a8183
[481c0ddc8f6c] 2025.10.31 10:39:57.191030 [ 88 ] <Fatal> BaseDaemon: 14. ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::worker() @ 0x0000000013fcc2eb
[481c0ddc8f6c] 2025.10.31 10:39:57.191069 [ 88 ] <Fatal> BaseDaemon: 15. void std::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x0000000013fd3766
[481c0ddc8f6c] 2025.10.31 10:39:57.191104 [ 88 ] <Fatal> BaseDaemon: 16. ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x0000000013fc9212
[481c0ddc8f6c] 2025.10.31 10:39:57.191148 [ 88 ] <Fatal> BaseDaemon: 17. void* std::__thread_proxy[abi:ne190107]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x0000000013fd0e9a
[481c0ddc8f6c] 2025.10.31 10:39:57.191192 [ 88 ] <Fatal> BaseDaemon: 18. ? @ 0x0000000000094ac3
[481c0ddc8f6c] 2025.10.31 10:39:57.191231 [ 88 ] <Fatal> BaseDaemon: 19. ? @ 0x0000000000125a74
[481c0ddc8f6c] 2025.10.31 10:39:57.364096 [ 88 ] <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: C8DE168912130AECDD584BD5CF021329)
[481c0ddc8f6c] 2025.10.31 10:39:57.679780 [ 88 ] <Fatal> BaseDaemon: Report this error to https://github.com/ClickHouse/ClickHouse/issues
[481c0ddc8f6c] 2025.10.31 10:39:57.680066 [ 88 ] <Fatal> BaseDaemon: Changed settings: output_format_pretty_color = 0, output_format_pretty_grid_charset = 'ASCII'

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed user-visible misbehaviour in official release

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions