Skip to content

Logical error: data->allocated_size != debug_allocated_size (A != B) #99920

@nickitat

Description

@nickitat

Describe the bug

Logical error

https://s3.amazonaws.com/clickhouse-test-reports/PRs/98145/4e15c0daf5c257b7fb3983f1dd5f4f7a73636243/ast_fuzzer_amd_debug_targeted/fatal.log

How to reproduce

SET max_insert_threads = 1, max_threads = 1, receive_timeout = 10., receive_data_timeout_ms = 10000, allow_suspicious_low_cardinality_types = true, allow_suspicious_fixed_string_types = true, allow_suspicious_indices = true, allow_suspicious_ttl_expressions = true, allow_suspicious_variant_types = true, allow_suspicious_primary_key = true, allow_suspicious_types_in_group_by = true, allow_suspicious_types_in_order_by = true, enable_positional_arguments = true, allow_nonconst_timezone_arguments = true, enable_time_time64_type = true, allow_nondeterministic_optimize_skip_unused_shards = true, log_queries = true, table_function_remote_max_addresses = 200, allow_distributed_ddl = true, allow_suspicious_codecs = true, max_execution_time = 10., max_memory_usage = 10000000000, allow_custom_error_code_in_throwif = true, allow_ddl = true, allow_introspection_functions = true, allow_drop_detached = true, enable_lightweight_delete = true, allow_materialized_view_with_bad_select = true, allow_settings_after_format_in_insert = true, allow_nondeterministic_mutations = true, allow_non_metadata_alters = true, enable_lightweight_update = true, allow_experimental_kafka_offsets_storage_in_keeper = true, allow_experimental_correlated_subqueries = true, use_variant_as_common_type = true, enable_order_by_all = true, allow_named_collection_override_by_default = true, allow_experimental_database_iceberg = true, allow_experimental_database_unity_catalog = true, allow_experimental_database_glue_catalog = true, allow_experimental_materialized_postgresql_table = true, allow_experimental_funnel_functions = true, allow_experimental_nlp_functions = true, allow_experimental_hash_functions = true, allow_experimental_time_series_table = true, allow_experimental_codecs = true, allow_experimental_join_right_table_sorting = true, allow_experimental_json_lazy_type_hints = true, allow_experimental_database_materialized_postgresql = true, allow_experimental_nullable_tuple_type = true, allow_experimental_database_hms_catalog = true, allow_experimental_kusto_dialect = true, allow_experimental_prql_dialect = true, allow_experimental_delta_kernel_rs = true, allow_experimental_time_series_aggregate_functions = true, allow_experimental_bfloat16_type = true, allow_experimental_inverted_index = true, allow_experimental_vector_similarity_index = true, allow_experimental_join_condition = true, allow_experimental_variant_type = true, allow_experimental_dynamic_type = true, allow_experimental_json_type = true, allow_not_comparable_types_in_order_by = true, allow_not_comparable_types_in_comparison_functions = true, allow_experimental_live_view = true, allow_experimental_shared_set_join = true, input_format_parquet_allow_geoparquet_parser = true;

CREATE TABLE test__fuzz_1 (`id` Nullable(UInt64), `d` Dynamic(max_types = 133)) ENGINE = Memory;

INSERT INTO test__fuzz_1 SETTINGS min_insert_block_size_rows = 50000 SELECT number, number FROM numbers(100000) SETTINGS min_insert_block_size_rows = 50000;

INSERT INTO test__fuzz_1 SETTINGS min_insert_block_size_rows = 50000 SELECT number, concat('str_', toString(number)) FROM numbers(100000, 100000) SETTINGS min_insert_block_size_rows = 50000;

INSERT INTO test__fuzz_1 SETTINGS min_insert_block_size_rows = 50000 SELECT number, arrayMap(x -> multiIf((number % 9) = 0, NULL, (number % 9) = 3, concat('str_', toString(number)), number), range((number % 10) + 1)) FROM numbers(200000, 100000) SETTINGS min_insert_block_size_rows = 50000;

INSERT INTO test__fuzz_1 SETTINGS min_insert_block_size_rows = 50000 SELECT number, NULL FROM numbers(300000, 100000) SETTINGS min_insert_block_size_rows = 50000;

INSERT INTO test__fuzz_1 SETTINGS min_insert_block_size_rows = 50000 SELECT number, multiIf((number % 4) = 3, concat('str_', toString(number)), (number % 4) = 2, NULL, (number % 4) = 1, number, arrayMap(x -> multiIf((number % 9) = 0, NULL, (number % 9) = 3, concat('str_', toString(number)), number), range((number % 10) + 1))) FROM numbers(400000, 400000) SETTINGS min_insert_block_size_rows = 50000;

INSERT INTO test__fuzz_1 SETTINGS min_insert_block_size_rows = 50000 SELECT number, if((number % 5) = 1, CAST([range(CAST((number % 10) + 1, 'UInt64'))], 'Array(Array(Dynamic))'), number) FROM numbers(100000, 100000) SETTINGS min_insert_block_size_rows = 50000;

INSERT INTO test__fuzz_1 SETTINGS min_insert_block_size_rows = 50000 SELECT number, if((number % 5) = 1, CAST(CAST(concat('str_', number), 'LowCardinality(String)'), 'Dynamic'), CAST(number, 'Dynamic')) FROM numbers(100000, 100000) SETTINGS min_insert_block_size_rows = 50000;

SELECT count(equals(toInt256(257),
intDiv(65536, -2147483649) AS alias144)),     toInt128(2147483647) FROM test__fuzz_1 WHERE
 NOT empty((SELECT d.`Array(Variant(String, UInt64))`));

Error message and/or stacktrace

No response

Metadata

Metadata

Assignees

Labels

fuzzProblem found by one of the fuzzers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions