status
stringclasses 1
value | repo_name
stringclasses 13
values | repo_url
stringclasses 13
values | issue_id
int64 1
104k
| updated_files
stringlengths 11
1.76k
| title
stringlengths 4
369
| body
stringlengths 0
254k
⌀ | issue_url
stringlengths 38
55
| pull_url
stringlengths 38
53
| before_fix_sha
stringlengths 40
40
| after_fix_sha
stringlengths 40
40
| report_datetime
unknown | language
stringclasses 5
values | commit_datetime
unknown |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,983 | ["src/Storages/MergeTree/DataPartsExchange.cpp", "src/Storages/MergeTree/DataPartsExchange.h", "src/Storages/StorageReplicatedMergeTree.cpp"] | No such file or directory: `data.cmrk3` | https://s3.amazonaws.com/clickhouse-test-reports/0/39bda355f6a41b16bb015d9039884eca6508be6f/stateless_tests__asan__[2/2].html
https://s3.amazonaws.com/clickhouse-test-reports/43749/a50482ecd34b68e65566d5fdc4ed895a97e5ceb3/stateless_tests__tsan__[1/5].html
https://s3.amazonaws.com/clickhouse-test-reports/43686/2b6661f87c90e9c398e2babb5c366b3826d9a038/stateless_tests__ubsan__[2/2].html
```
2022-12-06 04:42:32 00993_system_parts_race_condition_drop_zookeeper: [ FAIL ] 62.48 sec. - return code: 233
2022-12-06 04:42:32 [62141c37099b] 2022.12.06 04:42:31.779473 [ 160952 ] {91ab5e5d-7591-4925-aba2-9627f4c369a3} <Error> executeQuery: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in file_size: No such file or directory ["/var/lib/clickhouse/store/31e/31eb607c-a552-44f7-8f02-4c1bc694f2fa/-1_0_221_5_247/data.cmrk3"]
2022-12-06 04:42:32 Cannot print extra info for Poco::Exception (version 22.12.1.1 (official build)) (from [::1]:42654) (comment: 00993_system_parts_race_condition_drop_zookeeper.sh) (in query: SELECT if((countDistinct(data) as c) == 0, 1, c) FROM ( SELECT _table, (count(), sum(a), sum(b), round(sum(c))) AS data FROM merge(currentDatabase(), 'alter_table_') GROUP BY _table )), Stack trace (when copying this message, always include the lines below):
2022-12-06 04:42:32
2022-12-06 04:42:32 0. ./build_docker/../contrib/llvm-project/libcxx/include/exception:134: std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) @ 0x43725a4d in /usr/bin/clickhouse
2022-12-06 04:42:32 1. ./build_docker/../contrib/llvm-project/libcxx/include/string:1499: std::__1::system_error::system_error(std::__1::error_code, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) @ 0x4374a3ee in /usr/bin/clickhouse
2022-12-06 04:42:32 2. ./build_docker/../contrib/llvm-project/libcxx/include/__filesystem/filesystem_error.h:42: std::__1::__fs::filesystem::filesystem_error::filesystem_error[abi:v15000](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::__fs::filesystem::path const&, std::__1::error_code) @ 0x1f7fd753 in /usr/bin/clickhouse
2022-12-06 04:42:32 3. ./build_docker/../contrib/llvm-project/libcxx/include/__filesystem/filesystem_error.h:90: void std::__1::__fs::filesystem::__throw_filesystem_error[abi:v15000]<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, std::__1::__fs::filesystem::path const&, std::__1::error_code const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, std::__1::__fs::filesystem::path const&, std::__1::error_code const&) @ 0x435f3bfa in /usr/bin/clickhouse
2022-12-06 04:42:32 4. ./build_docker/../contrib/llvm-project/libcxx/src/filesystem/filesystem_common.h:173: std::__1::__fs::filesystem::detail::(anonymous namespace)::ErrorHandler<unsigned long>::report(std::__1::error_code const&) const @ 0x4360374e in /usr/bin/clickhouse
2022-12-06 04:42:32 5. ./build_docker/../contrib/llvm-project/libcxx/src/filesystem/operations.cpp:0: std::__1::__fs::filesystem::__file_size(std::__1::__fs::filesystem::path const&, std::__1::error_code*) @ 0x436032b6 in /usr/bin/clickhouse
2022-12-06 04:42:32 6. ./build_docker/../src/Disks/DiskLocal.cpp:0: DB::DiskLocal::getFileSize(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const @ 0x2f1c20ba in /usr/bin/clickhouse
2022-12-06 04:42:32 7. ./build_docker/../src/Storages/MergeTree/DataPartStorageOnDisk.cpp:0: DB::DataPartStorageOnDisk::getFileSize(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const @ 0x33765e97 in /usr/bin/clickhouse
2022-12-06 04:42:32 8. ./build_docker/../src/Storages/MergeTree/MergeTreeMarksLoader.cpp:0: DB::MergeTreeMarksLoader::loadMarksImpl() @ 0x33d1112d in /usr/bin/clickhouse
2022-12-06 04:42:32 9. ./build_docker/../contrib/llvm-project/libcxx/include/__utility/swap.h:37: DB::MergeTreeMarksLoader::loadMarks() @ 0x33d0f95a in /usr/bin/clickhouse
2022-12-06 04:42:32 10. ./build_docker/../src/Storages/MergeTree/MergeTreeMarksLoader.cpp:199: std::__1::__packaged_task_func<DB::MergeTreeMarksLoader::loadMarksAsync()::$_1, std::__1::allocator<DB::MergeTreeMarksLoader::loadMarksAsync()::$_1>, std::__1::shared_ptr<DB::MarksInCompressedFile> ()>::operator()() @ 0x33d12e42 in /usr/bin/clickhouse
2022-12-06 04:42:32 11. ./build_docker/../contrib/llvm-project/libcxx/include/future:0: std::__1::packaged_task<std::__1::shared_ptr<DB::MarksInCompressedFile> ()>::operator()() @ 0x33d18382 in /usr/bin/clickhouse
2022-12-06 04:42:32 12. ./build_docker/../base/base/wide_integer_impl.h:774: ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::worker(std::__1::__list_iterator<ThreadFromGlobalPoolImpl<false>, void*>) @ 0x1f967d7c in /usr/bin/clickhouse
2022-12-06 04:42:32 13. ./build_docker/../src/Common/ThreadPool.h:197: ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'()::operator()() @ 0x1f971870 in /usr/bin/clickhouse
2022-12-06 04:42:32 14. ./build_docker/../base/base/wide_integer_impl.h:774: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x1f9618cd in /usr/bin/clickhouse
2022-12-06 04:42:32 15. ./build_docker/../contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:302: void* std::__1::__thread_proxy[abi:v15000]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x1f96ba60 in /usr/bin/clickhouse
2022-12-06 04:42:32 16. ? @ 0x7f3642421609 in ?
2022-12-06 04:42:32 17. __clone @ 0x7f3642346133 in ?
```
Related to https://github.com/ClickHouse/ClickHouse/pull/43288 (I have not seen similar errors with uncompressed marks and it started after ~2022-11-24)
cc: @SmitaRKulkarni | https://github.com/ClickHouse/ClickHouse/issues/43983 | https://github.com/ClickHouse/ClickHouse/pull/50339 | 3444dfda8cb3b9a938fefec08f325dade9883d08 | 06432929a7a0bf5e9cd906144458eaa6757dbec2 | "2022-12-06T13:19:50Z" | c++ | "2023-06-01T11:42:34Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,933 | ["CMakeLists.txt", "cmake/split_debug_symbols.cmake", "docker/packager/binary/build.sh", "programs/library-bridge/CMakeLists.txt", "programs/odbc-bridge/CMakeLists.txt", "src/Common/SymbolIndex.cpp"] | Azure AD based ssh extention poisons ClickHouse with preloaded shared library | ```bash
$ clickhouse-client -h 127.0.0.1 --port 9000 -q 'show databases'
INFORMATION_SCHEMA
default
information_schema
system
Aborted (core dumped)
```
This also happens when just connecting an interactive session and disconnecting with ctrl+d.
**Does it reproduce on recent release?**
This is the latest release I get on Ubuntu 22.04
**How to reproduce**
Clickhouse Version:
```
$ clickhouse-client --version
ClickHouse client version 22.11.2.30 (official build).
```
Platform:
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
```
```
$ uname -r
5.15.0-1024-azure
```
**Error message and/or stacktrace**
```
$ gdb --args clickhouse-client -h 127.0.0.1 --port 9000 -q 'show databases'
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from clickhouse-client...
(No debugging symbols found in clickhouse-client)
(gdb) r
Starting program: /usr/bin/clickhouse-client -h 127.0.0.1 --port 9000 -q show\ databases
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fb5e7206640 (LWP 1123636)]
[New Thread 0x7fb5e6a05640 (LWP 1123637)]
[New Thread 0x7fb5e6204640 (LWP 1123638)]
INFORMATION_SCHEMA
default
information_schema
system
[Thread 0x7fb5e7206640 (LWP 1123636) exited]
[Thread 0x7fb5e6204640 (LWP 1123638) exited]
[Thread 0x7fb5e6a05640 (LWP 1123637) exited]
Thread 1 "clickhouse-clie" received signal SIGSEGV, Segmentation fault.
0x00000000170a008c in free_default ()
(gdb) bt
#0 0x00000000170a008c in free_default ()
#1 0x00007fb5e7a8d07b in ?? () from /lib/x86_64-linux-gnu/libldap-2.5.so.0
#2 0x00007fb5eaeb424e in _dl_fini () at ./elf/dl-fini.c:142
#3 0x00007fb5eacb4495 in __run_exit_handlers (status=0, listp=0x7fb5eae88838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113
#4 0x00007fb5eacb4610 in __GI_exit (status=<optimized out>) at ./stdlib/exit.c:143
#5 0x00007fb5eac98d97 in __libc_start_call_main (main=main@entry=0x7daf740 <main>, argc=argc@entry=7, argv=argv@entry=0x7fff30cf4368) at ../sysdeps/nptl/libc_start_call_main.h:74
#6 0x00007fb5eac98e40 in __libc_start_main_impl (main=0x7daf740 <main>, argc=7, argv=0x7fff30cf4368, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff30cf4358) at ../csu/libc-start.c:392
#7 0x0000000007ab13ee in _start ()
```
**Additional context**
I can produce a core dump if necessary.
| https://github.com/ClickHouse/ClickHouse/issues/43933 | https://github.com/ClickHouse/ClickHouse/pull/47475 | d1c66574ce2a83a6bfb173b048392e0d321d082b | 3b481b9abdb991826f49d016dfb4785af6d1a03d | "2022-12-05T10:03:06Z" | c++ | "2023-07-30T09:21:17Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,919 | ["src/IO/HTTPCommon.cpp"] | Double whitespace in error message. | **Describe the issue**
```
Code: 86. DB::HTTPException: Received error from remote server /?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2F091f5ec4-13f0-485a-9afe-92cefaf15518%2F1%2Freplicas%2Fus&part=all_14200_14486_63&client_protocol_version=7&compress=false. HTTP status code: Internal Server Error, body: Code: 232. DB::Exception: No part all_14200_14486_63 in table. (NO_SUCH_DATA_PART), Stack trace (when copying this message, always include the lines below):
0. ./build_docker/../src/Common/Exception.cpp:77: DB::Exception::Exception(DB::Exception::MessageMasked const&, int, bool) @ 0xe48155a in /usr/bin/clickhouse
1. DB::Exception::Exception<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>(int, fmt::v8::basic_format_string<char, fmt::v8::type_identity<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>::type>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) @ 0x82ab740 in /usr/bin/clickhouse
2. ./build_docker/../src/Storages/MergeTree/DataPartsExchange.cpp:421: DB::DataPartsExchange::Service::findPart(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) @ 0x14a32489 in /usr/bin/clickhouse
3. ./build_docker/../contrib/llvm-project/libcxx/include/__utility/swap.h:37: DB::DataPartsExchange::Service::processQuery(DB::HTMLForm const&, DB::ReadBuffer&, DB::WriteBuffer&, DB::HTTPServerResponse&) @ 0x14a3071a in /usr/bin/clickhouse
4. ./build_docker/../contrib/llvm-project/libcxx/include/shared_mutex:370: DB::InterserverIOHTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTTPServerResponse&, DB::InterserverIOHTTPHandler::Output&) @ 0x14ff2cde in /usr/bin/clickhouse
5. ./build_docker/../contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:815: DB::InterserverIOHTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x14ff3613 in /usr/bin/clickhouse
6. ./build_docker/../contrib/poco/Foundation/include/Poco/AutoPtr.h:215: DB::HTTPServerConnection::run() @ 0x1505fed4 in /usr/bin/clickhouse
7. ./build_docker/../contrib/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x17ebced4 in /usr/bin/clickhouse
8. ./build_docker/../contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:48: Poco::Net::TCPServerDispatcher::run() @ 0x17ebe87b in /usr/bin/clickhouse
9. ./build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:213: Poco::PooledThread::run() @ 0x1804d967 in /usr/bin/clickhouse
10. ./build_docker/../contrib/poco/Foundation/include/Poco/SharedPtr.h:277: Poco::ThreadImpl::runnableEntry(void*) @ 0x1804b39d in /usr/bin/clickhouse
11. ? @ 0x7f833a232609 in ?
12. __clone @ 0x7f833a157163 in ?
(version 22.12.1.1071 (official build)). (RECEIVED_ERROR_FROM_REMOTE_IO_SERVER) (version 22.12.1.1071 (official build))
```
Here:
```
HTTP status code: Internal Server Error
``` | https://github.com/ClickHouse/ClickHouse/issues/43919 | https://github.com/ClickHouse/ClickHouse/pull/43920 | c5eb26951529f7c88fa11cd6f58c6c71290ff5d8 | 87663d36890272c1f5b77d7bc0397be9fe9646b1 | "2022-12-04T01:13:45Z" | c++ | "2022-12-06T09:04:24Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,891 | ["src/Backups/BackupSettings.cpp", "src/Backups/BackupsWorker.cpp", "src/Backups/BackupsWorker.h", "src/Backups/RestoreSettings.cpp", "src/Backups/RestoreSettings.h", "src/Backups/SettingsFieldOptionalUUID.cpp", "src/Backups/SettingsFieldOptionalUUID.h", "src/Interpreters/Context.cpp", "tests/integration/test_backup_restore_on_cluster/configs/disallow_concurrency.xml", "tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py"] | Introduce a server setting to disallow concurrently running backups. | > (you don't have to strictly follow this form)
**Use case**
Sometimes, for really sophisticated scenarios it can be hard to control the amount of in-progress backups run externally. For the purpose of simpler control we can introduce server-level setting which disallows running concurrent backups of any type.
Something like this in `config.xml` (enabled by default):
`<allow_concurrent_backups>true</allow_concurrent_backups>`
**Describe the solution you'd like**
It's important that backups can be executed in distributed way on multiple servers. Need to take it into account.
**Describe alternatives you've considered**
External check of `system.backups` table, but it can be complex.
| https://github.com/ClickHouse/ClickHouse/issues/43891 | https://github.com/ClickHouse/ClickHouse/pull/45072 | c7d12564cbf9d7c8e06c08581ce154a4cf95380c | 6aa63414db7a8da40947be9f7f3cad646f920132 | "2022-12-02T15:02:16Z" | c++ | "2023-01-20T08:17:20Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,806 | ["docs/en/operations/server-configuration-parameters/settings.md"] | Prometheus http endpoint | Hello.
Follow this doc [https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#server_configuration_parameters-prometheus](url) I enabled prometheus http endpoint.
But, it listens only on localhost, so I can't export metrics to external prometheus server.
Is it possible to change listen address for this endpoint from 127.0.0.1 to something like 0.0.0.0 ?
Thank you. | https://github.com/ClickHouse/ClickHouse/issues/43806 | https://github.com/ClickHouse/ClickHouse/pull/49353 | 49a7eb71a79544dcd23b405af71f7481183745e2 | 7902a1415eac73393388969cbc8cd8e4f3888219 | "2022-11-29T15:04:26Z" | c++ | "2023-05-01T13:24:38Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,800 | ["src/Storages/FileLog/ReadBufferFromFileLog.h", "src/Storages/FileLog/StorageFileLog.cpp", "src/Storages/FileLog/StorageFileLog.h", "tests/queries/0_stateless/02022_storage_filelog_one_file.sh", "tests/queries/0_stateless/02023_storage_filelog.sh", "tests/queries/0_stateless/02025_storage_filelog_virtual_col.sh", "tests/queries/0_stateless/02026_storage_filelog_largefile.sh"] | BC check: `StorageFileLog`: Read meta file failed | ```
2022.11.28 23:39:57.139031 [ 295613 ] {} <Error> DB::StorageFileLog::StorageFileLog(const DB::StorageID &, DB::ContextPtr, const DB::ColumnsDescription &, const DB::String &, const DB::String &, const DB::String &, std::unique_ptr<FileLogSettings>, const DB::String &, bool): Code: 33. DB::Exception: Read meta file data/test_13/file_log/metadata/test17.csv failed. (CANNOT_READ_ALL_DATA), Stack trace (when copying this message, always include the lines below):
```
https://s3.amazonaws.com/clickhouse-test-reports/43675/0342e6b2361b0f3c78af2ad7a5238d63c69add16/stress_test__asan_.html
cc: @ucasfl, @kssenii
| https://github.com/ClickHouse/ClickHouse/issues/43800 | https://github.com/ClickHouse/ClickHouse/pull/43826 | 371e85d854281d78c23f76d6d09cbe25b2dad4fa | a4525bb98fbba22d6edac138e4c69dc3d1648e13 | "2022-11-29T13:36:09Z" | c++ | "2022-12-13T13:14:42Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,755 | ["docs/en/sql-reference/functions/type-conversion-functions.md", "src/Functions/parseDateTime.cpp", "tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference", "tests/queries/0_stateless/02668_parse_datetime.reference", "tests/queries/0_stateless/02668_parse_datetime.sql", "tests/queries/0_stateless/02668_parse_datetime_in_joda_syntax.reference", "tests/queries/0_stateless/02668_parse_datetime_in_joda_syntax.sql"] | MySQL dialect parity: str_to_date | > (you don't have to strictly follow this form)
**Use case**
We are using ClickHouse as a pseudo-MySQL data source for the QuickSight dashboard.
When using calculated columns which convert strings and dates, QuickSight issues queries with MySQL's [str_to_date](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_str-to-date) function.
**Describe the solution you'd like**
Support built-in `str_to_date` function OOTB
**Describe alternatives you've considered**
As a workaround, customer mocks this function like this, but we don't know what unintended consequences could arise.
```sql
create or replace function str_to_date as (s1,s2) -> parseDateTimeBestEffort(s1);
```
| https://github.com/ClickHouse/ClickHouse/issues/43755 | https://github.com/ClickHouse/ClickHouse/pull/48000 | 954c1abc84d9793fc31cf39afd53a23b56ffe382 | 7cf494acc20daff02b1983d3b04d4b576c22f616 | "2022-11-28T13:58:24Z" | c++ | "2023-03-28T08:04:56Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,740 | ["docs/en/engines/table-engines/special/join.md", "docs/en/engines/table-engines/special/set.md", "docs/en/operations/settings/settings.md"] | Documentation is wrong | https://clickhouse.com/docs/en/operations/settings/settings#persistent
The "persistent" setting in the documentation does not appear in system.settings table
Also, if you add it con users.xml, the server does not start.
```
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>
<persistent>1</persistent>
</default>
</profiles>
</clickhouse>
```
If the SET/JOIN tables are supposed to be always in RAM, which is the purpose of persist them on disk?
| https://github.com/ClickHouse/ClickHouse/issues/43740 | https://github.com/ClickHouse/ClickHouse/pull/45004 | 758c98e83245d5ed2fb5963cb03df256f02bb5d8 | 7741ce549f40638eeff3ab42fd7b4f30851eb0de | "2022-11-28T00:26:56Z" | c++ | "2023-01-07T22:28:40Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,605 | ["docs/en/sql-reference/functions/other-functions.md"] | Catboost clickhouse-library-bridge is not responding | After upgrade ClickHouse, I try to repair my queries with `modelEvaluate` function.
I configured and try to use `catboostEvaluate` like in docs:
https://clickhouse.com/docs/en/sql-reference/functions/other-functions/#catboostevaluatepath_to_model-feature_1-feature_2--feature_n
But get a problem with:
```
2022.11.24 10:16:49.734036 [ 1197 ] {9cac98b6-cb80-4a36-bc2b-5190f060a4fa} <Error> DynamicQueryHandler: Code: 410. DB::Exception: BridgeHelper: clickhouse-library-bridge is not responding: While processing catboostEvaluate('/etc/clickhouse-server/models/catboost_model_1b9ab50eedbe41a5be64a3a224eda68c.cbm', if((toFloat64(cred_sum_overdue_75p_all) IS NULL) OR isInfinite(toFloat64(cred_sum_overdue_75p_all)), nan, toFloat64(cred_sum_overdue_75p_all)), if((toFloat64(no_deep_dpd_without_card_1y_rate) IS NULL) OR isInfinite(toFloat64(no_deep_dpd_without_card_1y_rate)), nan, toFloat64(no_deep_dpd_without_card_1y_rate)), if((toFloat64(amount_outstanding_min_other) IS NULL) OR isInfinite(toFloat64(amount_outstanding_min_other)), nan, toFloat64(amount_outstanding_min_other)), if((toFloat64(es_potential_monthly_instalments) IS NULL) OR isInfinite(toFloat64(es_potential_monthly_instalments)), nan, toFloat64(es_potential_monthly_instalments)), if((toFloat64(amount_outstanding_count_other) IS NULL) OR isInfinite(toFloat64(amount_outstanding_count_other)), nan, toFloat64(amount_outstanding_count_other)), if((toFloat64(bor_data_sex) IS NULL) OR isInfinite(toFloat64(bor_data_sex)), nan, toFloat64(bor_data_sex)), if((toFloat64(credit_life_2_term_without_card_3m_75p) IS NULL) OR isInfinite(toFloat64(credit_life_2_term_without_card_3m_75p)), nan, toFloat64(credit_life_2_term_without_card_3m_75p)), if((toFloat64(credit_life_2_term_without_card_3m_95p) IS NULL) OR isInfinite(toFloat64(credit_life_2_term_without_card_3m_95p)), nan, toFloat64(credit_life_2_term_without_card_3m_95p)), if((toFloat64(credit_life_2_term_75p) IS NULL) OR isInfinite(toFloat64(credit_life_2_term_75p)), nan, toFloat64(credit_life_2_term_75p)), if((toFloat64(amount_outstanding_75p_all) IS NULL) OR isInfinite(toFloat64(amount_outstanding_75p_all)), nan, toFloat64(amount_outstanding_75p_all)), if((toFloat64(credit_without_card_3m_1y_rate) IS NULL) OR isInfinite(toFloat64(credit_without_card_3m_1y_rate)), nan, toFloat64(credit_without_card_3m_1y_rate)), if((toFloat64(days_last_close_date_pdl_without_card_min) IS NULL) OR isInfinite(toFloat64(days_last_close_date_pdl_without_card_min)), nan, toFloat64(days_last_close_date_pdl_without_card_min)), if((toFloat64(bor_pti) IS NULL) OR isInfinite(toFloat64(bor_pti)), nan, toFloat64(bor_pti)), if((toFloat64(nbch_credit_count_rate) IS NULL) OR isInfinite(toFloat64(nbch_credit_count_rate)), nan, toFloat64(nbch_credit_count_rate)), if((toFloat64(current_days_past_75p_max) IS NULL) OR isInfinite(toFloat64(current_days_past_75p_max)), nan, toFloat64(current_days_past_75p_max)), if((toFloat64(closed_pdl_cred_sum_without_card_sum) IS NULL) OR isInfinite(toFloat64(closed_pdl_cred_sum_without_card_sum)), nan, toFloat64(closed_pdl_cred_sum_without_card_sum)), if((toFloat64(max_days_past_due_without_card_6m_95p) IS NULL) OR isInfinite(toFloat64(max_days_past_due_without_card_6m_95p)), nan, toFloat64(max_days_past_due_without_card_6m_95p)), if((toFloat64(active_overdue_2_sum_without_card_max) IS NULL) OR isInfinite(toFloat64(active_overdue_2_sum_without_card_max)), nan, toFloat64(active_overdue_2_sum_without_card_max)), if((toFloat64(es_current_30_ind) IS NULL) OR isInfinite(toFloat64(es_current_30_ind)), nan, toFloat64(es_current_30_ind)), if((toFloat64(credit_life_2_term_il_without_card_1y_avg) IS NULL) OR isInfinite(toFloat64(credit_life_2_term_il_without_card_1y_avg)), nan, toFloat64(credit_life_2_term_il_without_card_1y_avg)), if((toFloat64(credit_life_2_term_pdl_without_card_6m_avg) IS NULL) OR isInfinite(toFloat64(credit_life_2_term_pdl_without_card_6m_avg)), nan, toFloat64(credit_life_2_term_pdl_without_card_6m_avg)), if((toFloat64(from_open_2_open_avg_all) IS NULL) OR isInfinite(toFloat64(from_open_2_open_avg_all)), nan, toFloat64(from_open_2_open_avg_all)), if((toFloat64(es_interest3to12) IS NULL) OR isInfinite(toFloat64(es_interest3to12)), nan, toFloat64(es_interest3to12)), if((toFloat64(credit_sum_all) IS NULL) OR isInfinite(toFloat64(credit_sum_all)), nan, toFloat64(credit_sum_all)), if((toFloat64(nodpd_without_card_6m_rate) IS NULL) OR isInfinite(toFloat64(nodpd_without_card_6m_rate)), nan, toFloat64(nodpd_without_card_6m_rate)), if((toFloat64(es_interest1to12) IS NULL) OR isInfinite(toFloat64(es_interest1to12)), nan, toFloat64(es_interest1to12)), if((toFloat64(credit_life_sum) IS NULL) OR isInfinite(toFloat64(credit_life_sum)), nan, toFloat64(credit_life_sum)), if((toFloat64(bor_data_payments_loans) IS NULL) OR isInfinite(toFloat64(bor_data_payments_loans)), nan, toFloat64(bor_data_payments_loans)), if((toFloat64(max_days_past_due_without_card_1y_max) IS NULL) OR isInfinite(toFloat64(max_days_past_due_without_card_1y_max)), nan, toFloat64(max_days_past_due_without_card_1y_max)), ifNull(bor_data_post, '__MISSING__')) AS prediction, 1. / (1 + exp(-prediction)) AS probability, round(probability * 1000) AS score, credit_id, cred_sum_overdue_75p_all, no_deep_dpd_without_card_1y_rate, amount_outstanding_min_other, es_potential_monthly_instalments, amount_outstanding_count_other, bor_data_sex, credit_life_2_term_without_card_3m_75p, credit_life_2_term_without_card_3m_95p, credit_life_2_term_75p, bor_data_post, amount_outstanding_75p_all, credit_without_card_3m_1y_rate, days_last_close_date_pdl_without_card_min, bor_pti, nbch_credit_count_rate, current_days_past_75p_max, closed_pdl_cred_sum_without_card_sum, max_days_past_due_without_card_6m_95p, active_overdue_2_sum_without_card_max, es_current_30_ind, credit_life_2_term_il_without_card_1y_avg, credit_life_2_term_pdl_without_card_6m_avg, from_open_2_open_avg_all, es_interest3to12, credit_sum_all, nodpd_without_card_6m_rate, es_interest1to12, credit_life_sum, bor_data_payments_loans, max_days_past_due_without_card_1y_max. (EXTERNAL_SERVER_IS_NOT_RESPONDING), Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xce3a81a in /usr/bin/clickhouse
1. DB::IBridgeHelper::startBridgeSync() @ 0x1346ba29 in /usr/bin/clickhouse
2. DB::CatBoostLibraryBridgeHelper::getTreeCount() @ 0x134639b6 in /usr/bin/clickhouse
3. ? @ 0x9ab58c7 in /usr/bin/clickhouse
4. DB::IFunctionOverloadResolver::getReturnTypeWithoutLowCardinality(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x114675ea in /usr/bin/clickhouse
5. DB::IFunctionOverloadResolver::getReturnType(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x1146728d in /usr/bin/clickhouse
6. DB::IFunctionOverloadResolver::build(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x11467ed6 in /usr/bin/clickhouse
7. DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node const*, std::__1::allocator<DB::ActionsDAG::Node const*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x11b57c11 in /usr/bin/clickhouse
8. DB::ScopeStack::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1203cd8d in /usr/bin/clickhouse
9. ? @ 0x1204788f in /usr/bin/clickhouse
10. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x12042743 in /usr/bin/clickhouse
11. DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x12045638 in /usr/bin/clickhouse
12. ? @ 0x1200549c in /usr/bin/clickhouse
13. DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) @ 0x1200523e in /usr/bin/clickhouse
14. DB::SelectQueryExpressionAnalyzer::appendSelect(DB::ExpressionActionsChain&, bool) @ 0x12014825 in /usr/bin/clickhouse
15. DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterDAGInfo> const&, std::__1::shared_ptr<DB::FilterDAGInfo> const&, DB::Block const&) @ 0x12019b41 in /usr/bin/clickhouse
16. DB::InterpreterSelectQuery::getSampleBlockImpl() @ 0x125d55a3 in /usr/bin/clickhouse
17. ? @ 0x125cdcf5 in /usr/bin/clickhouse
18. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::PreparedSets>) @ 0x125c8a40 in /usr/bin/clickhouse
19. DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::__1::shared_ptr<DB::IAST> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x126626c2 in /usr/bin/clickhouse
20. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context>, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x12660440 in /usr/bin/clickhouse
21. DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>, DB::SelectQueryOptions const&) @ 0x12587afe in /usr/bin/clickhouse
22. ? @ 0x1296a3a0 in /usr/bin/clickhouse
23. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::__1::shared_ptr<DB::Context>, std::__1::function<void (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>, std::__1::optional<DB::FormatSettings> const&) @ 0x1296f98e in /usr/bin/clickhouse
24. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::__1::optional<DB::CurrentThread::QueryScope>&) @ 0x134ca797 in /usr/bin/clickhouse
25. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x134cebb0 in /usr/bin/clickhouse
26. DB::HTTPServerConnection::run() @ 0x1354c1aa in /usr/bin/clickhouse
27. Poco::Net::TCPServerConnection::start() @ 0x1635308f in /usr/bin/clickhouse
28. Poco::Net::TCPServerDispatcher::run() @ 0x1635541b in /usr/bin/clickhouse
29. Poco::PooledThread::run() @ 0x16510cb2 in /usr/bin/clickhouse
30. Poco::ThreadImpl::runnableEntry(void*) @ 0x1650e43d in /usr/bin/clickhouse
31. ? @ 0x7f3e10c4f609 in ?
(version 22.10.3.27 (official build))
```
Is it need to somehow configure `clickhouse-library-bridge` and setup it? Doesnt found information about it((
Also this **Backward Incompatible Change** not mentioned in changelog at all, please add it! | https://github.com/ClickHouse/ClickHouse/issues/43605 | https://github.com/ClickHouse/ClickHouse/pull/43875 | 68ac76d60e5c8d8719740476568bfc5cc4797b06 | eba7dd58262db14493fd9f3e4eb8d719c91ad034 | "2022-11-24T10:46:29Z" | c++ | "2022-12-02T12:53:33Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,570 | ["src/Interpreters/PartLog.cpp", "src/Interpreters/PartLog.h", "src/Storages/MergeTree/MergeTreeData.cpp", "tests/queries/0_stateless/02491_part_log_has_table_uuid.reference", "tests/queries/0_stateless/02491_part_log_has_table_uuid.sql"] | 02491_part_log_has_table_uuid flacky | Statistics
https://play.clickhouse.com/play?user=play#c2VsZWN0IAp0b1N0YXJ0T2ZIb3VyKGNoZWNrX3N0YXJ0X3RpbWUpIGFzIGQsCmNvdW50KCksICBncm91cFVuaXFBcnJheShwdWxsX3JlcXVlc3RfbnVtYmVyKSwgIGFueShyZXBvcnRfdXJsKQpmcm9tIGNoZWNrcyB3aGVyZSAnMjAyMi0wNi0wMScgPD0gY2hlY2tfc3RhcnRfdGltZSBhbmQgdGVzdF9uYW1lIGxpa2UgJyUwMjQ5MV9wYXJ0X2xvZ19oYXNfdGFibGVfdXVpZCUnIGFuZCB0ZXN0X3N0YXR1cyBpbiAoJ0ZBSUwnLCAnRkxBS1knKSBncm91cCBieSBkIG9yZGVyIGJ5IGQgZGVzYw==
Some times there are not output from requests. | https://github.com/ClickHouse/ClickHouse/issues/43570 | https://github.com/ClickHouse/ClickHouse/pull/43595 | a3276005c75425dd13500ddfaaf4c57cf6aabfe6 | f35aa891d2c6bdce463d2e17d352bb4547635dfe | "2022-11-23T13:33:29Z" | c++ | "2022-11-28T11:02:44Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,558 | ["src/Interpreters/InterpreterInsertQuery.cpp", "src/Interpreters/InterpreterSelectQueryAnalyzer.cpp", "src/Interpreters/InterpreterSelectQueryAnalyzer.h", "tests/queries/0_stateless/02501_analyzer_expired_context_crash_fix.reference", "tests/queries/0_stateless/02501_analyzer_expired_context_crash_fix.sql", "tests/queries/0_stateless/02502_analyzer_insert_select_crash_fix.reference", "tests/queries/0_stateless/02502_analyzer_insert_select_crash_fix.sql"] | `Context has expired` while using new analyzer and optimize_aggregation_in_order | https://s3.amazonaws.com/clickhouse-test-reports/42033/ebdfbf43db5e5eacaff81b4a3dd55c5a285ee025/fuzzer_astfuzzerasan//report.html
How to reproduce:
```
:) create table data_02295 (b Int64, a Int64, grp_aggreg AggregateFunction(groupArrayArray, Array(UInt64))) engine = MergeTree() order by a;
:) set allow_experimental_analyzer=1;
:) SELECT grp_aggreg FROM data_02295 WHERE JSONLength(grp_aggreg, 100, NULL) SETTINGS optimize_aggregation_in_order = 1;
```
CC: @kitaisreal | https://github.com/ClickHouse/ClickHouse/issues/43558 | https://github.com/ClickHouse/ClickHouse/pull/44234 | f0fda580d0d498744be42ab3aa3633ff549f7f12 | 6594aa8f1ede867e5a116e24fdf32271df8d7029 | "2022-11-23T12:42:07Z" | c++ | "2023-01-21T15:49:50Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,544 | ["src/Storages/MergeTree/MergeTreeData.cpp", "tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.reference", "tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.sh", "tests/queries/0_stateless/02286_drop_filesystem_cache.sh"] | Test `00933_test_fix_extra_seek_on_compressed_cache` is flaky | Example: https://s3.amazonaws.com/clickhouse-test-reports/0/481b9face12511b559ef021e1b032427547dabd7/stateless_tests__asan_.html
https://play.clickhouse.com/play?user=play#c2VsZWN0IAp0b1N0YXJ0T2ZEYXkoY2hlY2tfc3RhcnRfdGltZSkgYXMgZCwKY291bnQoKSwgIGdyb3VwVW5pcUFycmF5KHB1bGxfcmVxdWVzdF9udW1iZXIpLCAgYW55KHJlcG9ydF91cmwpCmZyb20gY2hlY2tzIHdoZXJlICcyMDIyLTA2LTAxJyA8PSBjaGVja19zdGFydF90aW1lIGFuZCB0ZXN0X25hbWUgbGlrZSAnJTAwOTMzX3Rlc3RfZml4X2V4dHJhX3NlZWtfb25fY29tcHJlc3NlZF9jYWNoZSUnIGFuZCB0ZXN0X3N0YXR1cyBpbiAoJ0ZBSUwnLCAnRkxBS1knKSBncm91cCBieSBkIG9yZGVyIGJ5IGQgZGVzYw==
It's interesting that in release branches and backport PRs it fail much more often than in master and ordinary PRs | https://github.com/ClickHouse/ClickHouse/issues/43544 | https://github.com/ClickHouse/ClickHouse/pull/47490 | 8e228187d5a4b18c669d4f0c95ec8fb09f25b1e1 | 956ef6bd2133ce93524734a1158483c4ecb185c9 | "2022-11-23T11:22:17Z" | c++ | "2023-03-12T15:25:31Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,534 | ["src/Storages/StorageS3Cluster.cpp", "tests/queries/0_stateless/01801_s3_cluster_count.reference", "tests/queries/0_stateless/01801_s3_cluster_count.sql"] | s3Cluster function returns NOT_FOUND_COLUMN_IN_BLOCK error | (you don't have to strictly follow this form)
**Describe the unexpected behaviour**
We are seeing errors like
```
Received exception from server (version 22.10.2):
Code: 10. DB::Exception: Received from localhost:9000. DB::Exception: Not found column count() in block. There are only columns: COUNT(): While executing Remote. (NOT_FOUND_COLUMN_IN_BLOCK)
```
when trying to use **s3Cluster** function to query data using queries like: ```SELECT COUNT(*) FROM s3Cluster('cluster', 'https://...', ...)```
However **s3** function works fine.
* Which ClickHouse server version to use
22.11 and 22.10 are seeing this issue.
**Expected behavior**
Expected s3Cluster function runs successfully.
**Error message and/or stacktrace**
See description.
**Additional context**
N/A | https://github.com/ClickHouse/ClickHouse/issues/43534 | https://github.com/ClickHouse/ClickHouse/pull/43629 | e1f7f047528f8af81273f75869707c66aa4d5ca2 | b6eddbac0dcd52e45701905b22cef69759171e76 | "2022-11-23T07:54:26Z" | c++ | "2022-12-02T14:43:29Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,524 | ["src/Analyzer/Passes/UniqInjectiveFunctionsEliminationPass.cpp", "tests/queries/0_stateless/02493_analyzer_uniq_injective_functions_elimination.reference", "tests/queries/0_stateless/02493_analyzer_uniq_injective_functions_elimination.sql"] | Experimental Analyzer: wrong analysis of tuples. | **Describe the bug**
https://s3.amazonaws.com/clickhouse-test-reports/43308/9ecda9f45c911047e04e8a089741a19ee49fe16a/fuzzer_astfuzzerubsan//report.html
**How to reproduce**
```
milovidov-desktop :) SET allow_experimental_analyzer = 1
SET allow_experimental_analyzer = 1
Query id: 16b87806-ef86-4541-8632-b85496fe92fb
Ok.
0 rows in set. Elapsed: 0.000 sec.
milovidov-desktop :) SELECT uniqCombined(tuple('')) FROM numbers(1.)
SELECT uniqCombined(tuple(''))
FROM numbers(1.)
Query id: f2027937-5fbc-4e47-b1b3-4b224e3a0495
Aborted (core dumped)
```
| https://github.com/ClickHouse/ClickHouse/issues/43524 | https://github.com/ClickHouse/ClickHouse/pull/43547 | 4081a5f9e940beda18b3585537fadb8d767e62d3 | fbb404a4c6e1a798ddc0d34f5f5d8c48c14b40f9 | "2022-11-22T19:15:05Z" | c++ | "2022-11-25T10:14:33Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,510 | ["src/Functions/FunctionsConversion.h", "tests/queries/0_stateless/02481_pk_analysis_with_enum_to_string.reference", "tests/queries/0_stateless/02481_pk_analysis_with_enum_to_string.sql"] | Enum toString cannot be filtered by IN properly | These two queries are expected to be the same result (dataset = https://play.clickhouse.com/play?user=play), but actually _not_:
```sql
SELECT actor_login,
created_at,
toString(event_type) AS event_type,
toString(action) AS action, number,
merged_at
FROM github_events
WHERE repo_name = 'apache/pulsar'
AND event_type IN
('PullRequestEvent'
, 'PullRequestReviewCommentEvent'
, 'PullRequestReviewEvent'
, 'IssueCommentEvent')
AND actor_login NOT IN ('github-actions[bot]'
, 'codecov-commenter')
AND number = 9276
```
gives:
<img width="1726" alt="image" src="https://user-images.githubusercontent.com/18818196/203365958-a7379e4d-a14d-4544-a36d-09c1bb8783be.png">
```sql
SELECT actor_login,
created_at,
toString(event_type) AS event_type,
toString(action) AS action, number,
merged_at
FROM github_events
WHERE repo_name = 'apache/pulsar'
AND multiMatchAny(event_type,
['PullRequestEvent'
, 'PullRequestReviewCommentEvent'
, 'PullRequestReviewEvent'
, 'IssueCommentEvent'])
AND actor_login NOT IN ('github-actions[bot]'
, 'codecov-commenter')
AND number = 9276
```
gives:
<img width="1713" alt="image" src="https://user-images.githubusercontent.com/18818196/203366295-d6d6d55a-03f9-4be4-bb86-ab9dfc0849c6.png">
The latter is expected.
cc @alexey-milovidov | https://github.com/ClickHouse/ClickHouse/issues/43510 | https://github.com/ClickHouse/ClickHouse/pull/43596 | 88c338c0909eb55fce455248a8757a482a900690 | dc7742e8f9babe5bf6f1ad3e038efc665309ceb9 | "2022-11-22T16:19:39Z" | c++ | "2022-11-25T21:15:38Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,426 | ["src/Common/ThreadFuzzer.cpp"] | ASan binaries does not work with glibc 2.36 | Tested with the following docker images:
- debian:testing
- archlinux
```sh
$ ASAN_SYMBOLIZER_PATH=/bin/llvm-symbolizer ./clickhouse-asan
AddressSanitizer:DEADLYSIGNAL
=================================================================
==17112==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000000000 bp 0x7fffffffdfd0 sp 0x7fffffffdfb8 T0)
==17112==Hint: pc points to the zero page.
==17112==The signal is caused by a READ memory access.
==17112==Hint: address points to the zero page.
#0 0x0 (<unknown module>)
#1 0x42a8a0a2 in std::__1::__libcpp_mutex_lock[abi:v15003](pthread_mutex_t*) build_docker/../contrib/libcxx/include/__threading_support:304:10
#2 0x42a8a0a2 in __cxxabiv1::(anonymous namespace)::LibcppMutex::lock() build_docker/../contrib/libcxxabi/src/cxa_guard_impl.h:282:24
#3 0x42a8a0a2 in __cxxabiv1::(anonymous namespace)::InitByteGlobalMutex<__cxxabiv1::(anonymous namespace)::LibcppMutex, __cxxabiv1::(anonymous namespace)::LibcppCondVar, __cxxabiv1::(anonymous namespace)::GlobalStatic<__cxxabiv1::(anonymous namespace)::LibcppMutex>::instance, __cxxabiv1::(anonymous namespace)::GlobalStatic<__cxxabiv1::(anonymous namespace)::LibcppCondVar>::instance, &(__cxxabiv1::(anonymous namespace)::PlatformThreadID())>::LockGuard::LockGuard(char const*) build_docker/../contrib/libcxxabi/src/cxa_guard_impl.h:392:24
#4 0x42a8a0a2 in __cxxabiv1::(anonymous namespace)::InitByteGlobalMutex<__cxxabiv1::(anonymous namespace)::LibcppMutex, __cxxabiv1::(anonymous namespace)::LibcppCondVar, __cxxabiv1::(anonymous namespace)::GlobalStatic<__cxxabiv1::(anonymous namespace)::LibcppMutex>::instance, __cxxabiv1::(anonymous namespace)::GlobalStatic<__cxxabiv1::(anonymous namespace)::LibcppCondVar>::instance, &(__cxxabiv1::(anonymous namespace)::PlatformThreadID())>::acquire() build_docker/../contrib/libcxxabi/src/cxa_guard_impl.h:320:15
#5 0x42a8a0a2 in __cxxabiv1::(anonymous namespace)::GuardObject<__cxxabiv1::(anonymous namespace)::InitByteGlobalMutex<__cxxabiv1::(anonymous namespace)::LibcppMutex, __cxxabiv1::(anonymous namespace)::LibcppCondVar, __cxxabiv1::(anonymous namespace)::GlobalStatic<__cxxabiv1::(anonymous namespace)::LibcppMutex>::instance, __cxxabiv1::(anonymous namespace)::GlobalStatic<__cxxabiv1::(anonymous namespace)::LibcppCondVar>::instance, &(__cxxabiv1::(anonymous namespace)::PlatformThreadID())> >::cxa_guard_acquire() build_docker/../contrib/libcxxabi/src/cxa_guard_impl.h:572:43
#6 0x42a8a0a2 in __cxa_guard_acquire build_docker/../contrib/libcxxabi/src/cxa_guard.cpp:39:31
#7 0x4293c574 in std::__1::ios_base::Init::Init() build_docker/../contrib/libcxx/src/iostream.cpp:157:5
#8 0x4293c574 in __cxx_global_var_init build_docker/../contrib/libcxx/src/iostream_init.h:2:31
#9 0x4293c574 in _GLOBAL__I_000100 build_docker/../contrib/libcxx/src/iostream.cpp
#10 0x42a9928c in __libc_csu_init (/work1/azat/ch/tmp/upstream/clickhouse-asan+0x42a9928c) (BuildId: 6ea6d1a5d2d5a164f60f0fd8230936305bc8d9d0)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (<unknown module>)
==17112==ABORTING
```
I've checked the simplest binary and it works.
I've also tested with glibc 2.31, 2.35 and clickhouse binaries works there. | https://github.com/ClickHouse/ClickHouse/issues/43426 | https://github.com/ClickHouse/ClickHouse/pull/44811 | ee31da9e1e4eaec79f5967249f424ce9105110bc | 62a8de34cc964e3fe8dd8f1e88ec78a543917580 | "2022-11-21T09:57:34Z" | c++ | "2023-01-23T20:57:20Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,421 | ["src/Storages/StorageLog.cpp", "src/Storages/StorageLogSettings.cpp", "src/Storages/StorageLogSettings.h", "src/Storages/StorageStripeLog.cpp", "tests/queries/0_stateless/02554_log_faminy_support_storage_policy.reference", "tests/queries/0_stateless/02554_log_faminy_support_storage_policy.sql"] | Storage policies don't work for `StripeLog` table engine at all | https://pastila.nl/?00ad7b6b/de8e258f58c3483bb8028a627d636398 | https://github.com/ClickHouse/ClickHouse/issues/43421 | https://github.com/ClickHouse/ClickHouse/pull/46044 | 91bbcde97e7e63182e4209d94dd4235a8f0145a4 | 187f7482e15183d35593797183ed499c7eea1145 | "2022-11-21T09:19:43Z" | c++ | "2023-02-16T11:09:47Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,397 | ["src/Interpreters/TreeOptimizer.cpp", "src/Interpreters/TreeOptimizer.h", "src/Interpreters/TreeRewriter.cpp", "tests/queries/0_stateless/02494_optimize_group_by_function_keys_and_alias_columns.reference", "tests/queries/0_stateless/02494_optimize_group_by_function_keys_and_alias_columns.sql"] | NOT_FOUND_COLUMN_IN_BLOCK when grouping by ALIAS column in Distributed table | On a distributed table with columns `timestamp DateTime, day ALIAS toYYYYMMDD(timestamp)`, grouping by **both** columns results in a `DB::Exception: Not found column toYYYYMMDD(timestamp) in block. (NOT_FOUND_COLUMN_IN_BLOCK)`
Could this be related to https://github.com/ClickHouse/ClickHouse/issues/37032 ?
**How to reproduce**
I was only able to reproduce this on distributed table in a real cluster with remote shards.
Here is a minimal reproducer, I used '{cluster}' as a placeholder:
```sql
CREATE DATABASE test ON cluster '{cluster}';
CREATE TABLE test.t ON cluster '{cluster}' (
`timestamp` DateTime NOT NULL,
`day` ALIAS toYYYYMMDD(`timestamp`)
) Engine = MergeTree
PARTITION BY toYYYYMMDD(timestamp)
ORDER BY `timestamp`;
CREATE TABLE test.d ON CLUSTER '{cluster}'
(
`timestamp` DateTime NOT NULL,
`day` ALIAS toYYYYMMDD(timestamp)
)
ENGINE = Distributed('{cluster}', 'test', 't', rand());
INSERT INTO test.d (timestamp) VALUES (now()), (now() - INTERVAL 1 DAY), (now() + INTERVAL 1 DAY), (now() - INTERVAL 2 DAY), (now() + INTERVAL 2 DAY);
INSERT INTO test.d (timestamp) VALUES (now()), (now() - INTERVAL 1 DAY), (now() + INTERVAL 1 DAY), (now() - INTERVAL 2 DAY), (now() + INTERVAL 2 DAY);
INSERT INTO test.d (timestamp) VALUES (now()), (now() - INTERVAL 1 DAY), (now() + INTERVAL 1 DAY), (now() - INTERVAL 2 DAY), (now() + INTERVAL 2 DAY);
SELECT day, timestamp FROM test.d GROUP BY day, timestamp;
-- Code: 10. DB::Exception: Received from clickhouse-0:9440. DB::Exception: Not found column toYYYYMMDD(timestamp) in block. (NOT_FOUND_COLUMN_IN_BLOCK)
```
**Error message**
```
2022.11.19 14:26:09.333361 [ 288 ] {ae8c95e8-9bc9-4b75-87b5-238d5e3cbe2a} <Debug> executeQuery: (from [::ffff:10.10.20.173]:58860, user: admin) SELECT `day`, `timestamp` FROM test.d GROUP BY `day`, `timestamp`; (stage: Complete)
2022.11.19 14:26:09.334235 [ 288 ] {ae8c95e8-9bc9-4b75-87b5-238d5e3cbe2a} <Error> executeQuery: Code: 10. DB::Exception: Not found column toYYYYMMDD(timestamp) in block. (NOT_FOUND_COLUMN_IN_BLOCK) (version 22.8.7.34 (official build)) (from [::ffff:10.10.20.173]:58860) (in query: SELECT `day`, `timestamp` FROM test.d GROUP BY `day`, `timestamp`;), Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa3ebcda in /usr/bin/clickhouse
1. DB::Exception::Exception<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(int, fmt::v8::basic_format_string<char, fmt::v8::type_identity<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>::type>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xa425cd8 in /usr/bin/clickhouse
2. DB::ActionsDAG::updateHeader(DB::Block) const @ 0x146054f5 in /usr/bin/clickhouse
3. DB::ExpressionTransform::transformHeader(DB::Block, DB::ActionsDAG const&) @ 0x15e9ad05 in /usr/bin/clickhouse
4. DB::ExpressionStep::ExpressionStep(DB::DataStream const&, std::__1::shared_ptr<DB::ActionsDAG> const&) @ 0x15fca2ff in /usr/bin/clickhouse
5. DB::InterpreterSelectQuery::executeProjection(DB::QueryPlan&, std::__1::shared_ptr<DB::ActionsDAG> const&) @ 0x14e3c985 in /usr/bin/clickhouse
6. DB::InterpreterSelectQuery::executeImpl(DB::QueryPlan&, std::__1::optional<DB::Pipe>) @ 0x14e2be79 in /usr/bin/clickhouse
7. DB::InterpreterSelectQuery::buildQueryPlan(DB::QueryPlan&) @ 0x14e28032 in /usr/bin/clickhouse
8. DB::InterpreterSelectWithUnionQuery::buildQueryPlan(DB::QueryPlan&) @ 0x14e6e4f4 in /usr/bin/clickhouse
9. DB::InterpreterSelectWithUnionQuery::execute() @ 0x14e6f4ad in /usr/bin/clickhouse
10. ? @ 0x15160189 in /usr/bin/clickhouse
11. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x1515d6b7 in /usr/bin/clickhouse
12. DB::TCPHandler::runImpl() @ 0x15c5552c in /usr/bin/clickhouse
13. DB::TCPHandler::run() @ 0x15c69b39 in /usr/bin/clickhouse
14. Poco::Net::TCPServerConnection::start() @ 0x189d3673 in /usr/bin/clickhouse
15. Poco::Net::TCPServerDispatcher::run() @ 0x189d49cd in /usr/bin/clickhouse
16. Poco::PooledThread::run() @ 0x18b97329 in /usr/bin/clickhouse
17. Poco::ThreadImpl::runnableEntry(void*) @ 0x18b94be2 in /usr/bin/clickhouse
18. ? @ 0x7f86015ed609 in ?
19. clone @ 0x7f8601512133 in ?
```
**Does it reproduce on recent release?**
I was able to reproduce on 22.3.9.19 and 22.8.7.34
**Expected behavior**
The query should run and return something like
```
┌──────day─┬───────────timestamp─┐
│ 20221117 │ 2022-11-17 11:08:32 │
│ 20221117 │ 2022-11-17 11:08:33 │
│ 20221117 │ 2022-11-17 11:08:42 │
│ 20221118 │ 2022-11-18 11:08:42 │
│ 20221119 │ 2022-11-19 11:07:05 │
│ 20221119 │ 2022-11-19 11:08:42 │
│ 20221120 │ 2022-11-20 11:08:32 │
│ 20221120 │ 2022-11-20 11:08:42 │
│ 20221121 │ 2022-11-21 11:08:30 │
│ 20221121 │ 2022-11-21 11:08:42 │
└──────────┴─────────────────────┘
```
**Additional context**
I was wondering if the expected practice was to have `day` not an ALIAS in the Distributed table:
```sql
DROP TABLE test.d ON cluster '{cluster}';
CREATE TABLE test.d ON CLUSTER '{cluster}'
(
`timestamp` DateTime NOT NULL,
`day` UInt32 -- not an ALIAS
)
ENGINE = Distributed('{cluster}', 'test', 't', rand())
SELECT `day`, `timestamp` FROM test.d GROUP BY `day`, `timestamp`
```
this query returns the result, but weirdly enough, if I add a WHERE clause on `day`, partition pruning does not work correctly in child queries:
```sql
-- check that we have multiple partitions in shards
SELECT _shard_num, partition, rows FROM cluster('{cluster}', 'system', 'parts') WHERE database = 'test' and active
┌─_shard_num─┬─partition─┬─rows─┐
│ 1 │ 20221117 │ 3 │
│ 1 │ 20221118 │ 1 │
│ 1 │ 20221120 │ 1 │
│ 1 │ 20221121 │ 1 │
│ 2 │ 20221118 │ 2 │
│ 2 │ 20221119 │ 1 │
│ 2 │ 20221121 │ 1 │
│ 3 │ 20221117 │ 1 │
│ 3 │ 20221118 │ 1 │
│ 3 │ 20221119 │ 2 │
│ 3 │ 20221120 │ 2 │
│ 3 │ 20221121 │ 1 │
└────────────┴───────────┴──────┘
SELECT `day`, `timestamp` FROM test.d WHERE `day` = toYYYYMMDD(now()) GROUP BY `day`, `timestamp`
-- does not prune partitions
-- executeQuery: (from 10.3.99.139:38996, initial_query_id: 20482271-a023-4546-bcb8-9fb350f01ac7) SELECT `day`, `timestamp` FROM `test`.`t` WHERE `day` = toYYYYMMDD(now()) GROUP BY `day`, `timestamp`
-- (SelectExecutor): Key condition: (toYYYYMMDD(column 0) in [20221119, 20221119])
-- (SelectExecutor): MinMax index condition: unknown
-- (SelectExecutor): Selected 1/1 parts by partition key, 1 parts by primary key, 1/1 marks by primary key, 1 marks to read from 1 ranges
-- (SelectExecutor): Key condition: (toYYYYMMDD(column 0) in [20221119, 20221119])
-- (SelectExecutor): MinMax index condition: unknown
-- (SelectExecutor): Selected 1/1 parts by partition key, 1 parts by primary key, 1/1 marks by primary key, 1 marks to read from 1 ranges
-- (SelectExecutor): Key condition: (toYYYYMMDD(column 0) in [20221119, 20221119])
-- (SelectExecutor): MinMax index condition: unknown
-- (SelectExecutor): Selected 5/5 parts by partition key, 5 parts by primary key, 5/5 marks by primary key, 5 marks to read from 5 ranges
```
is this expected? The same query run only on the local table, excludes non-matching partitions as expected:
```sql
SELECT `day`, `timestamp` FROM test.t WHERE `day` = toYYYYMMDD(now()) GROUP BY `day`, `timestamp`
-- executeQuery: (from [::ffff:10.10.20.173]:46654, user: admin) SELECT `day`, `timestamp` FROM test.t WHERE `day` = toYYYYMMDD(now()) GROUP BY `day`, `timestamp` (stage: Complete)
-- Key condition: (toYYYYMMDD(column 0) in [20221119, 20221119])
-- MinMax index condition: (toYYYYMMDD(column 0) in [20221119, 20221119])
-- Selected 0/4 parts by partition key, 0 parts by primary key, 0/0 marks by primary key, 0 marks to read from 0 ranges
```
I found a workaround for both issues, which is using an Int32 ALIAS day column:
```sql
DROP TABLE test.d ON cluster '{cluster}';
CREATE TABLE test.d ON CLUSTER '{cluster}'
(
`timestamp` DateTime NOT NULL,
`day` Int32 ALIAS toYYYYMMDD(timestamp)
)
ENGINE = Distributed('{cluster}', 'test', 't', rand())
SELECT `day`, `timestamp` FROM test.d WHERE `day` = toYYYYMMDD(now()) GROUP BY `day`, `timestamp`
-- this one makes weird child queries, but runs and filters partitions correctly
-- executeQuery: (from [::ffff:10.10.7.137]:55406, initial_query_id: 72a997a0-edd5-4e37-b76c-bd8c31590778) SELECT _CAST(toYYYYMMDD(`timestamp`), 'Int32') AS `day`, `timestamp` FROM `test`.`t` WHERE `day` = toYYYYMMDD(now()) GROUP BY `day`, `timestamp` (stage: WithMergeableState)
-- Key condition: (_CAST(toYYYYMMDD(column 0)) in [20221119, 20221119])
-- MinMax index condition: (_CAST(toYYYYMMDD(column 0)) in [20221119, 20221119])
-- Selected 1/5 parts by partition key, 1 parts by primary key, 1/1 marks by primary key, 1 marks to read from 1 ranges
┌──────day─┬───────────timestamp─┐
│ 20221119 │ 2022-11-19 11:08:30 │
│ 20221119 │ 2022-11-19 11:08:32 │
│ 20221119 │ 2022-11-19 11:08:42 │
└──────────┴─────────────────────┘
``` | https://github.com/ClickHouse/ClickHouse/issues/43397 | https://github.com/ClickHouse/ClickHouse/pull/43709 | 24940ad5bb61945a57c75fc45e615c9e9b6cd5ce | 488610bd96415bdb8a718135676cb6a665829922 | "2022-11-19T15:29:37Z" | c++ | "2022-11-29T17:22:24Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,377 | ["src/Interpreters/InterpreterSelectQuery.cpp", "tests/queries/1_stateful/00176_distinct_limit_by_limit_bug_43377.reference", "tests/queries/1_stateful/00176_distinct_limit_by_limit_bug_43377.sql"] | Bug: DISTINCT + LIMIT BY + LIMIT | **Describe what's wrong**
Request with `DISTINCT`+`LIMIT BY`+`LIMIT` return less rows than provided in `LIMIT`
**Does it reproduce on recent release?**
22.11
**How to reproduce**
The following query from hits table returns less number of rows then provided in LIMIT
```
SELECT DISTINCT
Title,
SearchPhrase
FROM hits_v1
WHERE (SearchPhrase != '') AND (NOT match(Title, '[а-яА-ЯёЁ]')) AND (NOT match(SearchPhrase, '[а-яА-ЯёЁ]'))
LIMIT 1 BY
Title,
SearchPhrase
LIMIT 10
````
**Expected behavior**
Query returns number of rows provided in `LIMIT`
| https://github.com/ClickHouse/ClickHouse/issues/43377 | https://github.com/ClickHouse/ClickHouse/pull/43410 | a58e10298cdc0fd5eaed6abe5ca07aecddbefa57 | 6ef83f455c7f680dc85e7364ad7449a34648b6c3 | "2022-11-18T18:41:25Z" | c++ | "2022-11-23T11:43:15Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,370 | ["src/Functions/FunctionsConversion.h", "tests/queries/0_stateless/02540_date_column_consistent_insert_behaviour.reference", "tests/queries/0_stateless/02540_date_column_consistent_insert_behaviour.sql"] | toDate conversion does not match Date column conversion | **Describe the unexpected behaviour**
Using `toDate(integer`) returns a different value than inserting the same integer into a Date column.
**How to reproduce**
* Which ClickHouse server version to use
ClickHouse server version 22.8.6 revision 54460
```
clickhouse1 :) select toDate(65535)
SELECT toDate(65535)
Query id: 11870fad-31b0-4822-8d16-05ee9ef7d13e
┌─toDate(65535)─┐
│ 2149-06-06 │
└───────────────┘
clickhouse1 :) create table y (z Date) engine=Memory
CREATE TABLE y
(
`z` Date
)
ENGINE = Memory
Query id: c4436573-c4da-4c22-a48c-401adb935a39
Ok.
0 rows in set. Elapsed: 0.005 sec.
clickhouse1 :) insert into y values (65535)
INSERT INTO y FORMAT Values
Query id: e8d58889-de37-4d51-abfd-107893ace403
Ok.
1 row in set. Elapsed: 0.005 sec.
clickhouse1 :) select * from y
SELECT *
FROM y
Query id: e2bff938-211c-4c05-97f9-3e74bf34261f
┌──────────z─┐
│ 1970-01-01 │
└────────────┘
1 row in set. Elapsed: 0.003 sec.
``` | https://github.com/ClickHouse/ClickHouse/issues/43370 | https://github.com/ClickHouse/ClickHouse/pull/46042 | b5cb3209be5294952bb5264007ea60932b3c3c9f | 19a2fba0b35fff3181821a98f39f92f5197110b5 | "2022-11-18T16:02:52Z" | c++ | "2023-02-10T01:49:28Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,358 | ["src/Common/QueryProfiler.cpp", "src/Common/StringSearcher.h", "src/Common/Volnitsky.h", "src/Functions/HasTokenImpl.h", "src/Functions/hasToken.cpp", "src/Functions/hasTokenCaseInsensitive.cpp", "tests/queries/0_stateless/02809_has_token.reference", "tests/queries/0_stateless/02809_has_token.sql"] | Function hasToken return incorrect result | **Describe the unexpected behaviour**
Function `hasToken` may return wrong result in some cases.
**How to reproduce**
See: [fiddle](https://fiddle.clickhouse.com/781c4a16-0531-4afd-b6ce-1a0b41e62abf)
**Expected behavior**
In the above case, `hasToken` should return 0.
**Additional context**
When the search text size >= min_haystack_size_for_algorithm(default 20000), function `hasToken` use Volnitsky algorithm, with a normal fallback token searcher, these may lead to wrong result sometimes.
Since function `hasToken` treats `ColumnString` as a whole text, so the bug is easily to be reproduced on a normal String column.
Here are some cases I met:
```
:) SELECT path FROM test WHERE hasToken(path, 'quota');
SELECT path
FROM test
WHERE hasToken(path, 'quota')
Query id: 4630e82c-bcf8-48b9-93e1-2927ac155023
┌─path───────────────┐
│ /api/crm/podsquota │
└────────────────────┘
1 rows in set. Elapsed: 0.090 sec. Processed 851.63 thousand rows, 19.91 MB (9.47 million rows/s., 221.49 MB/s.)
:) set preferred_block_size_bytes = 10000;
SET preferred_block_size_bytes = 10000
Query id: a86af3f8-f046-4e9f-ae77-b9cfdae83422
Ok.
0 rows in set. Elapsed: 0.003 sec.
:) SELECT path FROM test WHERE hasToken(path, 'quota');
SELECT path
FROM test
WHERE hasToken(path, 'quota')
Query id: 87d4c33c-a8fd-4061-b230-141a42ba1935
┌─path───────────────┐
│ /api/crm/podsquota │
└────────────────────┘
┌─path───────────────┐
│ /api/crm/podsquota │
└────────────────────┘
2 rows in set. Elapsed: 0.081 sec. Processed 851.63 thousand rows, 19.91 MB (10.45 million rows/s., 244.41 MB/s.)
:) set preferred_block_size_bytes = 100000000;
SET preferred_block_size_bytes = 100000000
Query id: f5377329-20b4-4aba-88f8-61fd59c581b0
Ok.
0 rows in set. Elapsed: 0.003 sec.
:) SELECT path FROM test WHERE hasToken(path, 'quota');
SELECT path
FROM test
WHERE hasToken(path, 'quota')
Query id: bdd9fc6a-6d44-4c8e-bb8a-10f491eb4229
Ok.
0 rows in set. Elapsed: 0.076 sec. Processed 851.63 thousand rows, 19.91 MB (11.24 million rows/s., 262.86 MB/s.)
``` | https://github.com/ClickHouse/ClickHouse/issues/43358 | https://github.com/ClickHouse/ClickHouse/pull/51378 | a7d225561c0d79586419d57f7f42edc95c4864a6 | 583d48edcd3ac1e24c29fe45b4e1056694dde9ef | "2022-11-18T07:27:53Z" | c++ | "2023-07-07T23:22:39Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,333 | ["src/Functions/array/range.cpp", "tests/queries/0_stateless/01408_range_overflow.reference", "tests/queries/0_stateless/01408_range_overflow.sql", "tests/queries/0_stateless/02494_array_function_range.reference", "tests/queries/0_stateless/02494_array_function_range.sql"] | Add support for signed arguments in range() | **Describe the issue**
Allow to call `range()` with Int* data types.
Validate that arguments are positive.
**How to reproduce**
```
SELECT range(CAST('1', 'Int8'), CAST('10', 'Int8'))
Query id: 8710056b-08d9-454d-bb6a-e858b61dc9a3
0 rows in set. Elapsed: 0.081 sec.
Received exception from server (version 22.11.1):
Code: 43. DB::Exception: Received from localhost:9000. DB::Exception: Illegal type Int8 of argument of function range: In scope SELECT range(CAST('1', 'Int8'), CAST('10', 'Int8')). (ILLEGAL_TYPE_OF_ARGUMENT)
```
| https://github.com/ClickHouse/ClickHouse/issues/43333 | https://github.com/ClickHouse/ClickHouse/pull/43733 | 4dcfe3e2166c54fee15d43c77fecc005e6250e34 | 7627786af72a6d5ec3da500fcbe307230842e659 | "2022-11-17T15:49:00Z" | c++ | "2022-12-20T12:56:02Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,290 | ["docs/en/sql-reference/statements/select/from.md"] | Storage ReplicatedMergeTree doesn't support FINAL | > You have to provide the following information whenever possible.
*Description**
*I try to use FINAL keyword on ReplicatedMergeTree and I get:
SQL Error [181] [07000]: Code: 181. DB::Exception: Storage ReplicatedMergeTree doesn't support FINAL. (ILLEGAL_FINAL) (version 22.8.8.3 (official build))
**Does it reproduce on recent release?**
Didn't check
**How to reproduce**
* Which ClickHouse server version to use: 22.8.8.3
* `CREATE TABLE` statements for all tables involved
CREATE TABLE IF NOT EXISTS dema.test (
`test1` LowCardinality(String),
`test2` LowCardinality(String),
`test3` String
) ENGINE ReplicatedMergeTree('/clickhouse/tables/{shard}/dema/test', '{replica}')
ORDER BY (cityHash64(`test1`), `test2`, `test3`);
* Queries to run that lead to unexpected result
select test1, test2, test3 from dema.test final
**Expected behavior**
According to documentation final should be available on ReplicatedMergeTree
**Error message and/or stacktrace**
SQL Error [181] [07000]: Code: 181. DB::Exception: Storage ReplicatedMergeTree doesn't support FINAL. (ILLEGAL_FINAL) (version 22.8.8.3 (official build))
| https://github.com/ClickHouse/ClickHouse/issues/43290 | https://github.com/ClickHouse/ClickHouse/pull/44488 | 99e37b8736bacf611cdb8b2d04aea319a7191852 | 8da98001da6930cbec70ba3934f09a85852946d8 | "2022-11-16T13:43:54Z" | c++ | "2022-12-22T16:30:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,286 | ["tests/ci/cancel_and_rerun_workflow_lambda/Dockerfile", "tests/ci/cancel_and_rerun_workflow_lambda/app.py", "tests/ci/cancel_and_rerun_workflow_lambda/build_and_deploy_archive.sh", "tests/ci/workflow_approve_rerun_lambda/app.py"] | CI/CD: strange workflow stop | see https://github.com/ClickHouse/ClickHouse/actions/runs/3474277872 | https://github.com/ClickHouse/ClickHouse/issues/43286 | https://github.com/ClickHouse/ClickHouse/pull/43295 | 874a1a9d833b50309a965a15bd62682728a790c6 | f4ef20b5e41d1e7c8ca6c644173d520d41f9880c | "2022-11-16T13:06:47Z" | c++ | "2022-11-21T11:03:37Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,257 | ["src/Analyzer/Passes/AggregateFunctionsArithmericOperationsPass.cpp", "tests/queries/0_stateless/02481_optimize_aggregation_arithmetics.reference", "tests/queries/0_stateless/02481_optimize_aggregation_arithmetics.sql"] | Aggregation result is incorrect using new analyzer | Query:
```sql
SELECT round(avg(log(2) * number), 6) AS k FROM numbers(10000000)
GROUP BY (number % 2) * (number % 3), number % 3, number % 2
HAVING avg(log(2) * number) > 3465735.3 ORDER BY k
SETTINGS allow_experimental_analyzer=1, optimize_group_by_function_keys=0;
```
Output:
```
Ok.
0 rows in set. Elapsed: 0.079 sec. Processed 10.01 million rows, 80.06 MB (127.02 million rows/s., 1.02 GB/s.)
```
Query:
```sql
SELECT round(avg(log(2) * number), 6) AS k FROM numbers(10000000)
GROUP BY (number % 2) * (number % 3), number % 3, number % 2
HAVING avg(log(2) * number) > 3465735.3 ORDER BY k
SETTINGS allow_experimental_analyzer=0, optimize_group_by_function_keys=0;
```
Output:
```
┌──────────────k─┐
│ 3465735.9028 │
│ 3465735.9028 │
│ 3465736.595947 │
└────────────────┘
3 rows in set. Elapsed: 0.085 sec. Processed 10.01 million rows, 80.06 MB (117.56 million rows/s., 940.52 MB/s.)
```
cc @kitaisreal | https://github.com/ClickHouse/ClickHouse/issues/43257 | https://github.com/ClickHouse/ClickHouse/pull/43372 | f0567f7a25a29bd2b5007ed1ffc02070e7ac590d | d41107a94261feb6e7033c0bfc5bce08755d8813 | "2022-11-15T17:23:45Z" | c++ | "2023-01-11T09:06:59Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,205 | ["docs/en/sql-reference/functions/date-time-functions.md"] | "date_sub" working as described? | Afai can see, this should be working according to the [docs](https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions/#date_sub).
**Query:**
```
select date_sub('day', 1, toDate('2022-01-01'));
```
```
Received exception from server:
Code: 42. DB::Exception: Number of arguments for function minus doesn't match: passed 3, should be 2: While processing minus('day', 1, toDate('2022-01-01')). (NUMBER_OF_ARGUMENTS_DOESNT_MATCH) (version 22.8.4.7 (official build))
``` | https://github.com/ClickHouse/ClickHouse/issues/43205 | https://github.com/ClickHouse/ClickHouse/pull/45005 | 81290a5ed683d1a71bc527d64750ae0f5c3dc547 | 758c98e83245d5ed2fb5963cb03df256f02bb5d8 | "2022-11-14T01:14:28Z" | c++ | "2023-01-07T22:28:08Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,188 | ["programs/server/Server.cpp", "src/Common/ProfileEvents.cpp", "tests/queries/0_stateless/02532_profileevents_server_startup_time.reference", "tests/queries/0_stateless/02532_profileevents_server_startup_time.sql"] | Record the startup time in ProfileEvents. | Simply record the time from entering `main` to start listening sockets. | https://github.com/ClickHouse/ClickHouse/issues/43188 | https://github.com/ClickHouse/ClickHouse/pull/45250 | 190c9b31564a4aa1a59931dcd187bdb3814130e3 | d859976fbda8df3f32e6f26179f1c4ee8869a162 | "2022-11-11T21:07:10Z" | c++ | "2023-01-16T11:20:37Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,184 | ["tests/queries/0_stateless/02671_quantile_fuse_msan.reference", "tests/queries/0_stateless/02671_quantile_fuse_msan.sql"] | `use-of-uninitialized-value` with queries using `quantile` and enabled `optimize_syntax_fuse_functions` | **Describe the bug**
https://s3.amazonaws.com/clickhouse-test-reports/43087/94aab4276c72dd62fa1b99d80bacdbfa6fe85f37/fuzzer_astfuzzermsan//report.html
MSan triggers on queries with multiple `quantile` calls while `optimize_syntax_fuse_functions` and `Date`, `DateTime`, or `DateTime64` is used.
**How to reproduce**
```
SET optimize_syntax_fuse_functions=1;
CREATE TABLE datetime (`d` DateTime('UTC')) ENGINE = Memory;
SELECT quantile(0.1)(d), quantile(0.5)(d) FROM datetime;
```
**Error message and/or stacktrace**
```
SUMMARY: MemorySanitizer: use-of-uninitialized-value build_docker/../contrib/poco/Net/src/SocketImpl.cpp:322:8 in Poco::Net::SocketImpl::sendBytes(void const*, int, int) Exiting
Uninitialized bytes in __interceptor_send at offset 88 inside [0x7fef55e72000, 6256) ==146==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x53ca2b51 in Poco::Net::SocketImpl::sendBytes(void const*, int, int) build_docker/../contrib/poco/Net/src/SocketImpl.cpp:322:8
#1 0x53cb8fc7 in Poco::Net::StreamSocketImpl::sendBytes(void const*, int, int) build_docker/../contrib/poco/Net/src/StreamSocketImpl.cpp:63:23 #2 0x424b446e in DB::WriteBufferFromPocoSocket::nextImpl() build_docker/../src/IO/WriteBufferFromPocoSocket.cpp:63:34
#3 0x47f7d1b1 in DB::WriteBuffer::next() build_docker/../src/IO/WriteBuffer.h:49:13
#4 0x47f7d1b1 in DB::TCPHandler::sendLogData(DB::Block const&) build_docker/../src/Server/TCPHandler.cpp:1815:10 #5 0x47f5bd37 in DB::TCPHandler::sendLogs() build_docker/../src/Server/TCPHandler.cpp:1893:9
#6 0x47f805b2 in DB::TCPHandler::runImpl()::$_2::operator()() const build_docker/../src/Server/TCPHandler.cpp:290:21 #7 0x47f805b2 in decltype(std::declval<DB::TCPHandler::runImpl()::$_2&>()()) std::__1::__invoke[abi:v15003]<DB::TCPHandler::runImpl()::$_2&>(DB::TCPHandler::runImpl()::$_2&) build_docker/../contrib/libcxx/include/__functional/invoke.h:394:23
#8 0x47f805b2 in void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::TCPHandler::runImpl()::$_2&>(DB::TCPHandler::runImpl()::$_2&) build_docker/../contrib/libcxx/include/__functional/invoke.h:479:9 #9 0x47f805b2 in std::__1::__function::__default_alloc_func<DB::TCPHandler::runImpl()::$_2, void ()>::operator()[abi:v15003]() build_docker/../contrib/libcxx/include/__functional/function.h:235:12 #10 0x47f805b2 in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<DB::TCPHandler::runImpl()::$_2, void ()>>(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:716:16
#11 0x27b2d148 in std::__1::__function::__policy_func<void ()>::operator()[abi:v15003]() const build_docker/../contrib/libcxx/include/__functional/function.h:848:16 #12 0x27b2d148 in std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1197:12 #13 0x27b2d148 in DB::ThreadStatus::onFatalError() build_docker/../src/Common/ThreadStatus.cpp:243:9 #14 0x283847db in SignalListener::onFault(int, siginfo_t const&, ucontext_t*, StackTrace const&, unsigned int, DB::ThreadStatus*) const build_docker/../src/Daemon/BaseDaemon.cpp:392:25
#15 0x2837d4af in SignalListener::run()::'lambda'()::operator()() const build_docker/../src/Daemon/BaseDaemon.cpp:256:41 #16 0x2837d4af in decltype(std::declval<SignalListener::run()::'lambda'()>()()) std::__1::__invoke[abi:v15003]<SignalListener::run()::'lambda'()>(SignalListener::run()::'lambda'()&&) build_docker/../contrib/libcxx/include/__functional/invoke.h:394:23 #17 0x2837d4af in void std::__1::__thread_execute[abi:v15003]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, SignalListener::run()::'lambda'()>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, SignalListener::run()::'lambda'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:284:5
#18 0x2837d4af in void* std::__1::__thread_proxy[abi:v15003]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, SignalListener::run()::'lambda'()>>(void*) build_docker/../contrib/libcxx/include/thread:295:5
#19 0x7ff13b44c608 in start_thread /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8 #20 0x7ff13b371132 in __clone **/build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
```
I went step by step through code a bunch of times, and all elements accessed by `arrayElement` are correctly set to 0 which is also clear from the returned results.
I can continue debugging it, but leaving the report just in case someone has an idea.
| https://github.com/ClickHouse/ClickHouse/issues/43184 | https://github.com/ClickHouse/ClickHouse/pull/46848 | 25853da4ad0c0e51659291235aba736bdf8ab8f7 | 93dffb13c2e0f949465bc6a08591228b6e678056 | "2022-11-11T16:34:34Z" | c++ | "2023-02-25T19:56:05Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,167 | ["tests/queries/0_stateless/02480_tlp_nan.reference", "tests/queries/0_stateless/02480_tlp_nan.sql"] | not(sqrt(-1)) = not(not(sqrt(-1)) = 0 | ```
CREATE TABLE repro (col Int32) ENGINE = Memory;
INSERT INTO TABLE repro VALUES (-1);
```
```
SELECT MAX(sqrt(col))
FROM repro
GROUP BY col
┌─sqrt(col)─┐
│ nan │
└───────────┘
1 row in set. Elapsed: 0.010 sec.
```
Partition by HAVING clause `NOT MAX(sqrt(col))` lost `nan`.
```
SELECT MAX(sqrt(col))
FROM repro
GROUP BY col
HAVING NOT MAX(sqrt(col))
UNION ALL
SELECT MAX(sqrt(col))
FROM repro
GROUP BY col
HAVING NOT (NOT MAX(sqrt(col)))
UNION ALL
SELECT MAX(sqrt(col))
FROM repro
GROUP BY col
HAVING (NOT MAX(sqrt(col))) IS NULL
Query id: 6126f2f0-9e31-47f1-bd30-58c0df29d42f
Ok.
0 rows in set. Elapsed: 0.023 sec.
```
I simplified to this
```
SELECT
MAX(sqrt(col)) AS x,
NOT x,
NOT (NOT x),
(NOT x) IS NULL
FROM repro
GROUP BY col
Query id: 7ae06273-ceda-4616-a13d-a6fe15740d13
┌───x─┬─not(sqrt(col))─┬─not(not(sqrt(col)))─┬─isNull(not(sqrt(col)))─┐
│ nan │ 0 │ 0 │ 0 │
└─────┴────────────────┴─────────────────────┴────────────────────────┘
1 row in set. Elapsed: 0.015 sec.
SELECT
sqrt(col) AS x,
NOT x,
NOT (NOT x),
(NOT x) IS NULL
FROM repro
Query id: 9fb0cfd3-26db-455a-a78a-10a579ac1131
┌───x─┬─not(sqrt(col))─┬─not(not(sqrt(col)))─┬─isNull(not(sqrt(col)))─┐
│ nan │ 0 │ 0 │ 0 │
└─────┴────────────────┴─────────────────────┴────────────────────────┘
1 row in set. Elapsed: 0.011 sec.
``` | https://github.com/ClickHouse/ClickHouse/issues/43167 | https://github.com/ClickHouse/ClickHouse/pull/43216 | 3cab3ce484523b2486f53e532b2c8bd23b815524 | 83ecbf7f0b86fcbd11af0a3a9d6cf4a0e6686bc1 | "2022-11-11T12:16:47Z" | c++ | "2022-11-15T00:12:42Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,160 | ["src/Functions/array/arrayFirstLast.cpp", "tests/queries/0_stateless/02241_array_first_last_or_null.reference", "tests/queries/0_stateless/02241_array_first_last_or_null.sql"] | Inconsistent behaviour of arrayFirst* and arrayLast* with Nullable columns | Tested with latest version on play.clickhouse.com (22.10.1.1875)
```sql
SELECT arrayFirst((x,f) -> f, [1,2,3,NULL], [0,1,0,0]) as test
```
returns 2 as expected.
But:
```sql
SELECT arrayFirstOrNull((x,f) -> f, [1,2,3,NULL], [0,1,0,0]) as test
Code: 44. DB::Exception: Nullable(UInt8) cannot be inside Nullable column. (ILLEGAL_COLUMN) (version 22.10.1.1875 (official build))
```
tries to wrap another Nullable layer. It seems to be inconsistent in some way if we should use this function on various columns programatically.
And, BTW, it would be great if we could use Nullable columns in filter column of higher-order functions. Why is this forbidden now?
```sql
SELECT arrayFirst((x,f) -> f, [1,2,3,4], [0,1,0,NULL]) as test
Code: 44. DB::Exception: Unexpected type of filter column. (ILLEGAL_COLUMN) (version 22.10.1.1875 (official build))
``` | https://github.com/ClickHouse/ClickHouse/issues/43160 | https://github.com/ClickHouse/ClickHouse/pull/43274 | 1f93183dc7c0dbc4ed237b8518714de5976ee476 | a03fc9293c84dd6c3976e84d91f3fda00bcd01dc | "2022-11-11T11:04:02Z" | c++ | "2022-12-01T12:14:48Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,145 | ["docs/en/sql-reference/aggregate-functions/reference/covarsamp.md"] | covarSamp function returns nan for n<=1 but docs say it returns +inf | covarSamp() aggregate function returns `nan` for `n<=1` but docs say `+inf`
**Describe the issue**
https://clickhouse.com/docs/en/sql-reference/aggregate-functions/reference/covarsamp says
> Returns Float64. When n <= 1, returns +∞.
but in fact the function returns `nan` instead.
```
user-host :) SELECT covarSamp(number,number+1) FROM numbers(1)
SELECT covarSamp(number, number + 1)
FROM numbers(1)
Query id: ad5ffbaf-4468-411a-89fa-a077b76c23f6
┌─covarSamp(number, plus(number, 1))─┐
│ nan │
└────────────────────────────────────┘
1 row in set. Elapsed: 0.002 sec.
user-host :) SELECT covarSamp(number,number+1) FROM numbers(0)
SELECT covarSamp(number, number + 1)
FROM numbers(0)
Query id: 7bc56b65-f6fa-4ecd-8036-96940e8cd860
┌─covarSamp(number, plus(number, 1))─┐
│ nan │
└────────────────────────────────────┘
1 row in set. Elapsed: 0.002 sec.
user-host :)
```
**ClickHouse version**
`22.7.1.2484`
| https://github.com/ClickHouse/ClickHouse/issues/43145 | https://github.com/ClickHouse/ClickHouse/pull/47034 | afac2801a2ccf3d5855cd2c5679a897fc1183590 | 357415f4f5394fdc0d621b17fda8732ee2fce040 | "2022-11-10T21:37:05Z" | c++ | "2023-02-28T19:10:52Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,125 | ["src/Compression/CompressionCodecDelta.cpp"] | oss-fuzz Issue 52768 delta_decompress_fuzzer | null | https://github.com/ClickHouse/ClickHouse/issues/43125 | https://github.com/ClickHouse/ClickHouse/pull/43255 | 93a4950dae1ec7ad7dd2aae28a65b9efc81f7e0f | 0b4e643c2764543911b0b4c0c3745846af05742e | "2022-11-10T13:19:10Z" | c++ | "2022-11-19T13:16:14Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 43,101 | ["src/Analyzer/Passes/NormalizeCountVariantsPass.cpp", "tests/queries/0_stateless/02479_analyzer_aggregation_crash.reference", "tests/queries/0_stateless/02479_analyzer_aggregation_crash.sql"] | Sigsegv Interpreters/Aggregator.cpp in memory sanitiser build | Build from master with memory sanitiser. Enabled analyzer.
I run queries with SQLancer and server crashed. Same stack traces are reported from 3 threads but they are the same.
I could not reproduce error by running the same query after server restart. Probably some data race?
```
2022.11.09 21:19:55.754257 [ 590431 ] {} <Fatal> BaseDaemon: ########################################
2022.11.09 21:19:55.754463 [ 590431 ] {} <Fatal> BaseDaemon: (version 22.11.1.1, build id: 1A0CF0D623D74E69E4B6392E62612FD583BED321) (from thread 590424) (query_id: ee741a39-2222-4e9d-a276-7d3c85c5c5f4) (query: SELECT COUNT(-1361338261) FROM t3 GROUP BY t3.c0 SETTINGS aggregate_functions_null_for_empty=1, enable_optimize_predicate_expression=0) Received signal Segmentation fault (11)
2022.11.09 21:19:55.754672 [ 590431 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
2022.11.09 21:19:55.754806 [ 590431 ] {} <Fatal> BaseDaemon: Stack trace: 0x4116a75d 0x40c03a53 0x40c0f8af 0x488baa42 0x488b39da 0x480aef58 0x48075a9d 0x4807b892 0x27d5848d 0x27d663a3 0x7f558c6fe609 0x7f558c623163
2022.11.09 21:19:56.837904 [ 590431 ] {} <Fatal> BaseDaemon: 4. ./build_docker/../src/Interpreters/Aggregator.cpp:1220: void DB::Aggregator::executeImplBatch<false, true, false, DB::AggregationMethodStringNoCache<StringHashMap<char*, Allocator<true, true>>>>(DB::AggregationMethodStringNoCache<StringHashMap<char*, Allocator<true, true>>>&, DB::AggregationMethodStringNoCache<StringHashMap<char*, Allocator<true, true>>>::State&, DB::Arena*, unsigned long, unsigned long, DB::Aggregator::AggregateFunctionInstruction*, char*) const @ 0x4116a75d in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:00.061769 [ 590431 ] {} <Fatal> BaseDaemon: 5.1. inlined from ./build_docker/../src/Interpreters/Aggregator.cpp:1021: void DB::Aggregator::executeImpl<DB::AggregationMethodStringNoCache<StringHashMap<char*, Allocator<true, true>>>>(DB::AggregationMethodStringNoCache<StringHashMap<char*, Allocator<true, true>>>&, DB::Arena*, unsigned long, unsigned long, std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*>>&, DB::Aggregator::AggregateFunctionInstruction*, bool, char*) const
2022.11.09 21:20:00.061964 [ 590431 ] {} <Fatal> BaseDaemon: 5. ./build_docker/../src/Interpreters/Aggregator.cpp:987: DB::Aggregator::executeImpl(DB::AggregatedDataVariants&, unsigned long, unsigned long, std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*>>&, DB::Aggregator::AggregateFunctionInstruction*, bool, char*) const @ 0x40c03a53 in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:04.587204 [ 590431 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../src/Interpreters/Aggregator.cpp:1532: DB::Aggregator::executeOnBlock(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn>>>, unsigned long, unsigned long, DB::AggregatedDataVariants&, std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*>>&, std::__1::vector<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*>>, std::__1::allocator<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*>>>>&, bool&) const @ 0x40c0f8af in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:05.030638 [ 590431 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../src/Processors/Transforms/AggregatingTransform.cpp:533: DB::AggregatingTransform::consume(DB::Chunk) @ 0x488baa42 in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:05.460506 [ 590431 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../src/Processors/Transforms/AggregatingTransform.cpp:492: DB::AggregatingTransform::work() @ 0x488b39da in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:05.505231 [ 590431 ] {} <Fatal> BaseDaemon: 9.1. inlined from ./build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:0: DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*)
2022.11.09 21:20:05.505347 [ 590431 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92: DB::ExecutionThreadContext::executeTask() @ 0x480aef58 in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:05.667828 [ 590431 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:229: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x48075a9d in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:05.857874 [ 590431 ] {} <Fatal> BaseDaemon: 11.1. inlined from ./build_docker/../src/Common/ThreadPool.h:197: operator()
2022.11.09 21:20:05.858104 [ 590431 ] {} <Fatal> BaseDaemon: 11.2. inlined from ./build_docker/../contrib/libcxx/include/__functional/invoke.h:394: decltype(std::declval<DB::PipelineExecutor::spawnThreads()::$_0>()()) std::__1::__invoke[abi:v15003]<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&)
2022.11.09 21:20:05.858259 [ 590431 ] {} <Fatal> BaseDaemon: 11.3. inlined from ./build_docker/../contrib/libcxx/include/__functional/invoke.h:479: void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&)
2022.11.09 21:20:05.858398 [ 590431 ] {} <Fatal> BaseDaemon: 11.4. inlined from ./build_docker/../contrib/libcxx/include/__functional/function.h:235: std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()[abi:v15003]()
2022.11.09 21:20:05.858464 [ 590431 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../contrib/libcxx/include/__functional/function.h:716: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) @ 0x4807b892 in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:05.990310 [ 590431 ] {} <Fatal> BaseDaemon: 12. ./build_docker/../contrib/libcxx/include/__functional/function.h:0: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x27d5848d in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:06.153378 [ 590431 ] {} <Fatal> BaseDaemon: 13. ./build_docker/../src/Common/ThreadPool.cpp:0: void* std::__1::__thread_proxy[abi:v15003]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x27d663a3 in /home/ubuntu/memory-ch/clickhouse
2022.11.09 21:20:06.153552 [ 590431 ] {} <Fatal> BaseDaemon: 14. ? @ 0x7f558c6fe609 in ?
2022.11.09 21:20:06.153625 [ 590431 ] {} <Fatal> BaseDaemon: 15. __clone @ 0x7f558c623163 in ?
2022.11.09 21:20:08.939618 [ 590431 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: 2FEF42EBB429C3871389025BFA50FD20)
``` | https://github.com/ClickHouse/ClickHouse/issues/43101 | https://github.com/ClickHouse/ClickHouse/pull/43118 | b9f2ae6c245574a14eb978b36690ed8e3b678a60 | ebde28bc50b8569221b5833dff827c7348214f99 | "2022-11-09T21:29:22Z" | c++ | "2022-11-11T22:15:22Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,966 | ["docs/en/sql-reference/functions/type-conversion-functions.md", "src/DataTypes/IDataType.h", "src/Functions/FunctionSnowflake.h", "tests/queries/0_stateless/01942_dateTimeToSnowflake.reference", "tests/queries/0_stateless/01942_dateTimeToSnowflake.sql", "tests/queries/0_stateless/01942_snowflakeToDateTime.sql"] | snowflakeToDateTime64 creates wrong timestamp with precision '6' | The following query creates wrong results when using `snowflakeToDateTime64`/`dateTime64ToSnowflake` and `DateTime64` with _precision_ 6:
```sql
SELECT
now64(6) AS ts,
snowflakeToDateTime64(dateTime64ToSnowflake(ts)) AS sf
┌─────────────────────────ts─┬──────────────────────sf─┐
│ 2022-11-04 13:40:06.308513 │ 1992-05-16 03:10:00.097 │
└────────────────────────────┴─────────────────────────┘
```
For other `DateTime64` precisions it works fine:
```sql
SELECT
now64() AS ts,
snowflakeToDateTime64(dateTime64ToSnowflake(ts)) AS sf
┌──────────────────────ts─┬──────────────────────sf─┐
│ 2022-11-04 13:39:48.927 │ 2022-11-04 13:39:48.927 │
└─────────────────────────┴─────────────────────────┘
SELECT
now64(3) AS ts,
snowflakeToDateTime64(dateTime64ToSnowflake(ts)) AS sf
┌──────────────────────ts─┬──────────────────────sf─┐
│ 2022-11-04 13:40:02.500 │ 2022-11-04 13:40:02.500 │
└─────────────────────────┴─────────────────────────┘
SELECT
now64(9) AS ts,
snowflakeToDateTime64(dateTime64ToSnowflake(ts)) AS sf
┌────────────────────────────ts─┬──────────────────────sf─┐
│ 2022-11-04 13:40:10.999929289 │ 2042-10-02 10:02:16.649 │
└───────────────────────────────┴─────────────────────────┘
```
Clickhouse version: 22.10.2.11 | https://github.com/ClickHouse/ClickHouse/issues/42966 | https://github.com/ClickHouse/ClickHouse/pull/55983 | 489e6d9bdcbc28c7dea94fa4942a1298eb57706e | 5801b06529d690dcf9719ecbae8807ee8ed5a444 | "2022-11-04T12:47:07Z" | c++ | "2023-10-27T08:22:35Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,856 | ["src/Core/MySQL/MySQLReplication.cpp", "src/Core/MySQL/MySQLReplication.h", "tests/integration/test_materialized_mysql_database/materialize_with_ddl.py", "tests/integration/test_materialized_mysql_database/test.py"] | MaterializedMySQL got error Unsupported query event:SAVEPOINT `__EFSavePoint` | Hello! When I used MaterializedMySQL to replicate data got this error: `Unsupported query event:SAVEPOINT __EFSavePoint`
Any configurations to ignore this error and continue to replication ? | https://github.com/ClickHouse/ClickHouse/issues/42856 | https://github.com/ClickHouse/ClickHouse/pull/43086 | 63d06c8b53abb90afd96ac4020209543678de180 | a42daf504cbf369c04d84ec7739b1bca5560ff65 | "2022-11-01T10:37:26Z" | c++ | "2022-11-11T11:53:05Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,832 | ["src/Interpreters/HashJoin.cpp", "tests/queries/0_stateless/02475_join_bug_42832.reference", "tests/queries/0_stateless/02475_join_bug_42832.sql"] | MSan report in JoinCommon::tryConvertColumnToNullable | https://s3.amazonaws.com/clickhouse-test-reports/42778/66c179217cdfdee1ba0d4b4b577b1a62655caed0/fuzzer_astfuzzermsan//report.html
Minimal example
```sql
#!/usr/bin/clickhouse-client --queries-file
DROP TABLE IF EXISTS tab1;
DROP TABLE IF EXISTS tab2;
SET allow_suspicious_low_cardinality_types = 1;
create table tab1 (a1 Int32, b1 Int32) engine = MergeTree order by a1;
create table tab2 (a2 LowCardinality(Int32), b2 Int32) engine = MergeTree order by a2;
insert into tab1 values (1, 2);
insert into tab2 values (1, 2);
SET join_use_nulls = 1;
SELECT 1 FROM tab1 FULL OUTER JOIN tab2 ON b1 - 2 = a2 OR a1 = b2;
``` | https://github.com/ClickHouse/ClickHouse/issues/42832 | https://github.com/ClickHouse/ClickHouse/pull/42876 | 74a1de564e7add52b27a92c3bb6b3550d67f08f8 | 8ecc81d56879cb257875324972db7bd445b64a64 | "2022-10-31T15:43:37Z" | c++ | "2022-11-03T12:03:13Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,825 | ["src/Compression/LZ4_decompress_faster.cpp", "src/Compression/tests/gtest_compressionCodec.cpp"] | Check oss-fuzz reports about lz4 | null | https://github.com/ClickHouse/ClickHouse/issues/42825 | https://github.com/ClickHouse/ClickHouse/pull/42868 | fb43aa3db9a82a32504983e28f9b4c90c96817e0 | 2c7708a03edf0495fb83fe5fcf1c16bfbae25a6e | "2022-10-31T12:19:24Z" | c++ | "2022-11-04T21:12:36Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,819 | ["src/Interpreters/ExpressionAnalyzer.cpp", "tests/queries/0_stateless/02497_having_without_actual_aggregation_bug.reference", "tests/queries/0_stateless/02497_having_without_actual_aggregation_bug.sql"] | Logical error: Chunk info was not set for chunk in GroupingAggregatedTransform | https://s3.amazonaws.com/clickhouse-test-reports/42805/f53df7870c50dab252969a7bf37e3f776686888d/fuzzer_astfuzzerasan//report.html
```
2022.10.30 20:52:58.861494 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Debug> executeQuery: (from [::ffff:127.0.0.1]:34870) SELECT count(NULL) FROM (SELECT -9223372036854775808, initialQueryID() FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') WHERE 3 WITH TOTALS) WHERE 76 (stage: Complete)
2022.10.30 20:52:58.862279 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> ContextAccess (default): Access granted: CREATE TEMPORARY TABLE, REMOTE ON *.*
2022.10.30 20:52:58.862913 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: Running 'analyze' second time (current analyze depth: 1)
2022.10.30 20:52:58.863994 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: Running 'analyze' second time (current analyze depth: 2)
2022.10.30 20:52:58.865238 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: Running 'analyze' second time (current analyze depth: 3)
2022.10.30 20:52:58.865932 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: Running 'analyze' second time (current analyze depth: 4)
2022.10.30 20:52:58.866985 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: Running 'analyze' second time (current analyze depth: 5)
2022.10.30 20:52:58.868122 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: Running 'analyze' second time (current analyze depth: 6)
2022.10.30 20:52:58.869232 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: Running 'analyze' second time (current analyze depth: 7)
2022.10.30 20:52:58.869634 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> ContextAccess (default): Access granted: SELECT(str) ON default.tmp
2022.10.30 20:52:58.869769 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: FetchColumns -> WithMergeableState
2022.10.30 20:52:58.870053 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: WithMergeableState -> Complete
2022.10.30 20:52:58.870167 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2022.10.30 20:52:58.873118 [ 412 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> Connection (127.0.0.2:9000): Connecting. Database: (not specified). User: default
2022.10.30 20:52:58.873116 [ 414 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Fatal> : Logical error: 'Chunk info was not set for chunk in GroupingAggregatedTransform.'.
2022.10.30 20:52:58.873146 [ 402 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> Connection (127.0.0.3:9000): Connecting. Database: (not specified). User: default
2022.10.30 20:52:58.874123 [ 402 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> Connection (127.0.0.3:9000): Connected to ClickHouse server version 22.11.1.
2022.10.30 20:52:58.874146 [ 412 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> Connection (127.0.0.2:9000): Connected to ClickHouse server version 22.11.1.
2022.10.30 20:52:58.874965 [ 402 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Debug> Connection (127.0.0.3:9000): Sent data for 2 scalars, total 2 rows in 0.000272524 sec., 7320 rows/sec., 68.00 B (242.91 KiB/sec.), compressed 0.4594594594594595 times to 148.00 B (528.57 KiB/sec.)
2022.10.30 20:52:58.874985 [ 412 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Debug> Connection (127.0.0.2:9000): Sent data for 2 scalars, total 2 rows in 0.000274685 sec., 7259 rows/sec., 68.00 B (240.96 KiB/sec.), compressed 0.4594594594594595 times to 148.00 B (524.24 KiB/sec.)
2022.10.30 20:52:58.875506 [ 418 ] {74dd2192-f998-4e4a-879c-47612461f5b1} <Debug> executeQuery: (from [::ffff:127.0.0.1]:56626, initial_query_id: 27daf74f-bfcd-480c-9107-9ef9fcd60c78) SELECT -9223372036854775808 FROM `default`.`tmp` HAVING 76 (stage: WithMergeableState)
2022.10.30 20:52:58.875639 [ 158 ] {7787b707-a75b-44f2-a9a4-269874baf881} <Debug> executeQuery: (from [::ffff:127.0.0.1]:57450, initial_query_id: 27daf74f-bfcd-480c-9107-9ef9fcd60c78) SELECT -9223372036854775808 FROM `default`.`tmp` HAVING 76 (stage: WithMergeableState)
2022.10.30 20:53:34.639305 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Information> TCPHandler: Query was cancelled.
2022.10.30 20:53:34.642092 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> StorageDistributed (remote): (127.0.0.2:9000) Cancelling query
2022.10.30 20:53:34.645469 [ 157 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Trace> StorageDistributed (remote): (127.0.0.3:9000) Cancelling query
2022.10.30 20:53:34.646439 [ 421 ] {} <Fatal> BaseDaemon: (version 22.11.1.1, build id: 0C342C6EC87A8290F54FC1CF1C6CB4AFFE85B285) (from thread 414) (query_id: 27daf74f-bfcd-480c-9107-9ef9fcd60c78) (query: SELECT count(NULL) FROM (SELECT -9223372036854775808, initialQueryID() FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') WHERE 3 WITH TOTALS) WHERE 76) Received signal Aborted (6)
2022.10.30 20:52:58.873116 [ 414 ] {27daf74f-bfcd-480c-9107-9ef9fcd60c78} <Fatal> : Logical error: 'Chunk info was not set for chunk in GroupingAggregatedTransform.'.
2022.10.30 20:53:34.646279 [ 421 ] {} <Fatal> BaseDaemon: ########################################
2022.10.30 20:53:34.646439 [ 421 ] {} <Fatal> BaseDaemon: (version 22.11.1.1, build id: 0C342C6EC87A8290F54FC1CF1C6CB4AFFE85B285) (from thread 414) (query_id: 27daf74f-bfcd-480c-9107-9ef9fcd60c78) (query: SELECT count(NULL) FROM (SELECT -9223372036854775808, initialQueryID() FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') WHERE 3 WITH TOTALS) WHERE 76) Received signal Aborted (6)
2022.10.30 20:53:34.646557 [ 421 ] {} <Fatal> BaseDaemon:
2022.10.30 20:53:34.646712 [ 421 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f7d3664f00b 0x7f7d3662e859 0x1f3fbcdb 0x1f3fc21b 0x34305ec0 0x34303b36 0x34309053 0x33cdcd03 0x33cccea6 0x33cd09ec 0x1f62a901 0x1f634e4d 0x7f7d36806609 0x7f7d3672b133
2022.10.30 20:53:34.646889 [ 421 ] {} <Fatal> BaseDaemon: 3. gsignal @ 0x7f7d3664f00b in ?
2022.10.30 20:53:34.647063 [ 421 ] {} <Fatal> BaseDaemon: 4. abort @ 0x7f7d3662e859 in ?
2022.10.30 20:53:34.833521 [ 421 ] {} <Fatal> BaseDaemon: 5. ./build_docker/../src/Common/Exception.cpp:40: DB::abortOnFailedAssertion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) @ 0x1f3fbcdb in /workspace/clickhouse
2022.10.30 20:53:34.974745 [ 421 ] {} <Fatal> BaseDaemon: 6.1. inlined from ./build_docker/../src/Common/Exception.cpp:63: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int, bool, std::__1::vector<void*, std::__1::allocator<void*>> const&)
2022.10.30 20:53:34.974856 [ 421 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../src/Common/Exception.cpp:70: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int, bool) @ 0x1f3fc21b in /workspace/clickhouse
2022.10.30 20:53:35.086504 [ 421 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../src/Processors/Transforms/MergingAggregatedMemoryEfficientTransform.cpp:255: DB::GroupingAggregatedTransform::addChunk(DB::Chunk, unsigned long) @ 0x34305ec0 in /workspace/clickhouse
2022.10.30 20:53:35.192562 [ 421 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../src/Processors/Transforms/MergingAggregatedMemoryEfficientTransform.cpp:0: DB::GroupingAggregatedTransform::readFromAllInputs() @ 0x34303b36 in /workspace/clickhouse
2022.10.30 20:53:35.311013 [ 421 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../src/Processors/Transforms/MergingAggregatedMemoryEfficientTransform.cpp:140: DB::GroupingAggregatedTransform::prepare() @ 0x34309053 in /workspace/clickhouse
2022.10.30 20:53:35.402382 [ 421 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../src/Processors/Executors/ExecutingGraph.cpp:0: DB::ExecutingGraph::updateNode(unsigned long, std::__1::queue<DB::ExecutingGraph::Node*, std::__1::deque<DB::ExecutingGraph::Node*, std::__1::allocator<DB::ExecutingGraph::Node*>>>&, std::__1::queue<DB::ExecutingGraph::Node*, std::__1::deque<DB::ExecutingGraph::Node*, std::__1::allocator<DB::ExecutingGraph::Node*>>>&) @ 0x33cdcd03 in /workspace/clickhouse
2022.10.30 20:53:35.485373 [ 421 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:248: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x33cccea6 in /workspace/clickhouse
2022.10.30 20:53:35.582289 [ 421 ] {} <Fatal> BaseDaemon: 12.1. inlined from ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:324: operator()
2022.10.30 20:53:35.582426 [ 421 ] {} <Fatal> BaseDaemon: 12.2. inlined from ./build_docker/../contrib/libcxx/include/__functional/invoke.h:394: decltype(std::declval<DB::PipelineExecutor::spawnThreads()::$_0&>()()) std::__1::__invoke[abi:v15003]<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&)
2022.10.30 20:53:35.582517 [ 421 ] {} <Fatal> BaseDaemon: 12.3. inlined from ./build_docker/../contrib/libcxx/include/tuple:1789: decltype(auto) std::__1::__apply_tuple_impl[abi:v15003]<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>)
2022.10.30 20:53:35.582601 [ 421 ] {} <Fatal> BaseDaemon: 12.4. inlined from ./build_docker/../contrib/libcxx/include/tuple:1798: decltype(auto) std::__1::apply[abi:v15003]<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&)
2022.10.30 20:53:35.582673 [ 421 ] {} <Fatal> BaseDaemon: 12.5. inlined from ./build_docker/../src/Common/ThreadPool.h:196: operator()
2022.10.30 20:53:35.582763 [ 421 ] {} <Fatal> BaseDaemon: 12.6. inlined from ./build_docker/../contrib/libcxx/include/__functional/invoke.h:394: decltype(std::declval<DB::PipelineExecutor::spawnThreads()::$_0>()()) std::__1::__invoke[abi:v15003]<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&)
2022.10.30 20:53:35.582862 [ 421 ] {} <Fatal> BaseDaemon: 12.7. inlined from ./build_docker/../contrib/libcxx/include/__functional/invoke.h:479: void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&)
2022.10.30 20:53:35.582949 [ 421 ] {} <Fatal> BaseDaemon: 12.8. inlined from ./build_docker/../contrib/libcxx/include/__functional/function.h:235: std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()[abi:v15003]()
2022.10.30 20:53:35.582999 [ 421 ] {} <Fatal> BaseDaemon: 12. ./build_docker/../contrib/libcxx/include/__functional/function.h:716: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) @ 0x33cd09ec in /workspace/clickhouse
2022.10.30 20:53:35.652366 [ 421 ] {} <Fatal> BaseDaemon: 13.1. inlined from ./build_docker/../base/base/wide_integer_impl.h:774: bool wide::integer<128ul, unsigned int>::_impl::operator_eq<wide::integer<128ul, unsigned int>>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
2022.10.30 20:53:35.652469 [ 421 ] {} <Fatal> BaseDaemon: 13.2. inlined from ./build_docker/../base/base/wide_integer_impl.h:1441: bool wide::operator==<128ul, unsigned int, 128ul, unsigned int>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
2022.10.30 20:53:35.652548 [ 421 ] {} <Fatal> BaseDaemon: 13.3. inlined from ./build_docker/../base/base/strong_typedef.h:42: StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>::operator==(StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag> const&) const
2022.10.30 20:53:35.652637 [ 421 ] {} <Fatal> BaseDaemon: 13.4. inlined from ./build_docker/../src/Common/OpenTelemetryTraceContext.h:39: DB::OpenTelemetry::Span::isTraceEnabled() const
2022.10.30 20:53:35.652687 [ 421 ] {} <Fatal> BaseDaemon: 13. ./build_docker/../src/Common/ThreadPool.cpp:296: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x1f62a901 in /workspace/clickhouse
2022.10.30 20:53:35.739845 [ 421 ] {} <Fatal> BaseDaemon: 14.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:302: std::__1::unique_ptr<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>, std::__1::default_delete<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>>>::reset[abi:v15003](std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>*)
2022.10.30 20:53:35.739946 [ 421 ] {} <Fatal> BaseDaemon: 14.2. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:259: ~unique_ptr
2022.10.30 20:53:35.739995 [ 421 ] {} <Fatal> BaseDaemon: 14. ./build_docker/../contrib/libcxx/include/thread:297: void* std::__1::__thread_proxy[abi:v15003]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x1f634e4d in /workspace/clickhouse
2022.10.30 20:53:35.740056 [ 421 ] {} <Fatal> BaseDaemon: 15. ? @ 0x7f7d36806609 in ?
2022.10.30 20:53:35.740113 [ 421 ] {} <Fatal> BaseDaemon: 16. __clone @ 0x7f7d3672b133 in ?
2022.10.30 20:53:36.614686 [ 421 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: 8E5FBC4DC6E786E0A7B0705410835CC6)
``` | https://github.com/ClickHouse/ClickHouse/issues/42819 | https://github.com/ClickHouse/ClickHouse/pull/44051 | e0a6ccc83091dfa20ead90a422b20eedc41888cc | 3e3738bd49f8028c756c6eb218f0f447ac71a0f5 | "2022-10-31T11:04:45Z" | c++ | "2022-12-10T12:28:21Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,818 | ["src/DataTypes/Serializations/SerializationString.cpp", "tests/queries/0_stateless/02475_bad_cast_low_cardinality_to_string_bug.reference", "tests/queries/0_stateless/02475_bad_cast_low_cardinality_to_string_bug.sql"] | Bad cast from type DB::ColumnLowCardinality to DB::ColumnString. (if+LowCardinality(String)+extract) | **Describe what's wrong**
Logical error during query
**Does it reproduce on recent release?**
Yes
**Enable crash reporting**
**How to reproduce**
22.3.13
22.10
```
SELECT if(materialize(0), extract(materialize(CAST('aaaaaa', 'LowCardinality(String)')), '\\w'), extract(materialize(CAST('bbbbb', 'LowCardinality(String)')), '\\w*')) AS res
FROM numbers(2)
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Bad cast from type DB::ColumnLowCardinality to DB::ColumnString. (LOGICAL_ERROR)
SELECT if(materialize(0), extract(materialize(CAST('aaaaaa', 'LowCardinality(String)')), '\\w'), extract(materialize(CAST('bbbbb', 'LowCardinality(String)')), '\\w*')) AS res
FROM numbers(2)
SETTINGS short_circuit_function_evaluation = 'disable'
Query id: 12b09223-0b1c-4336-9d6c-7312f754fc28
┌─res───┐
│ bbbbb │
│ bbbbb │
└───────┘
```
**Expected behavior**
Query should work
**Additional context**
It's also possible that we also have crash somewhere nearby
Stacktrace & LOGICAL_ERROR looks similar to this https://github.com/ClickHouse/ClickHouse/issues/30980
```
2022.10.31 16:03:49.028819 [ 25199 ] {} <Fatal> BaseDaemon: Address: 0x1 Access: read. Address not mapped to object.
2022.10.31 16:03:49.031334 [ 25199 ] {} <Fatal> BaseDaemon: Stack trace: 0xb3b04a0 0x167b8f63 0x167b8a60 0x167b7e4a 0x167ab2a3 0x1679ecfe 0x1679e04b 0x1679d918 0x1679c3c4 0x15bba2b3 0x164cbf48 0x164d06f2 0x167576fb 0x19a16f8f 0x19a193e1 0x19bd63a9 0x19bd3700 0x7fb7d9ab3ea5 0x7fb7d97dc9fd
2022.10.31 16:03:49.037644 [ 25199 ] {} <Fatal> BaseDaemon: 2. void DB::writeAnyEscapedString<(char)39, false>(char const*, char const*, DB::WriteBuffer&) @ 0xb3b04a0 in /usr/bin/clickhouse
2022.10.31 16:03:49.047634 [ 25199 ] {} <Fatal> BaseDaemon: 3. DB::IRowOutputFormat::write(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > > const&, unsigned long) @ 0x167b8f63 in /usr/bin/clickhouse
2022.10.31 16:03:49.047665 [ 25199 ] {} <Fatal> BaseDaemon: 4. DB::IRowOutputFormat::consume(DB::Chunk) @ 0x167b8a60 in /usr/bin/clickhouse
2022.10.31 16:03:49.049235 [ 25199 ] {} <Fatal> BaseDaemon: 5. DB::IOutputFormat::work() @ 0x167b7e4a in /usr/bin/clickhouse
2022.10.31 16:03:49.050920 [ 25199 ] {} <Fatal> BaseDaemon: 6. DB::ExecutionThreadContext::executeTask() @ 0x167ab2a3 in /usr/bin/clickhouse
2022.10.31 16:03:49.050942 [ 25199 ] {} <Fatal> BaseDaemon: 7. DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x1679ecfe in /usr/bin/clickhouse
2022.10.31 16:03:49.050960 [ 25199 ] {} <Fatal> BaseDaemon: 8. DB::PipelineExecutor::executeImpl(unsigned long) @ 0x1679e04b in /usr/bin/clickhouse
2022.10.31 16:03:49.053886 [ 25199 ] {} <Fatal> BaseDaemon: 9. DB::PipelineExecutor::execute(unsigned long) @ 0x1679d918 in /usr/bin/clickhouse
2022.10.31 16:03:49.056971 [ 25199 ] {} <Fatal> BaseDaemon: 10. DB::CompletedPipelineExecutor::execute() @ 0x1679c3c4 in /usr/bin/clickhouse
2022.10.31 16:03:49.061374 [ 25199 ] {} <Fatal> BaseDaemon: 11. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::__1::shared_ptr<DB::Context>, std::__1::function<void (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>, std::__1::optional<DB::FormatSettings> const&) @ 0x15bba2b3 in /usr/bin/clickhouse
2022.10.31 16:03:49.061495 [ 25199 ] {} <Fatal> BaseDaemon: 12. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::__1::optional<DB::CurrentThread::QueryScope>&) @ 0x164cbf48 in /usr/bin/clickhouse
2022.10.31 16:03:49.061600 [ 25199 ] {} <Fatal> BaseDaemon: 13. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x164d06f2 in /usr/bin/clickhouse
2022.10.31 16:03:49.061703 [ 25199 ] {} <Fatal> BaseDaemon: 14. DB::HTTPServerConnection::run() @ 0x167576fb in /usr/bin/clickhouse
2022.10.31 16:03:49.061733 [ 25199 ] {} <Fatal> BaseDaemon: 15. Poco::Net::TCPServerConnection::start() @ 0x19a16f8f in /usr/bin/clickhouse
2022.10.31 16:03:49.061750 [ 25199 ] {} <Fatal> BaseDaemon: 16. Poco::Net::TCPServerDispatcher::run() @ 0x19a193e1 in /usr/bin/clickhouse
2022.10.31 16:03:49.061773 [ 25199 ] {} <Fatal> BaseDaemon: 17. Poco::PooledThread::run() @ 0x19bd63a9 in /usr/bin/clickhouse
2022.10.31 16:03:49.061790 [ 25199 ] {} <Fatal> BaseDaemon: 18. Poco::ThreadImpl::runnableEntry(void*) @ 0x19bd3700 in /usr/bin/clickhouse
2022.10.31 16:03:49.061826 [ 25199 ] {} <Fatal> BaseDaemon: 19. start_thread @ 0x7ea5 in /usr/lib64/libpthread-2.17.so
2022.10.31 16:03:49.061857 [ 25199 ] {} <Fatal> BaseDaemon: 20. __clone @ 0xfe9fd in /usr/lib64/libc-2.17.so
2022.10.31 16:03:52.823399 [ 25199 ] {} <Fatal> BaseDaemon: Calculated checksum of the binary: 503E001D1437A91819E6548330C8B27F. There is no information about the reference checksum.
``` | https://github.com/ClickHouse/ClickHouse/issues/42818 | https://github.com/ClickHouse/ClickHouse/pull/42937 | 5be30b9cb73ca47d7621b686ee8dddc483bc99d7 | 3fad4131bf2ceaefc6a1accb61a9033f25422c23 | "2022-10-31T10:44:15Z" | c++ | "2022-11-04T22:34:37Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,787 | ["src/Planner/Planner.cpp", "tests/queries/0_stateless/02479_analyzer_aggregation_totals_rollup_crash_fix.reference", "tests/queries/0_stateless/02479_analyzer_aggregation_totals_rollup_crash_fix.sql"] | Bad cast from type DB::DataTypeNumber to DB::DataTypeAggregateFunction | https://s3.amazonaws.com/clickhouse-test-reports/42284/ad91b625f76e61f745a516beac2b36da20eeaf97/fuzzer_astfuzzerubsan//report.html
```
2022.10.28 17:39:08.091815 [ 148 ] {b0b50a64-b11a-45fb-a2d4-f5d741b2159d} <Debug> executeQuery: (from [::ffff:127.0.0.1]:56246) CREATE TABLE test__fuzz_45 (`dim1` Nullable(UInt128), `dim2` Nullable(Int128), PROJECTION p1 (SELECT dim1, dim2, count() GROUP BY dim1, dim2)) ENGINE = MergeTree ORDER BY dim1 (stage: Complete)
2022.10.28 17:39:13.340377 [ 148 ] {313dc0da-e756-47b4-a7e1-687359468549} <Debug> executeQuery: (from [::ffff:127.0.0.1]:56246) SELECT dim2, count() FROM test__fuzz_45 GROUP BY dim1, dim2 WITH CUBE WITH TOTALS ORDER BY dim1 ASC NULLS FIRST, dim2 DESC NULLS LAST, [[NULL], [65537], []] ASC NULLS FIRST, count() ASC NULLS FIRST (stage: Complete)
2022.10.28 17:39:13.340891 [ 148 ] {313dc0da-e756-47b4-a7e1-687359468549} <Trace> ContextAccess (default): Access granted: SELECT(dim1, dim2) ON default.test__fuzz_45
2022.10.28 17:39:13.341253 [ 148 ] {313dc0da-e756-47b4-a7e1-687359468549} <Debug> default.test__fuzz_45 (0aaef0e6-4f8c-4889-8f6d-b9f47047db0e) (SelectExecutor): Key condition: unknown
2022.10.28 17:39:13.341293 [ 148 ] {313dc0da-e756-47b4-a7e1-687359468549} <Debug> default.test__fuzz_45 (0aaef0e6-4f8c-4889-8f6d-b9f47047db0e) (SelectExecutor): Selected 1/1 parts by partition key, 1 parts by primary key, 1/1 marks by primary key, 1 marks to read from 1 ranges
2022.10.28 17:39:13.341328 [ 148 ] {313dc0da-e756-47b4-a7e1-687359468549} <Trace> MergeTreeInOrderSelectProcessor: Reading 1 ranges in order from part all_1_1_0, approx. 4 rows starting from 0
2022.10.28 17:39:13.341614 [ 148 ] {313dc0da-e756-47b4-a7e1-687359468549} <Fatal> : Logical error: 'Bad cast from type DB::DataTypeNumber<unsigned long> to DB::DataTypeAggregateFunction'.
2022.10.28 17:39:54.796281 [ 421 ] {} <Fatal> BaseDaemon: ########################################
2022.10.28 17:39:54.796365 [ 421 ] {} <Fatal> BaseDaemon: (version 22.11.1.1, build id: F2154E0BD6706D583BCA00CB6DD4294DBEC39A4B) (from thread 148) (query_id: 313dc0da-e756-47b4-a7e1-687359468549) (query: SELECT dim2, count() FROM test__fuzz_45 GROUP BY dim1, dim2 WITH CUBE WITH TOTALS ORDER BY dim1 ASC NULLS FIRST, dim2 DESC NULLS LAST, [[NULL], [65537], []] ASC NULLS FIRST, count() ASC NULLS FIRST) Received signal Aborted (6)
2022.10.28 17:39:54.796427 [ 421 ] {} <Fatal> BaseDaemon:
2022.10.28 17:39:54.796525 [ 421 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fcbf91d100b 0x7fcbf91b0859 0x20491623 0x204918af 0x2ab01004 0x2d9c4451 0x2d9c4a96 0x2dc1f5c2 0x2dc1f11c 0x2dc1ef4c 0x2dc1ecb8 0x2dc1ea21 0x2dc1cea2 0x2db706f6 0x2db99cfc 0x2be21027 0x2c2d79ba 0x2c2d334c 0x2d48d4b0 0x2d4adfba 0x2e4865cc 0x2e486aba 0x2e5fe487 0x2e5fbf6f 0x7fcbf9388609 0x7fcbf92ad133
2022.10.28 17:39:54.796613 [ 421 ] {} <Fatal> BaseDaemon: 3. raise @ 0x7fcbf91d100b in ?
2022.10.28 17:39:54.796669 [ 421 ] {} <Fatal> BaseDaemon: 4. abort @ 0x7fcbf91b0859 in ?
2022.10.28 17:39:54.838825 [ 421 ] {} <Fatal> BaseDaemon: 5. ./build_docker/../src/Common/Exception.cpp:47: DB::abortOnFailedAssertion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) @ 0x20491623 in /workspace/clickhouse
2022.10.28 17:39:54.879592 [ 421 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../src/Common/Exception.cpp:70: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int, bool) @ 0x204918af in /workspace/clickhouse
2022.10.28 17:39:54.898209 [ 421 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../src/Common/typeid_cast.h:0: DB::DataTypeAggregateFunction const& typeid_cast<DB::DataTypeAggregateFunction const&, DB::IDataType const>(DB::IDataType const&) @ 0x2ab01004 in /workspace/clickhouse
2022.10.28 17:39:54.920816 [ 421 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../src/Processors/Transforms/TotalsHavingTransform.cpp:28: DB::finalizeBlock(DB::Block&, std::__1::vector<bool, std::__1::allocator<bool>> const&) @ 0x2d9c4451 in /workspace/clickhouse
2022.10.28 17:39:54.939292 [ 421 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../src/Processors/Transforms/TotalsHavingTransform.cpp:84: DB::TotalsHavingTransform::TotalsHavingTransform(DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>> const&, bool, std::__1::shared_ptr<DB::ExpressionActions> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool, DB::TotalsMode, double, bool) @ 0x2d9c4a96 in /workspace/clickhouse
2022.10.28 17:39:54.968170 [ 421 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../contrib/libcxx/include/__memory/construct_at.h:35: DB::TotalsHavingTransform* std::__1::construct_at[abi:v15003]<DB::TotalsHavingTransform, DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&, DB::TotalsHavingTransform*>(DB::TotalsHavingTransform*, DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>&&, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&) @ 0x2dc1f5c2 in /workspace/clickhouse
2022.10.28 17:39:54.995791 [ 421 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:302: void std::__1::allocator_traits<std::__1::allocator<DB::TotalsHavingTransform>>::construct[abi:v15003]<DB::TotalsHavingTransform, DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&, void, void>(std::__1::allocator<DB::TotalsHavingTransform>&, DB::TotalsHavingTransform*, DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>&&, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&) @ 0x2dc1f11c in /workspace/clickhouse
2022.10.28 17:39:55.023356 [ 421 ] {} <Fatal> BaseDaemon: 12. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:292: std::__1::__shared_ptr_emplace<DB::TotalsHavingTransform, std::__1::allocator<DB::TotalsHavingTransform>>::__shared_ptr_emplace[abi:v15003]<DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&>(std::__1::allocator<DB::TotalsHavingTransform>, DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>&&, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&) @ 0x2dc1ef4c in /workspace/clickhouse
2022.10.28 17:39:55.050038 [ 421 ] {} <Fatal> BaseDaemon: 13. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:953: std::__1::shared_ptr<DB::TotalsHavingTransform> std::__1::allocate_shared[abi:v15003]<DB::TotalsHavingTransform, std::__1::allocator<DB::TotalsHavingTransform>, DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&, void>(std::__1::allocator<DB::TotalsHavingTransform> const&, DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>&&, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&) @ 0x2dc1ecb8 in /workspace/clickhouse
2022.10.28 17:39:55.076478 [ 421 ] {} <Fatal> BaseDaemon: 14. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:962: std::__1::shared_ptr<DB::TotalsHavingTransform> std::__1::make_shared[abi:v15003]<DB::TotalsHavingTransform, DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&, void>(DB::Block const&, std::__1::vector<bool, std::__1::allocator<bool>>&&, bool&, std::__1::shared_ptr<DB::ExpressionActions>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool&, DB::TotalsMode&, double&, bool&) @ 0x2dc1ea21 in /workspace/clickhouse
2022.10.28 17:39:55.099871 [ 421 ] {} <Fatal> BaseDaemon: 15. ./build_docker/../src/Processors/QueryPlan/TotalsHavingStep.cpp:63: DB::TotalsHavingStep::transformPipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x2dc1cea2 in /workspace/clickhouse
2022.10.28 17:39:55.117100 [ 421 ] {} <Fatal> BaseDaemon: 16. ./build_docker/../src/Processors/QueryPlan/ITransformingStep.cpp:0: DB::ITransformingStep::updatePipeline(std::__1::vector<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>, std::__1::allocator<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>>>, DB::BuildQueryPipelineSettings const&) @ 0x2db706f6 in /workspace/clickhouse
2022.10.28 17:39:55.145188 [ 421 ] {} <Fatal> BaseDaemon: 17.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:296: std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>::release[abi:v15003]()
2022.10.28 17:39:55.145216 [ 421 ] {} <Fatal> BaseDaemon: 17.2. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:225: std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>::operator=[abi:v15003](std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder>>&&)
2022.10.28 17:39:55.145251 [ 421 ] {} <Fatal> BaseDaemon: 17. ./build_docker/../src/Processors/QueryPlan/QueryPlan.cpp:187: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x2db99cfc in /workspace/clickhouse
2022.10.28 17:39:55.159638 [ 421 ] {} <Fatal> BaseDaemon: 18. ./build_docker/../src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:98: DB::InterpreterSelectQueryAnalyzer::execute() @ 0x2be21027 in /workspace/clickhouse
2022.10.28 17:39:55.216894 [ 421 ] {} <Fatal> BaseDaemon: 19. ./build_docker/../src/Interpreters/executeQuery.cpp:0: DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x2c2d79ba in /workspace/clickhouse
2022.10.28 17:39:55.277338 [ 421 ] {} <Fatal> BaseDaemon: 20. ./build_docker/../src/Interpreters/executeQuery.cpp:1106: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x2c2d334c in /workspace/clickhouse
2022.10.28 17:39:55.330142 [ 421 ] {} <Fatal> BaseDaemon: 21. ./build_docker/../src/Server/TCPHandler.cpp:374: DB::TCPHandler::runImpl() @ 0x2d48d4b0 in /workspace/clickhouse
2022.10.28 17:39:55.394293 [ 421 ] {} <Fatal> BaseDaemon: 22. ./build_docker/../src/Server/TCPHandler.cpp:1904: DB::TCPHandler::run() @ 0x2d4adfba in /workspace/clickhouse
2022.10.28 17:39:55.399589 [ 421 ] {} <Fatal> BaseDaemon: 23. ./build_docker/../contrib/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x2e4865cc in /workspace/clickhouse
2022.10.28 17:39:55.406800 [ 421 ] {} <Fatal> BaseDaemon: 24.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:48: std::__1::default_delete<Poco::Net::TCPServerConnection>::operator()[abi:v15003](Poco::Net::TCPServerConnection*) const
2022.10.28 17:39:55.406827 [ 421 ] {} <Fatal> BaseDaemon: 24.2. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:305: std::__1::unique_ptr<Poco::Net::TCPServerConnection, std::__1::default_delete<Poco::Net::TCPServerConnection>>::reset[abi:v15003](Poco::Net::TCPServerConnection*)
2022.10.28 17:39:55.406859 [ 421 ] {} <Fatal> BaseDaemon: 24.3. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:259: ~unique_ptr
2022.10.28 17:39:55.406894 [ 421 ] {} <Fatal> BaseDaemon: 24. ./build_docker/../contrib/poco/Net/src/TCPServerDispatcher.cpp:116: Poco::Net::TCPServerDispatcher::run() @ 0x2e486aba in /workspace/clickhouse
2022.10.28 17:39:55.415076 [ 421 ] {} <Fatal> BaseDaemon: 25. ./build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:213: Poco::PooledThread::run() @ 0x2e5fe487 in /workspace/clickhouse
2022.10.28 17:39:55.422338 [ 421 ] {} <Fatal> BaseDaemon: 26.1. inlined from ./build_docker/../contrib/poco/Foundation/include/Poco/SharedPtr.h:156: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable>>::assign(Poco::Runnable*)
2022.10.28 17:39:55.422363 [ 421 ] {} <Fatal> BaseDaemon: 26.2. inlined from ./build_docker/../contrib/poco/Foundation/include/Poco/SharedPtr.h:208: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable>>::operator=(Poco::Runnable*)
2022.10.28 17:39:55.422393 [ 421 ] {} <Fatal> BaseDaemon: 26. ./build_docker/../contrib/poco/Foundation/src/Thread_POSIX.cpp:360: Poco::ThreadImpl::runnableEntry(void*) @ 0x2e5fbf6f in /workspace/clickhouse
2022.10.28 17:39:55.422432 [ 421 ] {} <Fatal> BaseDaemon: 27. ? @ 0x7fcbf9388609 in ?
2022.10.28 17:39:55.422472 [ 421 ] {} <Fatal> BaseDaemon: 28. clone @ 0x7fcbf92ad133 in ?
2022.10.28 17:39:55.738272 [ 421 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: 314BA9D8A8888FFF22EF417DE3033F72)
``` | https://github.com/ClickHouse/ClickHouse/issues/42787 | https://github.com/ClickHouse/ClickHouse/pull/43119 | 7b2cc4ed21b1716b64a7e098c6e2cbe96d23126e | ef7d867966ad0235780c4046c94c12e8ec9df6ee | "2022-10-29T01:07:12Z" | c++ | "2022-11-16T22:32:37Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,772 | ["src/Storages/MergeTree/MergeTreeData.cpp", "src/Storages/SelectQueryInfo.h", "tests/queries/0_stateless/02515_projections_with_totals.reference", "tests/queries/0_stateless/02515_projections_with_totals.sql", "tests/queries/0_stateless/02516_projections_with_rollup.reference", "tests/queries/0_stateless/02516_projections_with_rollup.sql"] | Projections and mismatched number of columns | ```
$ clickhouse-local
ClickHouse local version 22.10.1.1.
milovidov-desktop :) CREATE TABLE video_log
(
`datetime` DateTime,
`user_id` UInt64,
`device_id` UInt64,
`domain` LowCardinality(String),
`bytes` UInt64,
`duration` UInt64
)
ENGINE = MergeTree
PARTITION BY toDate(datetime)
ORDER BY (user_id, device_id);
CREATE TABLE video_log
(
`datetime` DateTime,
`user_id` UInt64,
`device_id` UInt64,
`domain` LowCardinality(String),
`bytes` UInt64,
`duration` UInt64
)
ENGINE = MergeTree
PARTITION BY toDate(datetime)
ORDER BY (user_id, device_id)
Query id: dd100967-0fce-4dea-b937-ca10e5fc1d0a
Ok.
0 rows in set. Elapsed: 0.019 sec.
milovidov-desktop :) CREATE TABLE video_log_result__fuzz_0 (`hour` Nullable(DateTime), `sum_bytes` UInt64, `avg_duration` Float64) ENGINE = MergeTree PARTITION BY toDate(hour) ORDER BY sum_bytes SETTINGS allow_nullable_key = 1
CREATE TABLE video_log_result__fuzz_0
(
`hour` Nullable(DateTime),
`sum_bytes` UInt64,
`avg_duration` Float64
)
ENGINE = MergeTree
PARTITION BY toDate(hour)
ORDER BY sum_bytes
SETTINGS allow_nullable_key = 1
Query id: fe2c04ec-566c-4704-b7af-af2e226d9dad
Ok.
0 rows in set. Elapsed: 0.014 sec.
milovidov-desktop :) CREATE TABLE rng
(
`user_id_raw` UInt64,
`device_id_raw` UInt64,
`domain_raw` UInt64,
`bytes_raw` UInt64,
`duration_raw` UInt64
)
ENGINE = GenerateRandom(1024);
CREATE TABLE rng
(
`user_id_raw` UInt64,
`device_id_raw` UInt64,
`domain_raw` UInt64,
`bytes_raw` UInt64,
`duration_raw` UInt64
)
ENGINE = GenerateRandom(1024)
Query id: 1b4dc5ab-8784-4ef3-a7b3-a99869a06332
Ok.
0 rows in set. Elapsed: 0.000 sec.
milovidov-desktop :) INSERT INTO video_log SELECT
toUnixTimestamp('2022-07-22 01:00:00')
+ (rowNumberInAllBlocks() / 20000),
user_id_raw % 100000000 AS user_id,
device_id_raw % 200000000 AS device_id,
domain_raw % 100,
(bytes_raw % 1024) + 128,
(duration_raw % 300) + 100
FROM rng
LIMIT 1728000;
INSERT INTO video_log SELECT
toUnixTimestamp('2022-07-22 01:00:00') + (rowNumberInAllBlocks() / 20000),
user_id_raw % 100000000 AS user_id,
device_id_raw % 200000000 AS device_id,
domain_raw % 100,
(bytes_raw % 1024) + 128,
(duration_raw % 300) + 100
FROM rng
LIMIT 1728000
Query id: 8a57c429-568d-40cb-9d13-98ccbbd7aafe
Ok.
0 rows in set. Elapsed: 0.341 sec. Processed 2.10 million rows, 83.88 MB (6.15 million rows/s., 246.14 MB/s.)
milovidov-desktop :) INSERT INTO video_log SELECT
toUnixTimestamp('2022-07-22 01:00:00')
+ (rowNumberInAllBlocks() / 20000),
user_id_raw % 100000000 AS user_id,
100 AS device_id,
domain_raw % 100,
(bytes_raw % 1024) + 128,
(duration_raw % 300) + 100
FROM rng
LIMIT 10;
INSERT INTO video_log SELECT
toUnixTimestamp('2022-07-22 01:00:00') + (rowNumberInAllBlocks() / 20000),
user_id_raw % 100000000 AS user_id,
100 AS device_id,
domain_raw % 100,
(bytes_raw % 1024) + 128,
(duration_raw % 300) + 100
FROM rng
LIMIT 10
Query id: 2e7bb653-73c7-4687-908e-4b6178c90ade
Ok.
0 rows in set. Elapsed: 0.003 sec.
milovidov-desktop :) ALTER TABLE video_log ADD PROJECTION p_norm
(
SELECT
datetime,
device_id,
bytes,
duration
ORDER BY device_id
);
ALTER TABLE video_log
ADD PROJECTION p_norm
(
SELECT
datetime,
device_id,
bytes,
duration
ORDER BY device_id
)
Query id: 7d970599-65ae-4b6b-af63-72671d9badd0
Ok.
0 rows in set. Elapsed: 0.002 sec.
milovidov-desktop :) ALTER TABLE video_log MATERIALIZE PROJECTION p_norm settings mutations_sync=1;
ALTER TABLE video_log
MATERIALIZE PROJECTION p_norm
SETTINGS mutations_sync = 1
Query id: 73fdfd46-7bb8-475f-9e11-dfaa8216692f
Ok.
0 rows in set. Elapsed: 0.173 sec.
milovidov-desktop :) ALTER TABLE video_log ADD PROJECTION p_agg
(
SELECT
toStartOfHour(datetime) AS hour,
domain,
sum(bytes),
avg(duration)
GROUP BY
hour,
domain
);
ALTER TABLE video_log
ADD PROJECTION p_agg
(
SELECT
toStartOfHour(datetime) AS hour,
domain,
sum(bytes),
avg(duration)
GROUP BY
hour,
domain
)
Query id: b90da0ab-550d-4a99-9f64-184b9eb06f37
Ok.
0 rows in set. Elapsed: 0.003 sec.
milovidov-desktop :) ALTER TABLE video_log MATERIALIZE PROJECTION p_agg settings mutations_sync=1;
ALTER TABLE video_log
MATERIALIZE PROJECTION p_agg
SETTINGS mutations_sync = 1
Query id: 8fb48891-5cb4-4434-9e20-88cae17afd8f
Ok.
0 rows in set. Elapsed: 0.103 sec.
milovidov-desktop :) SELECT avg_duration1, avg_duration1 = avg_duration2 FROM (SELECT sum(bytes), hour, toStartOfHour(datetime) AS hour, avg(duration) AS avg_duration1 FROM video_log GROUP BY hour WITH ROLLUP WITH TOTALS) LEFT JOIN (SELECT hour, sum_bytes AS sum_bytes2, avg_duration AS avg_duration2 FROM video_log_result__fuzz_0) USING (hour) SETTINGS joined_subquery_requires_alias = 0
SELECT
avg_duration1,
avg_duration1 = avg_duration2
FROM
(
SELECT
sum(bytes),
hour,
toStartOfHour(datetime) AS hour,
avg(duration) AS avg_duration1
FROM video_log
GROUP BY hour
WITH ROLLUP
WITH TOTALS
)
LEFT JOIN
(
SELECT
hour,
sum_bytes AS sum_bytes2,
avg_duration AS avg_duration2
FROM video_log_result__fuzz_0
) USING (hour)
SETTINGS joined_subquery_requires_alias = 0
Query id: 44d6d293-55e0-4cce-a28a-9b08fa1b7b5a
0 rows in set. Elapsed: 0.004 sec.
Received exception:
Code: 49. DB::Exception: Block structure mismatch in QueryPipeline stream: different number of columns:
__grouping_set UInt64 UInt64(size = 0), toStartOfHour(datetime) DateTime UInt32(size = 0), avg(duration) Float64 Float64(size = 0)
__grouping_set UInt64 UInt64(size = 0), toStartOfHour(datetime) DateTime UInt32(size = 0), sum(bytes) AggregateFunction(sum, UInt64) AggregateFunction(size = 0), avg(duration) Float64 Float64(size = 0). (LOGICAL_ERROR)
``` | https://github.com/ClickHouse/ClickHouse/issues/42772 | https://github.com/ClickHouse/ClickHouse/pull/44615 | 9645941cdff8f8bdc844ea950358f2c27b231f22 | 464a513f0ed5f4e1f90b91a25ecda2ae6d270cec | "2022-10-28T14:29:26Z" | c++ | "2022-12-27T12:31:03Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,758 | ["docs/en/sql-reference/functions/date-time-functions.md"] | toYYYYMMDDhhmmss(): second argument is not documented. | ```
SELECT toYYYYMMDDhhmmss(now(), 2)
Query id: 4d7a3005-4d57-4e40-9321-d80e02f0621d
0 rows in set. Elapsed: 0.001 sec.
Received exception from server (version 22.3.2):
Code: 43. DB::Exception: Received from localhost:9000. DB::Exception: Function toYYYYMMDDhhmmss supports 1 or 2 arguments. The 1st argument must be of type Date or DateTime. The 2nd argument (optional) must be a constant string with timezone name: While processing toYYYYMMDDhhmmss(now(), 2). (ILLEGAL_TYPE_OF_ARGUMENT)
```
https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions/#toyyyymmddhhmmss:

Possibly other related functions.
Please document second optional argument of the function: (it's timezone name)
| https://github.com/ClickHouse/ClickHouse/issues/42758 | https://github.com/ClickHouse/ClickHouse/pull/47146 | 1bbf5acd47b86e19f6767619d372466bca28bec2 | 687df5f1b549f933b93637421cdb5e2d156077b8 | "2022-10-28T09:19:21Z" | c++ | "2023-03-03T13:01:27Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,757 | ["src/Common/ThreadProfileEvents.h", "src/Common/ThreadStatus.h", "src/Interpreters/ThreadStatusExt.cpp", "src/Processors/Transforms/buildPushingToViewsChain.cpp"] | Overflows(?) in UserTimeMicroseconds & SystemTimeMicroseconds metrics | ```
┌───────────────now()─┬─event────────────────┬────────────────value─┐
│ 2022-10-28 08:09:26 │ UserTimeMicroseconds │ 13760641375459361349 │
│ 2022-10-28 08:11:57 │ UserTimeMicroseconds │ 17081055181340065261 │
│ 2022-10-28 08:13:31 │ UserTimeMicroseconds │ 2803275110436731712 │
│ 2022-10-28 08:14:19 │ UserTimeMicroseconds │ 4039206916108154442 │
│ 2022-10-28 08:15:49 │ UserTimeMicroseconds │ 5422712665390374116 │
└─────────────────────┴──────────────────────┴──────────────────────┘
```
It can not grow so fast.
```
SELECT formatReadableTimeDelta((17081055181340065261 - 13760641375459361349) / 1000000)
Query id: 7bbb071d-6204-413d-ba7a-222c89aca743
┌─formatReadableTimeDelta(divide(minus(17081055181340065261, 13760641375459361349), 1000000))─┐
│ 105289 years, 7 months, 16 days, 20 hours and 18 minutes │
└─────────────────────────────────────────────────────────────────────────────────────────────┘
``` | https://github.com/ClickHouse/ClickHouse/issues/42757 | https://github.com/ClickHouse/ClickHouse/pull/42791 | 75dbd6828a00f18739ae5346bb5df15fa96f9aea | c23b8c69dbf343de7f7e0a7e11c2e563b464167b | "2022-10-28T09:16:11Z" | c++ | "2022-11-22T18:22:51Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,756 | ["src/Functions/LowerUpperUTF8Impl.h", "tests/queries/0_stateless/02071_lower_upper_utf8_row_overlaps.reference", "tests/queries/0_stateless/02071_lower_upper_utf8_row_overlaps.sql"] | Function "lowerUTF8" handles some sequences of cyrillic characters incorrectly | ### The function "lowerUTF8" handles some sequences of cyrillic characters incorrectly
How to reproduce:
ClickHouse server version >=22.9
execute:
```SELECT lowerUTF8('АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ')```
this will works fine and return correct result:
> абвгдеёжзийклмнопрстуфхцчшщъыьэюя
but executing this:
```SELECT lowerUTF8('КВ АМ И СЖ')```
will result:
> кв ам и сЖ
https://fiddle.clickhouse.com/34a76c87-4dfa-4fc8-808f-376b4b7a183b
last symbol "Ж" will not convert to lower case "ж"
another example:
```SELECT lowerUTF8('ЗАДАЧИ КПЗ')```
this will result:
> задачи кПз
https://fiddle.clickhouse.com/e3c6650a-52ea-4819-ae72-fad8c838d62c
penultimate symbol "П" will not convert to lower case "п"
| https://github.com/ClickHouse/ClickHouse/issues/42756 | https://github.com/ClickHouse/ClickHouse/pull/42812 | fe48a1ce7e2155fb691e6ec2816e431d95e7722f | f67f0183f6200c0208f01a7b50b81ab89bf7fa87 | "2022-10-28T08:49:06Z" | c++ | "2022-11-01T11:01:00Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,734 | ["tests/integration/test_server_reload/test.py"] | thread sanitizer reports a race in the grpc | thread sanitizer log from https://github.com/ClickHouse/ClickHouse/issues/42463
<details>
<summary><b>StackTrace</b></summary>
```
WARNING: ThreadSanitizer: data race (pid=1)
Atomic write of size 4 at 0x7f89eb673540 by main thread (mutexes: write M0, write M1):
#0 int std::__1::__cxx_atomic_fetch_add<int>(std::__1::__cxx_atomic_base_impl<int>*, int, std::__1::memory_order) build_docker/../contrib/libcxx/include/atomic:1003:12 (clickhouse+0x20deba43) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#1 std::__1::__atomic_base<int, true>::fetch_add(int, std::__1::memory_order) build_docker/../contrib/libcxx/include/atomic:1687:17 (clickhouse+0x20deba43)
#2 absl::lts_20211102::synchronization_internal::Waiter::Post() build_docker/../contrib/abseil-cpp/absl/synchronization/internal/waiter.cc:110:14 (clickhouse+0x20deba43)
#3 AbslInternalPerThreadSemPost_lts_20211102 build_docker/../contrib/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc:73:64 (clickhouse+0x20deb0fd) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#4 absl::lts_20211102::synchronization_internal::PerThreadSem::Post(absl::lts_20211102::base_internal::ThreadIdentity*) build_docker/../contrib/abseil-cpp/absl/synchronization/internal/per_thread_sem.h:107:3 (clickhouse+0x20de5bcc) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#5 absl::lts_20211102::Mutex::IncrementSynchSem(absl::lts_20211102::Mutex*, absl::lts_20211102::base_internal::PerThreadSynch*) build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.cc:566:3 (clickhouse+0x20de5bcc)
#6 absl::lts_20211102::Mutex::Wakeup(absl::lts_20211102::base_internal::PerThreadSynch*) build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.cc:1156:3 (clickhouse+0x20de5bcc)
#7 absl::lts_20211102::Mutex::UnlockSlow(absl::lts_20211102::SynchWaitParams*) build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.cc:2321:19 (clickhouse+0x20deac30) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#8 absl::lts_20211102::Mutex::Unlock() build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.cc:1712:11 (clickhouse+0x20de7b4e) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#9 gpr_mu_unlock build_docker/../contrib/grpc/src/core/lib/gpr/sync_abseil.cc:60:39 (clickhouse+0x20bdf5b9) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#10 grpc_core::(anonymous namespace)::ThreadInternalsPosix::Start() build_docker/../contrib/grpc/src/core/lib/gprpp/thd_posix.cc:168:5 (clickhouse+0x20be367f) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#11 grpc_core::Thread::Start() build_docker/../contrib/grpc/src/core/lib/gprpp/thd.h:132:14 (clickhouse+0x20a18110) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#12 start_timer_thread_and_unlock() build_docker/../contrib/grpc/src/core/lib/iomgr/timer_manager.cc:93:11 (clickhouse+0x20a18110)
#13 start_threads() build_docker/../contrib/grpc/src/core/lib/iomgr/timer_manager.cc:293:5 (clickhouse+0x20a17ba5) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#14 grpc_timer_manager_init() build_docker/../contrib/grpc/src/core/lib/iomgr/timer_manager.cc:311:3 (clickhouse+0x20a17ba5)
#15 grpc_iomgr_start() build_docker/../contrib/grpc/src/core/lib/iomgr/iomgr.cc:69:27 (clickhouse+0x209ee4d3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#16 grpc_init build_docker/../contrib/grpc/src/core/lib/surface/init.cc:165:5 (clickhouse+0x20a51470) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#17 grpc::internal::GrpcLibrary::init() build_docker/../contrib/grpc/include/grpcpp/impl/grpc_library.h:34:26 (clickhouse+0x2091dfd3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#18 grpc::GrpcLibraryCodegen::GrpcLibraryCodegen(bool) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/grpc_library.h:45:15 (clickhouse+0x208f4819) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#19 grpc::CompletionQueue::CompletionQueue(grpc_completion_queue_attributes const&) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/completion_queue.h:240:3 (clickhouse+0x208f4819)
#20 grpc::ServerCompletionQueue::ServerCompletionQueue(grpc_cq_completion_type, grpc_cq_polling_type, grpc_experimental_completion_queue_functor*) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/completion_queue.h:436:9 (clickhouse+0x2092447b) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#21 grpc::ServerBuilder::AddCompletionQueue(bool) build_docker/../contrib/grpc/src/cpp/server/server_builder.cc:73:41 (clickhouse+0x2092447b)
#22 DB::GRPCServer::start() build_docker/../src/Server/GRPCServer.cpp:1871:21 (clickhouse+0x1cbbb4c7) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#23 DB::ProtocolServerAdapter::GRPCServerAdapterImpl::start() build_docker/../src/Server/ProtocolServerAdapter.cpp:47:42 (clickhouse+0x1cc4f7c3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#24 DB::ProtocolServerAdapter::start() build_docker/../src/Server/ProtocolServerAdapter.h:29:26 (clickhouse+0xb657ff0) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#25 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) build_docker/../programs/server/Server.cpp:1780:24 (clickhouse+0xb657ff0)
#26 Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8 (clickhouse+0x1fffabfd) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#27 DB::Server::run() build_docker/../programs/server/Server.cpp:467:25 (clickhouse+0xb644da3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#28 Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9 (clickhouse+0x2001a116) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#29 mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:182:20 (clickhouse+0xb642274) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#30 main build_docker/../programs/main.cpp:449:12 (clickhouse+0xb63fe6c) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
Previous write of size 8 at 0x7f89eb673540 by thread T197:
#0 mmap <null> (clickhouse+0xb5ee1d3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#1 absl::lts_20211102::base_internal::DoAllocWithArena(unsigned long, absl::lts_20211102::base_internal::LowLevelAlloc::Arena*) build_docker/../contrib/abseil-cpp/absl/base/internal/low_level_alloc.cc:562:21 (clickhouse+0x20e1d962) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#2 absl::lts_20211102::base_internal::LowLevelAlloc::Alloc(unsigned long) build_docker/../contrib/abseil-cpp/absl/base/internal/low_level_alloc.cc:606:18 (clickhouse+0x23a4b7fa) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#3 absl::lts_20211102::synchronization_internal::NewThreadIdentity() build_docker/../contrib/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc:113:24 (clickhouse+0x20deb48e) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#4 absl::lts_20211102::synchronization_internal::CreateThreadIdentity() build_docker/../contrib/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc:129:45 (clickhouse+0x20deb48e)
#5 absl::lts_20211102::synchronization_internal::GetOrCreateCurrentThreadIdentity() build_docker/../contrib/abseil-cpp/absl/synchronization/internal/create_thread_identity.h:51:12 (clickhouse+0x20de93b9) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#6 absl::lts_20211102::Synch_GetPerThread() build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.cc:538:30 (clickhouse+0x20de93b9)
#7 absl::lts_20211102::Synch_GetPerThreadAnnotated(absl::lts_20211102::Mutex*) build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.cc:546:23 (clickhouse+0x20de93b9)
#8 absl::lts_20211102::CondVar::WaitCommon(absl::lts_20211102::Mutex*, absl::lts_20211102::synchronization_internal::KernelTimeout) build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.cc:2550:25 (clickhouse+0x20de93b9)
#9 absl::lts_20211102::CondVar::Wait(absl::lts_20211102::Mutex*) build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.cc:2594:3 (clickhouse+0x20de95c2) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#10 gpr_cv_wait build_docker/../contrib/grpc/src/core/lib/gpr/sync_abseil.cc:85:43 (clickhouse+0x20bdf720) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#11 grpc_core::Executor::ThreadMain(void*) build_docker/../contrib/grpc/src/core/lib/iomgr/executor.cc:231:7 (clickhouse+0x209ed078) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#12 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::operator()(void*) const build_docker/../contrib/grpc/src/core/lib/gprpp/thd_posix.cc:140:27 (clickhouse+0x20be381d) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#13 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) build_docker/../contrib/grpc/src/core/lib/gprpp/thd_posix.cc:110:25 (clickhouse+0x20be381d)
Mutex M0 (0x7fffbf97cc88) created at:
#0 pthread_mutex_lock <null> (clickhouse+0xb5dc8ba) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#1 std::__1::__libcpp_mutex_lock(pthread_mutex_t*) build_docker/../contrib/libcxx/include/__threading_support:303:10 (clickhouse+0x239fcf19) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#2 std::__1::mutex::lock() build_docker/../contrib/libcxx/src/mutex.cpp:33:14 (clickhouse+0x239fcf19)
#3 std::__1::lock_guard<std::__1::mutex>::lock_guard(std::__1::mutex&) build_docker/../contrib/libcxx/include/__mutex_base:91:27 (clickhouse+0xb65753b) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#4 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) build_docker/../programs/server/Server.cpp:1680:29 (clickhouse+0xb65753b)
#5 Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8 (clickhouse+0x1fffabfd) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#6 DB::Server::run() build_docker/../programs/server/Server.cpp:467:25 (clickhouse+0xb644da3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#7 Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9 (clickhouse+0x2001a116) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#8 mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:182:20 (clickhouse+0xb642274) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#9 main build_docker/../programs/main.cpp:449:12 (clickhouse+0xb63fe6c) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
Mutex M1 (0x000025236668) created at:
#0 __tsan_mutex_create <null> (clickhouse+0xb60901f) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#1 absl::lts_20211102::Mutex::Mutex() build_docker/../contrib/abseil-cpp/absl/synchronization/mutex.h:935:3 (clickhouse+0x20bdf4ed) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#2 gpr_mu_init build_docker/../contrib/grpc/src/core/lib/gpr/sync_abseil.cc:46:12 (clickhouse+0x20bdf4ed)
#3 do_basic_init() build_docker/../contrib/grpc/src/core/lib/surface/init.cc:73:3 (clickhouse+0x20a5151d) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#4 decltype(std::declval<void (*&)()>()()) absl::lts_20211102::base_internal::Callable::Invoke<void (*&)()>(void (*&)()) build_docker/../contrib/abseil-cpp/absl/base/internal/invoke.h:153:12 (clickhouse+0x20bdf8b7) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#5 decltype(Invoker<void (*&)()>::type::Invoke(std::declval<void (*&)()>())) absl::lts_20211102::base_internal::invoke<void (*&)()>(void (*&)()) build_docker/../contrib/abseil-cpp/absl/base/internal/invoke.h:180:10 (clickhouse+0x20bdf8b7)
#6 void absl::lts_20211102::base_internal::CallOnceImpl<void (*&)()>(std::__1::atomic<unsigned int>*, absl::lts_20211102::base_internal::SchedulingMode, void (*&)()) build_docker/../contrib/abseil-cpp/absl/base/call_once.h:178:5 (clickhouse+0x20bdf8b7)
#7 void absl::lts_20211102::call_once<void (*&)()>(absl::lts_20211102::once_flag&, void (*&)()) build_docker/../contrib/abseil-cpp/absl/base/call_once.h:210:5 (clickhouse+0x20bdf83b) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#8 gpr_once_init build_docker/../contrib/grpc/src/core/lib/gpr/sync_abseil.cc:113:3 (clickhouse+0x20bdf83b)
#9 grpc_init build_docker/../contrib/grpc/src/core/lib/surface/init.cc:130:3 (clickhouse+0x20a512e1) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#10 grpc::internal::GrpcLibrary::init() build_docker/../contrib/grpc/include/grpcpp/impl/grpc_library.h:34:26 (clickhouse+0x2091dfd3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#11 grpc::GrpcLibraryCodegen::GrpcLibraryCodegen(bool) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/grpc_library.h:45:15 (clickhouse+0x208f4819) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#12 grpc::CompletionQueue::CompletionQueue(grpc_completion_queue_attributes const&) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/completion_queue.h:240:3 (clickhouse+0x208f4819)
#13 grpc::ServerCompletionQueue::ServerCompletionQueue(grpc_cq_completion_type, grpc_cq_polling_type, grpc_experimental_completion_queue_functor*) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/completion_queue.h:436:9 (clickhouse+0x2092447b) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#14 grpc::ServerBuilder::AddCompletionQueue(bool) build_docker/../contrib/grpc/src/cpp/server/server_builder.cc:73:41 (clickhouse+0x2092447b)
#15 DB::GRPCServer::start() build_docker/../src/Server/GRPCServer.cpp:1871:21 (clickhouse+0x1cbbb4c7) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#16 DB::ProtocolServerAdapter::GRPCServerAdapterImpl::start() build_docker/../src/Server/ProtocolServerAdapter.cpp:47:42 (clickhouse+0x1cc4f7c3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#17 DB::ProtocolServerAdapter::start() build_docker/../src/Server/ProtocolServerAdapter.h:29:26 (clickhouse+0xb657ff0) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#18 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) build_docker/../programs/server/Server.cpp:1780:24 (clickhouse+0xb657ff0)
#19 Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8 (clickhouse+0x1fffabfd) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#20 DB::Server::run() build_docker/../programs/server/Server.cpp:467:25 (clickhouse+0xb644da3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#21 Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9 (clickhouse+0x2001a116) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#22 mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:182:20 (clickhouse+0xb642274) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#23 main build_docker/../programs/main.cpp:449:12 (clickhouse+0xb63fe6c) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
Thread T197 'default-executo' (tid=204, running) created by main thread at:
#0 pthread_create <null> (clickhouse+0xb5bebdd) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#1 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&) build_docker/../contrib/grpc/src/core/lib/gprpp/thd_posix.cc:109:10 (clickhouse+0x20be3353) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#2 grpc_core::Thread::Thread(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&) build_docker/../contrib/grpc/src/core/lib/gprpp/thd_posix.cc:186:15 (clickhouse+0x20be3353)
#3 grpc_core::Executor::SetThreading(bool) build_docker/../contrib/grpc/src/core/lib/iomgr/executor.cc:165:9 (clickhouse+0x209ec965) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#4 grpc_core::Executor::Init() build_docker/../contrib/grpc/src/core/lib/iomgr/executor.cc:98:25 (clickhouse+0x209edbd5) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#5 grpc_core::Executor::InitAll() build_docker/../contrib/grpc/src/core/lib/iomgr/executor.cc:400:58 (clickhouse+0x209edbd5)
#6 grpc_iomgr_init() build_docker/../contrib/grpc/src/core/lib/iomgr/iomgr.cc:60:3 (clickhouse+0x209ee3a5) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#7 grpc_init build_docker/../contrib/grpc/src/core/lib/surface/init.cc:149:5 (clickhouse+0x20a5137f) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#8 grpc::internal::GrpcLibrary::init() build_docker/../contrib/grpc/include/grpcpp/impl/grpc_library.h:34:26 (clickhouse+0x2091dfd3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#9 grpc::GrpcLibraryCodegen::GrpcLibraryCodegen(bool) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/grpc_library.h:45:15 (clickhouse+0x208f4819) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#10 grpc::CompletionQueue::CompletionQueue(grpc_completion_queue_attributes const&) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/completion_queue.h:240:3 (clickhouse+0x208f4819)
#11 grpc::ServerCompletionQueue::ServerCompletionQueue(grpc_cq_completion_type, grpc_cq_polling_type, grpc_experimental_completion_queue_functor*) build_docker/../contrib/grpc/include/grpcpp/impl/codegen/completion_queue.h:436:9 (clickhouse+0x2092447b) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#12 grpc::ServerBuilder::AddCompletionQueue(bool) build_docker/../contrib/grpc/src/cpp/server/server_builder.cc:73:41 (clickhouse+0x2092447b)
#13 DB::GRPCServer::start() build_docker/../src/Server/GRPCServer.cpp:1871:21 (clickhouse+0x1cbbb4c7) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#14 DB::ProtocolServerAdapter::GRPCServerAdapterImpl::start() build_docker/../src/Server/ProtocolServerAdapter.cpp:47:42 (clickhouse+0x1cc4f7c3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#15 DB::ProtocolServerAdapter::start() build_docker/../src/Server/ProtocolServerAdapter.h:29:26 (clickhouse+0xb657ff0) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#16 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) build_docker/../programs/server/Server.cpp:1780:24 (clickhouse+0xb657ff0)
#17 Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8 (clickhouse+0x1fffabfd) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#18 DB::Server::run() build_docker/../programs/server/Server.cpp:467:25 (clickhouse+0xb644da3) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#19 Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9 (clickhouse+0x2001a116) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#20 mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:182:20 (clickhouse+0xb642274) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
#21 main build_docker/../programs/main.cpp:449:12 (clickhouse+0xb63fe6c) (BuildId: 6af1fb37fdeff8f4465ca972a35a5806873a31ee)
SUMMARY: ThreadSanitizer: data race build_docker/../contrib/libcxx/include/atomic:1003:12 in int std::__1::__cxx_atomic_fetch_add<int>(std::__1::__cxx_atomic_base_impl<int>*, int, std::__1::memory_order)
==================
ThreadSanitizer: reported 1 warnings
```
</details>
Test has started to fail at master since 16.09.2022
https://play.clickhouse.com/play?user=play#c2VsZWN0IAp0b1N0YXJ0T2ZIb3VyKGNoZWNrX3N0YXJ0X3RpbWUpIGFzIGQsCmNvdW50KCksICBncm91cFVuaXFBcnJheShwdWxsX3JlcXVlc3RfbnVtYmVyKSwgIGFueShyZXBvcnRfdXJsKQpmcm9tIGNoZWNrcyB3aGVyZSAnMjAyMi0wNi0wMScgPD0gY2hlY2tfc3RhcnRfdGltZSBhbmQgdGVzdF9uYW1lIGxpa2UgJyV0ZXN0X2NhbmNlbF93aGlsZV9nZW5lcmF0aW5nX291dHB1dCUnIGFuZCB0ZXN0X3N0YXR1cyBpbiAoJ0ZBSUwnLCAnRkxBS1knKSBncm91cCBieSBkIG9yZGVyIGJ5IGQgZGVzYw==
At that time we switched to llvm-15 https://github.com/ClickHouse/ClickHouse/pull/41046
Started to see some failures with address sanitizer https://github.com/ClickHouse/ClickHouse/issues/41500
| https://github.com/ClickHouse/ClickHouse/issues/42734 | https://github.com/ClickHouse/ClickHouse/pull/44444 | 5df5f7d0dcffd3f56883014b93edfc5dbe476d1b | e49deb740fab90b0aaadad70f4a00f620d55fcd0 | "2022-10-27T10:07:31Z" | c++ | "2022-12-21T13:31:12Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,691 | ["tests/queries/0_stateless/02802_with_cube_with_totals.reference", "tests/queries/0_stateless/02802_with_cube_with_totals.sql"] | Chunk info was not set for chunk in TotalsHavingTransform | https://s3.amazonaws.com/clickhouse-test-reports/42397/302df3af122533a8ddd683100395fdcbd71b55ba/fuzzer_astfuzzerubsan//report.html
```
SELECT tuple((2147483648, (-0., 1.1754943508222875e-38, 2147483646, '-9223372036854775808', NULL))), toInt128(0.0001) GROUP BY ((256, toInt64(1.1754943508222875e-38), NULL), NULL, -0., ((65535, '-92233720368547758.07'), 0.9999), tuple(((1., 3.4028234663852886e38, '1', 0.5), NULL, tuple('0.1')))) WITH CUBE WITH TOTALS
```
```
2022.10.26 04:53:40.167189 [ 390 ] {9fdcd993-4c91-4d0d-a604-1f3b20fc8850} <Fatal> : Logical error: 'Chunk info was not set for chunk in TotalsHavingTransform.'.
2022.10.26 04:54:11.619229 [ 405 ] {} <Fatal> BaseDaemon: ########################################
2022.10.26 04:54:11.619311 [ 405 ] {} <Fatal> BaseDaemon: (version 22.10.1.1, build id: C53EFE427CDEE1E7498828AD91A2A459F61B57C2) (from thread 390) (query_id: 9fdcd993-4c91-4d0d-a604-1f3b20fc8850) (query: SELECT tuple((2147483648, (-0., 1.1754943508222875e-38, 2147483646, '-9223372036854775808', NULL))), toInt128(0.0001) GROUP BY ((256, toInt64(1.1754943508222875e-38), NULL), NULL, -0., ((65535, '-92233720368547758.07'), 0.9999), tuple(((1., 3.4028234663852886e38, '1', 0.5), NULL, tuple('0.1')))) WITH CUBE WITH TOTALS) Received signal Aborted (6)
2022.10.26 04:54:11.619366 [ 405 ] {} <Fatal> BaseDaemon:
2022.10.26 04:54:11.619451 [ 405 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fb6b986100b 0x7fb6b9840859 0x1fc909c3 0x1fc90c6f 0x2d0df5c0 0x2560f04b 0x2cc14edc 0x2cc3fb74 0x2cc2f95b 0x2cc2f196 0x2cc2ef4a 0x2cc44414 0x1fd75d73 0x1fd79b64 0x7fb6b9a18609 0x7fb6b993d133
2022.10.26 04:54:11.619532 [ 405 ] {} <Fatal> BaseDaemon: 3. raise @ 0x7fb6b986100b in ?
2022.10.26 04:54:11.619597 [ 405 ] {} <Fatal> BaseDaemon: 4. abort @ 0x7fb6b9840859 in ?
2022.10.26 04:54:11.648127 [ 405 ] {} <Fatal> BaseDaemon: 5. ./build_docker/../src/Common/Exception.cpp:47: DB::abortOnFailedAssertion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1fc909c3 in /workspace/clickhouse
2022.10.26 04:54:11.664984 [ 405 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../src/Common/Exception.cpp:70: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x1fc90c6f in /workspace/clickhouse
2022.10.26 04:54:11.682032 [ 405 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../src/Processors/Transforms/TotalsHavingTransform.cpp:155: DB::TotalsHavingTransform::transform(DB::Chunk&) @ 0x2d0df5c0 in /workspace/clickhouse
2022.10.26 04:54:11.699911 [ 405 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../src/Processors/ISimpleTransform.h:33: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x2560f04b in /workspace/clickhouse
2022.10.26 04:54:11.712932 [ 405 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../src/Processors/ISimpleTransform.cpp:99: DB::ISimpleTransform::work() @ 0x2cc14edc in /workspace/clickhouse
2022.10.26 04:54:11.720365 [ 405 ] {} <Fatal> BaseDaemon: 10.1. inlined from ./build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:50: DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*)
2022.10.26 04:54:11.720395 [ 405 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92: DB::ExecutionThreadContext::executeTask() @ 0x2cc3fb74 in /workspace/clickhouse
2022.10.26 04:54:11.738584 [ 405 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:229: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x2cc2f95b in /workspace/clickhouse
2022.10.26 04:54:11.754928 [ 405 ] {} <Fatal> BaseDaemon: 12. ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:0: DB::PipelineExecutor::executeImpl(unsigned long) @ 0x2cc2f196 in /workspace/clickhouse
2022.10.26 04:54:11.772722 [ 405 ] {} <Fatal> BaseDaemon: 13.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:284: std::__1::unique_ptr<DB::ExecutingGraph, std::__1::default_delete<DB::ExecutingGraph> >::operator->() const
2022.10.26 04:54:11.772755 [ 405 ] {} <Fatal> BaseDaemon: 13. ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:93: DB::PipelineExecutor::execute(unsigned long) @ 0x2cc2ef4a in /workspace/clickhouse
2022.10.26 04:54:11.788926 [ 405 ] {} <Fatal> BaseDaemon: 14.1. inlined from ./build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:0: DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long)
2022.10.26 04:54:11.788960 [ 405 ] {} <Fatal> BaseDaemon: 14.2. inlined from ./build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:107: operator()
2022.10.26 04:54:11.789004 [ 405 ] {} <Fatal> BaseDaemon: 14.3. inlined from ./build_docker/../contrib/libcxx/include/type_traits:3648: decltype(static_cast<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&)
2022.10.26 04:54:11.789052 [ 405 ] {} <Fatal> BaseDaemon: 14.4. inlined from ./build_docker/../contrib/libcxx/include/tuple:1595: decltype(auto) std::__1::__apply_tuple_impl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>)
2022.10.26 04:54:11.789098 [ 405 ] {} <Fatal> BaseDaemon: 14.5. inlined from ./build_docker/../contrib/libcxx/include/tuple:1604: decltype(auto) std::__1::apply<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&)
2022.10.26 04:54:11.789139 [ 405 ] {} <Fatal> BaseDaemon: 14.6. inlined from ./build_docker/../src/Common/ThreadPool.h:196: operator()
2022.10.26 04:54:11.789183 [ 405 ] {} <Fatal> BaseDaemon: 14.7. inlined from ./build_docker/../contrib/libcxx/include/type_traits:3640: decltype(static_cast<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)
2022.10.26 04:54:11.789237 [ 405 ] {} <Fatal> BaseDaemon: 14.8. inlined from ./build_docker/../contrib/libcxx/include/__functional/invoke.h:61: void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&)
2022.10.26 04:54:11.789285 [ 405 ] {} <Fatal> BaseDaemon: 14.9. inlined from ./build_docker/../contrib/libcxx/include/__functional/function.h:230: std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>::operator()()
2022.10.26 04:54:11.789327 [ 405 ] {} <Fatal> BaseDaemon: 14. ./build_docker/../contrib/libcxx/include/__functional/function.h:711: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x2cc44414 in /workspace/clickhouse
2022.10.26 04:54:11.801086 [ 405 ] {} <Fatal> BaseDaemon: 15.1. inlined from ./build_docker/../base/base/strong_typedef.h:23: StrongTypedef<std::__1::integral_constant<bool, true> >
2022.10.26 04:54:11.801115 [ 405 ] {} <Fatal> BaseDaemon: 15.2. inlined from ./build_docker/../src/Common/OpenTelemetryTraceContext.h:39: DB::OpenTelemetry::Span::isTraceEnabled() const
2022.10.26 04:54:11.801166 [ 405 ] {} <Fatal> BaseDaemon: 15. ./build_docker/../src/Common/ThreadPool.cpp:296: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x1fd75d73 in /workspace/clickhouse
2022.10.26 04:54:11.815681 [ 405 ] {} <Fatal> BaseDaemon: 16. ./build_docker/../src/Common/ThreadPool.cpp:0: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) @ 0x1fd79b64 in /workspace/clickhouse
2022.10.26 04:54:11.815713 [ 405 ] {} <Fatal> BaseDaemon: 17. ? @ 0x7fb6b9a18609 in ?
2022.10.26 04:54:11.815770 [ 405 ] {} <Fatal> BaseDaemon: 18. __clone @ 0x7fb6b993d133 in ?
2022.10.26 04:54:12.130567 [ 405 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: F7E1787AA51487D37DB4050A42981718)
``` | https://github.com/ClickHouse/ClickHouse/issues/42691 | https://github.com/ClickHouse/ClickHouse/pull/51352 | 10fd4d6372c6b316cd00a809a454b4a47982a4c3 | ffbb11dc190547e4b3088dea35c118d95724123a | "2022-10-26T12:26:22Z" | c++ | "2023-07-07T23:27:38Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,638 | ["base/base/safeExit.cpp"] | Temporary remove Azure Blob Storage support, because a test has failed. | See https://github.com/Azure/azure-sdk-for-cpp/issues/4047
Note: there is no intent to remove the Azure Blob Storage support from ClickHouse.
But after upgrading to LLVM-15, it starts to complain about this issue, and we need to eliminate it to simply move forward. | https://github.com/ClickHouse/ClickHouse/issues/42638 | https://github.com/ClickHouse/ClickHouse/pull/43009 | c5edea19f381076fb01184fb2d31b91393d4bba6 | fc77d53db1165ffc01af356b2b44cb52976a4270 | "2022-10-25T03:10:48Z" | c++ | "2022-11-07T19:20:53Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,637 | ["src/Interpreters/MutationsInterpreter.cpp", "tests/queries/0_stateless/02504_disallow_arrayjoin_in_mutations.reference", "tests/queries/0_stateless/02504_disallow_arrayjoin_in_mutations.sql"] | `arrayJoin` in mutation can lead to logical error `Trying to get non existing mark 2, while size is 2` | **Describe the bug**
https://s3.amazonaws.com/clickhouse-test-reports/42463/4645d465b12013d99d88956020034cbfa47d9455/fuzzer_astfuzzerubsan//server.log
**How to reproduce**
```
CREATE TABLE test_wide_nested (`id` Int, `info.id` Array(Int), `info.name` Array(String), `info.age` Array(Int)) ENGINE = MergeTree ORDER BY tuple() SETTINGS min_bytes_for_wide_part = 0
INSERT INTO test_wide_nested SELECT number, [number, number + 1], ['aa', 'bb'], [number, number * 2] FROM numbers(5)
ALTER TABLE test_wide_nested UPDATE `info.id` = [100, 200, 300], `info.age` = [10, 20, 30], `info.name` = ['a', 'b', 'c'] WHERE arrayJoin([100, -2147483647, NULL]) = id
```
(note: it is not instantly reproducible, needs more investigation) | https://github.com/ClickHouse/ClickHouse/issues/42637 | https://github.com/ClickHouse/ClickHouse/pull/44447 | adfc4d4a239f2007e6bd1a47d124943dc94985ed | f629425f96c462b842d7218c3b0c462627ed86ba | "2022-10-25T03:07:46Z" | c++ | "2023-01-05T17:00:16Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,632 | ["src/Functions/FunctionsJSON.cpp", "tests/performance/low_cardinality_from_json.xml", "tests/queries/0_stateless/02452_check_low_cardinality.reference", "tests/queries/0_stateless/02452_check_low_cardinality.sql", "tests/queries/0_stateless/02455_extract_fixed_string_from_nested_json.reference", "tests/queries/0_stateless/02455_extract_fixed_string_from_nested_json.sql"] | Crash in function `JSONExtract` with `LowCardinality` | **Describe the bug**
[A link to the report
](https://s3.amazonaws.com/clickhouse-test-reports/0/bef3c71453b14efc72e4b2ce37f2ec87f69b4e40/fuzzer_astfuzzerasan//report.html)
**How to reproduce**
```sql
select JSONExtract('{"a" : {"b" : {"c" : 1, "d" : "str"}}}', 'Tuple( a LowCardinality(String), b LowCardinality(String), c LowCardinality(String), d LowCardinality(String))')
```
```
2022.10.24 23:07:03.404418 [ 875356 ] {daaaee1e-142e-4792-b640-0381dd1c7b39} <Debug> executeQuery: (from [::ffff:127.0.0.1]:57844) select JSONExtract('{"a" : {"b" : {"c" : 1, "d" : "str"}}}', 'Tuple( a LowCardinality(String), b LowCardinality(String), c LowCardinality(String), d LowCardinality(String))') (stage: Complete)
2022.10.24 23:07:03.404876 [ 875349 ] {} <Trace> BaseDaemon: Received signal 11
2022.10.24 23:07:03.405132 [ 875639 ] {} <Fatal> BaseDaemon: ########################################
2022.10.24 23:07:03.405223 [ 875639 ] {} <Fatal> BaseDaemon: (version 22.10.1.1674 (official build), build id: 30C9EDE94CF3A917D6FB0B915707FA38D8271475) (from thread 875356) (query_id: daaaee1e-142e-4792-b640-0381dd1c7b39) (query: select JSONExtract('{"a" : {"b" : {"c" : 1, "d" : "str"}}}', 'Tuple( a LowCardinality(String), b LowCardinality(String), c LowCardinality(String), d LowCardinality(String))')) Received signal Segmentation fault (11)
2022.10.24 23:07:03.405275 [ 875639 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: write. Address not mapped to object.
2022.10.24 23:07:03.405317 [ 875639 ] {} <Fatal> BaseDaemon: Stack trace: 0x88df8bb 0x88df3e9 0x88df0f2 0x88e73b7 0x88ebf1a 0x88e396b 0x7bf4b4a 0x1140dc31 0x1140d701 0x1140dbd5 0x1140e577 0x1140f868 0x11b00372 0x11fe3fad 0x11feea2f 0x11fe994a 0x11fec7d8 0x11fac95c 0x11fac6fe 0x11fbc745 0x11fc183d 0x124c1523 0x124b9c75 0x124b49c0 0x124ff382 0x124fd100 0x124736df 0x128035c0 0x12800ead 0x133c6084 0x133da079 0x161f05cf 0x161f295b 0x163ae1f2 0x163ab97d 0x7f8ad311d609 0x7f8ad3042163
2022.10.24 23:07:04.165660 [ 875639 ] {} <Fatal> BaseDaemon: 2. DB::writeChar(char, DB::WriteBuffer&) @ 0x88df8bb in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:04.903069 [ 875639 ] {} <Fatal> BaseDaemon: 3. DB::JSONExtractRawImpl<DB::SimdJSONParser>::traverse(DB::SimdJSONParser::Element const&, DB::WriteBuffer&) @ 0x88df3e9 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:05.639914 [ 875639 ] {} <Fatal> BaseDaemon: 4. DB::JSONExtractRawImpl<DB::SimdJSONParser>::insertResultToColumn(DB::IColumn&, DB::SimdJSONParser::Element const&, std::__1::basic_string_view<char, std::__1::char_traits<char> >) @ 0x88df0f2 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:06.376322 [ 875639 ] {} <Fatal> BaseDaemon: 5. DB::JSONExtractTree<DB::SimdJSONParser>::StringNode::insertResultToColumn(DB::IColumn&, DB::SimdJSONParser::Element const&) @ 0x88e73b7 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:07.113269 [ 875639 ] {} <Fatal> BaseDaemon: 6. DB::JSONExtractTree<DB::SimdJSONParser>::TupleNode::insertResultToColumn(DB::IColumn&, DB::SimdJSONParser::Element const&) @ 0x88ebf1a in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:07.849269 [ 875639 ] {} <Fatal> BaseDaemon: 7. DB::ExecutableFunctionJSON<DB::NameJSONExtract, DB::JSONExtractImpl>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x88e396b in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.586973 [ 875639 ] {} <Fatal> BaseDaemon: 8. DB::IExecutableFunction::executeDryRunImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x7bf4b4a in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.595447 [ 875639 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../src/Functions/IFunction.cpp:0: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1140dc31 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.602987 [ 875639 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../src/Functions/IFunction.cpp:0: DB::IExecutableFunction::defaultImplementationForConstantArguments(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1140d701 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.610610 [ 875639 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../src/Functions/IFunction.cpp:0: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1140dbd5 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.618604 [ 875639 ] {} <Fatal> BaseDaemon: 12.1. inlined from ./build_docker/../contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:115: intrusive_ptr
2022.10.24 23:07:08.618627 [ 875639 ] {} <Fatal> BaseDaemon: 12.2. inlined from ./build_docker/../contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:122: boost::intrusive_ptr<DB::IColumn const>::operator=(boost::intrusive_ptr<DB::IColumn const>&&)
2022.10.24 23:07:08.618645 [ 875639 ] {} <Fatal> BaseDaemon: 12.3. inlined from ./build_docker/../src/Common/COW.h:136: COW<DB::IColumn>::immutable_ptr<DB::IColumn>::operator=(COW<DB::IColumn>::immutable_ptr<DB::IColumn>&&)
2022.10.24 23:07:08.618679 [ 875639 ] {} <Fatal> BaseDaemon: 12. ./build_docker/../src/Functions/IFunction.cpp:302: DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1140e577 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.627273 [ 875639 ] {} <Fatal> BaseDaemon: 13.1. inlined from ./build_docker/../contrib/libcxx/include/vector:399: ~vector
2022.10.24 23:07:08.627320 [ 875639 ] {} <Fatal> BaseDaemon: 13. ./build_docker/../src/Functions/IFunction.cpp:373: DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1140f868 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.697731 [ 875639 ] {} <Fatal> BaseDaemon: 14. ./build_docker/../src/Interpreters/ActionsDAG.cpp:0: DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node const*, std::__1::allocator<DB::ActionsDAG::Node const*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x11b00372 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.739921 [ 875639 ] {} <Fatal> BaseDaemon: 15. ./build_docker/../src/Interpreters/ActionsVisitor.cpp:0: DB::ScopeStack::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x11fe3fad in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.790495 [ 875639 ] {} <Fatal> BaseDaemon: 16.1. inlined from ./build_docker/../contrib/libcxx/include/string:1445: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const
2022.10.24 23:07:08.790519 [ 875639 ] {} <Fatal> BaseDaemon: 16.2. inlined from ./build_docker/../contrib/libcxx/include/string:2231: ~basic_string
2022.10.24 23:07:08.790533 [ 875639 ] {} <Fatal> BaseDaemon: 16. ./build_docker/../src/Interpreters/ActionsVisitor.h:182: DB::ActionsMatcher::Data::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x11feea2f in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.834041 [ 875639 ] {} <Fatal> BaseDaemon: 17.1. inlined from ./build_docker/../contrib/libcxx/include/string:1445: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const
2022.10.24 23:07:08.834064 [ 875639 ] {} <Fatal> BaseDaemon: 17.2. inlined from ./build_docker/../contrib/libcxx/include/string:2231: ~basic_string
2022.10.24 23:07:08.834102 [ 875639 ] {} <Fatal> BaseDaemon: 17. ./build_docker/../src/Interpreters/ActionsVisitor.cpp:1296: DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x11fe994a in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.880922 [ 875639 ] {} <Fatal> BaseDaemon: 18. ./build_docker/../src/Interpreters/ActionsVisitor.cpp:826: DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x11fec7d8 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.24 23:07:08.917904 [ 875639 ] {} <Fatal> BaseDaemon: 19.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:816: std::__1::shared_ptr<DB::IAST>::operator->() const
2022.10.24 23:07:08.917931 [ 875639 ] {} <Fatal> BaseDaemon: 19.2. inlined from ./build_docker/../src/Interpreters/InDepthNodeVisitor.h:56: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, false, std::__1::shared_ptr<DB::IAST> const>::visitChildren(std::__1::shared_ptr<DB::IAST> const&)
2022.10.24 23:07:08.917947 [ 875639 ] {} <Fatal> BaseDaemon: 19. ./build_docker/../src/Interpreters/InDepthNodeVisitor.h:46: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, false, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0x11fac95c in /usr/lib/debug/usr/bin/clickhouse.debug
```
| https://github.com/ClickHouse/ClickHouse/issues/42632 | https://github.com/ClickHouse/ClickHouse/pull/42633 | 8c6d5cdbac1d17c60a48432ae6cd135702e554a8 | 011ae8675a2f35c0fff427709457e46effb9a32b | "2022-10-24T23:11:56Z" | c++ | "2022-10-26T06:10:27Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,631 | ["tests/queries/0_stateless/02803_remote_cannot_clone_block.reference", "tests/queries/0_stateless/02803_remote_cannot_clone_block.sql"] | Logical error: 'Cannot clone block with columns because block has 0 columns, but 1 columns given' | **Describe the bug**
[A link to the report
](https://s3.amazonaws.com/clickhouse-test-reports/0/bef3c71453b14efc72e4b2ce37f2ec87f69b4e40/fuzzer_astfuzzerubsan//report.html)
**How to reproduce**
```sql
DROP TABLE IF EXISTS numbers_10_00223;
CREATE TABLE numbers_10_00223
ENGINE = Log AS
SELECT *
FROM system.numbers
LIMIT 10000;
SELECT *
FROM
(
SELECT 1
FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_10_00223)
WITH TOTALS
)
WHERE 1
GROUP BY 1;
```
```
2022.10.24 22:47:29.312341 [ 870320 ] {9ee9d8af-c8c1-4035-9237-1dd401f62de0} <Error> executeQuery: Code: 49. DB::Exception: Cannot clone block with columns because block has 0 columns, but 1 columns given. (LOGICAL_ERROR) (version 22.10.1.1) (from [::ffff:127.0.0.1]:54602) (in query: SELECT * FROM (SELECT 1 FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_10_00223) WITH TOTALS) WHERE 1 GROUP BY 1), Stack trace (when copying this message, always include the lines below):
0. /fasttest-workspace/build/../../ClickHouse/contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x10f0c3ec in /usr/bin/clickhouse
1. /fasttest-workspace/build/../../ClickHouse/src/Common/Exception.cpp:69: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xb6064ba in /usr/bin/clickhouse
2. DB::Exception::Exception<unsigned long&, unsigned long>(int, fmt::v8::basic_format_string<char, fmt::v8::type_identity<unsigned long&>::type, fmt::v8::type_identity<unsigned long>::type>, unsigned long&, unsigned long&&) @ 0x71f110c in /usr/bin/clickhouse
3. /fasttest-workspace/build/../../ClickHouse/src/Core/Block.cpp:546: DB::Block::cloneWithColumns(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > > const&) const @ 0xeff7158 in /usr/bin/clickhouse
4. /fasttest-workspace/build/../../ClickHouse/contrib/libcxx/include/vector:399: DB::MergingAggregatedBucketTransform::transform(DB::Chunk&) @ 0x107b266e in /usr/bin/clickhouse
5. /fasttest-workspace/build/../../ClickHouse/contrib/libcxx/include/__utility/swap.h:35: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0xd781df0 in /usr/bin/clickhouse
6. /fasttest-workspace/build/../../ClickHouse/src/Processors/ISimpleTransform.cpp:99: DB::ISimpleTransform::work() @ 0x106b1ab0 in /usr/bin/clickhouse
7. /fasttest-workspace/build/../../ClickHouse/src/Processors/Executors/ExecutionThreadContext.cpp:0: DB::ExecutionThreadContext::executeTask() @ 0x106ccd59 in /usr/bin/clickhouse
8. /fasttest-workspace/build/../../ClickHouse/src/Processors/Executors/PipelineExecutor.cpp:228: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x106c365b in /usr/bin/clickhouse
9. /fasttest-workspace/build/../../ClickHouse/src/Processors/Executors/PipelineExecutor.cpp:0: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x106c4a75 in /usr/bin/clickhouse
10. /fasttest-workspace/build/../../ClickHouse/base/base/wide_integer_impl.h:772: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xb699d3e in /usr/bin/clickhouse
11. /fasttest-workspace/build/../../ClickHouse/contrib/libcxx/include/__memory/unique_ptr.h:312: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) @ 0xb69ca4e in /usr/bin/clickhouse
12. ? @ 0x7f08d17ee609 in ?
13. __clone @ 0x7f08d1a77163 in ?
0 rows in set. Elapsed: 0.008 sec.
Received exception from server (version 22.10.1):
``` | https://github.com/ClickHouse/ClickHouse/issues/42631 | https://github.com/ClickHouse/ClickHouse/pull/51353 | 91f9b09cef928f4b4fc165fe7898bbc8541004ff | 17693fbdc949473a060fdb6ba06a5fbfbba84c80 | "2022-10-24T22:49:25Z" | c++ | "2023-06-30T09:20:55Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,629 | ["tests/integration/test_global_overcommit_tracker/configs/global_overcommit_tracker.xml", "tests/integration/test_global_overcommit_tracker/test.py", "tests/integration/test_overcommit_tracker/__init__.py", "tests/integration/test_overcommit_tracker/test.py", "tests/queries/0_stateless/02104_overcommit_memory.reference", "tests/queries/0_stateless/02104_overcommit_memory.sh"] | Test 02104_overcommit_memory is flaky in debug | Started October 20th as I see
https://play.clickhouse.com/play?user=play#c2VsZWN0IAp0b1N0YXJ0T2ZIb3VyKGNoZWNrX3N0YXJ0X3RpbWUpIGFzIGQsCmNvdW50KCksIGdyb3VwVW5pcUFycmF5KHB1bGxfcmVxdWVzdF9udW1iZXIpLCAgYW55KHJlcG9ydF91cmwpCmZyb20gY2hlY2tzIHdoZXJlICcyMDIyLTAxLTAxJyA8PSBjaGVja19zdGFydF90aW1lIGFuZCB0ZXN0X25hbWUgbGlrZSAnJTAyMTA0X292ZXJjb21taXRfbWVtb3J5JScgYW5kIHRlc3Rfc3RhdHVzIGluICgnRkFJTCcsICdGTEFLWScpIGdyb3VwIGJ5IGQgb3JkZXIgYnkgZCBkZXNj
| https://github.com/ClickHouse/ClickHouse/issues/42629 | https://github.com/ClickHouse/ClickHouse/pull/43105 | 505af344c411f1539fcf637b70520e43bb678813 | 31794284cb326e6a0cd0092e5432aaf6579dd5b3 | "2022-10-24T21:09:51Z" | c++ | "2022-11-11T16:34:53Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,610 | ["tests/queries/0_stateless/01910_view_dictionary_check_refresh.reference", "tests/queries/0_stateless/01910_view_dictionary_check_refresh.sql"] | Dictionary relead from the view issue | It seems clickhouse somehow caches the scalar subquery used in the VIEW (which is a dictionary source):
Test case:
```sql
DROP TABLE IF EXISTS TestTbl;
DROP VIEW IF EXISTS TestTbl_view;
DROP DICTIONARY IF EXISTS TestTblDict;
CREATE TABLE TestTbl
(
`id` UInt16,
`dt` Date,
`val` String
)
ENGINE = MergeTree
PARTITION BY dt
ORDER BY (id);
CREATE VIEW TestTbl_view
AS
SELECT *
FROM TestTbl
WHERE dt = ( SELECT max(dt) FROM TestTbl );
CREATE DICTIONARY IF NOT EXISTS TestTblDict
(
`id` UInt16,
`dt` Date,
`val` String
)
PRIMARY KEY id
SOURCE(CLICKHOUSE(HOST 'localhost' TABLE TestTbl_view DB currentDatabase()))
LIFETIME(1)
LAYOUT(COMPLEX_KEY_HASHED());
insert into TestTbl (dt,id, val) values( '2022-10-20', 1, 'foo');
select * FROM TestTbl_view;
select * FROM TestTblDict;
insert into TestTbl (dt,id, val) values( '2022-10-21', 1, 'bar');
SELECT sleep(2); -- should be enough to reload (lifetime is 1 sec).
select * FROM TestTbl_view;
select * FROM TestTblDict; -- old value!
-- forced reload help
SYSTEM RELOAD DICTIONARY TestTblDict;
select * FROM TestTbl_view;
select * FROM TestTblDict; -- now it's ok
``` | https://github.com/ClickHouse/ClickHouse/issues/42610 | https://github.com/ClickHouse/ClickHouse/pull/50409 | 413b9c776ab5f6783ba05a704aafb0cac443b337 | 2fbf826b5c41bb46d70825598d21a5587423a138 | "2022-10-24T10:26:46Z" | c++ | "2023-06-01T22:16:59Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,548 | ["src/Client/ClientBase.cpp", "tests/queries/0_stateless/02473_infile_progress.py", "tests/queries/0_stateless/02473_infile_progress.reference"] | No progress indication on INSERT FROM INFILE. | ```
milovidov-desktop :) CREATE TABLE hits2 AS hits
CREATE TABLE hits2 AS hits
Query id: ef73b907-c73b-42ba-8194-db88c88cc85b
Ok.
0 rows in set. Elapsed: 0.024 sec.
milovidov-desktop :) INSERT INTO hits2 FROM INFILE 'hits.tsv'
INSERT INTO hits2 FROM INFILE 'hits.tsv'
Query id: 0588941e-ff9e-4741-97ce-7784aee1e253
↓ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)
```
Two problems:
- no progress;
- it is displaying a fractional number of rows (`0.00`). | https://github.com/ClickHouse/ClickHouse/issues/42548 | https://github.com/ClickHouse/ClickHouse/pull/42634 | c88dcba36e0e036f7a1208a8aea9cd366b6a8653 | 9f7f1f05b6315573e43a4abb16224eb70b6b4493 | "2022-10-20T23:15:39Z" | c++ | "2022-11-08T02:58:38Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,533 | ["src/Functions/array/arrayElement.cpp", "tests/queries/0_stateless/02473_map_element_nullable.reference", "tests/queries/0_stateless/02473_map_element_nullable.sql"] | Bad cast in `arrayElement` with type `Map` and `Nullable` value and `Nullable` index | **Describe the bug**
[A link to the report
](https://s3.amazonaws.com/clickhouse-test-reports/42516/00f9ae99249c636320141607ee51dac170ae6938/fuzzer_astfuzzerasan//report.html)
**How to reproduce**
```sql
WITH map(1, 2, 3, NULL) AS m
SELECT toTypeName(m);
┌─toTypeName(m)───────────────┐
│ Map(UInt8, Nullable(UInt8)) │
└─────────────────────────────┘
SELECT
map(1, 2, 3, NULL) AS m,
m[toNullable(1)]
```
```
2022.10.20 13:32:01.108662 [ 1119659 ] {3b38465f-ef53-477d-9274-3f7284a05c8c} <Debug> executeQuery: (from [::ffff:127.0.0.1]:41364) select map(1, 2, 3, NULL) as m, m[toNullable(1)] (stage: Complete)
2022.10.20 13:32:01.109375 [ 1119659 ] {3b38465f-ef53-477d-9274-3f7284a05c8c} <Error> executeQuery: Code: 49. DB::Exception: Bad cast from type DB::DataTypeNumber<char8_t> to DB::DataTypeNullable: While processing map(1, 2, 3, NULL) AS m, m[toNullable(1)]. (LOGICAL_ERROR) (version 22.10.1.1) (from [::ffff:127.0.0.1]:41364) (in query: select map(1, 2, 3, NULL) as m, m[toNullable(1)]), Stack trace (when copying this message, always include the lines below):
0. ./build_clang/./contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x17db630c in /usr/local/bin/clickhouse
1. ./build_clang/./src/Common/Exception.cpp:69: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xfe75d5a in /usr/local/bin/clickhouse
2. DB::DataTypeNullable const& typeid_cast<DB::DataTypeNullable const&, DB::IDataType const>(DB::IDataType const&) @ 0xfad5a3f in /usr/local/bin/clickhouse
3. DB::FunctionArrayElement::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xfac1ac3 in /usr/local/bin/clickhouse
4. DB::FunctionArrayElement::executeMap(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xfac11f9 in /usr/local/bin/clickhouse
5. DB::FunctionArrayElement::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xfac19cf in /usr/local/bin/clickhouse
6. DB::IFunction::executeImplDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xb4eb80a in /usr/local/bin/clickhouse
7. DB::FunctionToExecutableFunctionAdaptor::executeDryRunImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xb4eb4ce in /usr/local/bin/clickhouse
8. ./build_clang/./src/Functions/IFunction.cpp:0: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x13dbd911 in /usr/local/bin/clickhouse
9. ./build_clang/./src/Functions/IFunction.cpp:0: DB::IExecutableFunction::defaultImplementationForNulls(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x13dbdb4e in /usr/local/bin/clickhouse
10. ./build_clang/./src/Functions/IFunction.cpp:0: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x13dbd8dd in /usr/local/bin/clickhouse
11. ./build_clang/./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:200: DB::IExecutableFunction::defaultImplementationForConstantArguments(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x13dbd43c in /usr/local/bin/clickhouse
12. ./build_clang/./src/Functions/IFunction.cpp:0: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x13dbd8b5 in /usr/local/bin/clickhouse
13. ./build_clang/./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:115: DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x13dbe140 in /usr/local/bin/clickhouse
14. ./build_clang/./src/Functions/IFunction.cpp:372: DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x13dbf0dc in /usr/local/bin/clickhouse
15. ./build_clang/./src/Interpreters/ActionsDAG.cpp:0: DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node const*, std::__1::allocator<DB::ActionsDAG::Node const*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1434bc2a in /usr/local/bin/clickhouse
16. ./build_clang/./src/Interpreters/ActionsVisitor.cpp:0: DB::ScopeStack::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1478115c in /usr/local/bin/clickhouse
17. ./build_clang/./contrib/libcxx/include/string:1445: DB::ActionsMatcher::Data::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1478c72f in /usr/local/bin/clickhouse
18. ./build_clang/./contrib/libcxx/include/string:1445: DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x14785ec9 in /usr/local/bin/clickhouse
19. ./build_clang/./src/Interpreters/ActionsVisitor.cpp:0: DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x14788b4b in /usr/local/bin/clickhouse
20. ./build_clang/./src/Interpreters/InDepthNodeVisitor.h:46: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, false, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0x1476bf5a in /usr/local/bin/clickhouse
21. ./build_clang/./src/Interpreters/ActionsVisitor.h:187: DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) @ 0x1475b9de in /usr/local/bin/clickhouse
22. ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:702: DB::SelectQueryExpressionAnalyzer::appendSelect(DB::ExpressionActionsChain&, bool) @ 0x14764bb4 in /usr/local/bin/clickhouse
23. ./build_clang/./src/Interpreters/ExpressionAnalyzer.cpp:0: DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterDAGInfo> const&, std::__1::shared_ptr<DB::FilterDAGInfo> const&, DB::Block const&) @ 0x14768d0e in /usr/local/bin/clickhouse
24. ./build_clang/./src/Interpreters/InterpreterSelectQuery.cpp:804: DB::InterpreterSelectQuery::getSampleBlockImpl() @ 0x14bb1ae6 in /usr/local/bin/clickhouse
25. ./build_clang/./src/Interpreters/InterpreterSelectQuery.cpp:637: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::PreparedSets>)::$_1::operator()(bool) const @ 0x14babf03 in /usr/local/bin/clickhouse
26. ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:816: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::PreparedSets>) @ 0x14ba7efb in /usr/local/bin/clickhouse
27. ./build_clang/./contrib/libcxx/include/optional:237: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x14ba5eb1 in /usr/local/bin/clickhouse
28. ./build_clang/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:247: DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::__1::shared_ptr<DB::IAST> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x14bea15a in /usr/local/bin/clickhouse
29. ./build_clang/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:146: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context>, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x14be8741 in /usr/local/bin/clickhouse
30. ./build_clang/./contrib/libcxx/include/vector:399: std::__1::__unique_if<DB::InterpreterSelectWithUnionQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectWithUnionQuery, std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>&, DB::SelectQueryOptions const&>(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>&, DB::SelectQueryOptions const&) @ 0x14b76153 in /usr/local/bin/clickhouse
31. ./build_clang/./src/Interpreters/InterpreterFactory.cpp:0: DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>, DB::SelectQueryOptions const&) @ 0x14b75556 in /usr/local/bin/clickhouse | https://github.com/ClickHouse/ClickHouse/issues/42533 | https://github.com/ClickHouse/ClickHouse/pull/42623 | 5c4444237e689e553502c3cda8a0214dcd7af458 | e2ff7aa261b87795e1cbb8d9d6db4355a3115e1c | "2022-10-20T13:34:03Z" | c++ | "2022-10-25T12:59:52Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,502 | ["src/Formats/newLineSegmentationEngine.cpp", "src/Formats/newLineSegmentationEngine.h", "src/Formats/registerFormats.cpp", "src/Processors/Formats/Impl/LineAsStringRowInputFormat.cpp", "src/Processors/Formats/Impl/RegexpRowInputFormat.cpp", "tests/performance/line_as_string_parsing.xml"] | `LineAsString` format can be faster; and it does not support parallel parsing. | ```
yes | clickhouse-local --format LineAsString --structure 'line String' --progress --query "SELECT * FROM table" > /dev/null
``` | https://github.com/ClickHouse/ClickHouse/issues/42502 | https://github.com/ClickHouse/ClickHouse/pull/42780 | 8ec4c773528e773c0c61dce89252c6bcc4eadee8 | 38124b65331426ab9a96285cc04b573b8950c8bb | "2022-10-19T18:15:30Z" | c++ | "2022-11-02T12:21:53Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,460 | ["src/Interpreters/Set.cpp", "tests/queries/0_stateless/02467_set_with_lowcardinality_type.reference", "tests/queries/0_stateless/02467_set_with_lowcardinality_type.sql"] | Segfault in bloom filter index with `Nullable(String)` and `LowCardinality(String)` columns | **Describe the bug**
[A link to the report
](https://s3.amazonaws.com/clickhouse-test-reports/0/4dd41cc1b73ee55f2174b27a8cd43e2f1b87b87e/fuzzer_astfuzzerubsan//report.html)
**How to reproduce**
```sql
DROP TABLE IF EXISTS bloom_filter_nullable_index__fuzz_0;
CREATE TABLE bloom_filter_nullable_index__fuzz_0
(
`order_key` UInt64,
`str` Nullable(String),
INDEX idx str TYPE bloom_filter GRANULARITY 1
)
ENGINE = MergeTree ORDER BY order_key SETTINGS index_granularity = 6;
INSERT INTO bloom_filter_nullable_index__fuzz_0 VALUES (1, 'test');
INSERT INTO bloom_filter_nullable_index__fuzz_0 VALUES (2, 'test2');
DROP TABLE IF EXISTS nullable_string_value__fuzz_2;
CREATE TABLE nullable_string_value__fuzz_2 (`value` LowCardinality(String)) ENGINE = TinyLog;
INSERT INTO nullable_string_value__fuzz_2 VALUES ('test');
SELECT * FROM bloom_filter_nullable_index__fuzz_0 WHERE str IN (SELECT value FROM nullable_string_value__fuzz_2);
```
```
2022.10.18 20:52:08.844808 [ 211659 ] <Fatal> BaseDaemon: ########################################
2022.10.18 20:52:08.844875 [ 211659 ] <Fatal> BaseDaemon: (version 22.10.1.1, build id: 040027BAD4DF758DF500DDEC7A9B6FD5BEEB3F32) (from thread 211310) (query_id: 9029dded-e0e9-4080-8d83-0581cdbaa69e) (query: SELECT * FROM bloom_filter_nullable_index__fuzz_0 WHERE str IN (SELECT value FROM nullable_string_value__fuzz_2);) Received signal Segmentation fault (11)
2022.10.18 20:52:08.844900 [ 211659 ] <Fatal> BaseDaemon: Address: 0x10 Access: read. Address not mapped to object.
2022.10.18 20:52:08.844939 [ 211659 ] <Fatal> BaseDaemon: Stack trace: 0xb7dba08 0xb7db7ac 0xb514633 0x141e3787 0x141e3fc8 0x141e50aa 0xb50c38d 0x15281111 0x15b00bb7 0x15afee75 0x15afe141 0x15afdfaf 0x15b01d7d 0x15b0b794 0x15b02205 0x15afceff 0x15af59f6 0x15acc639 0x160afe2e 0x160ae4dd 0x160b13fd 0x160b1573 0x1608538f 0x1609dbbe 0x1503b794 0x152a0fb6 0x1529e5f0 0x15d5e145 0x15d6d419 0x1813f907 0x1813fdef 0x182b2c07 0x182b07cf 0x7f5162620609 0x7f5162545163
2022.10.18 20:52:09.427836 [ 211659 ] <Fatal> BaseDaemon: 3. DB::FunctionCast<DB::CastInternalName>::prepareUnpackDictionaries(std::__1::shared_ptr<DB::IDataType const> const&, std::__1::shared_ptr<DB::IDataType const> const&) const::'lambda0'(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)::operator()(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long) const @ 0xb7dba08 in /usr/local/bin/clickhouse
2022.10.18 20:52:09.980886 [ 211659 ] <Fatal> BaseDaemon: 4. COW<DB::IColumn>::immutable_ptr<DB::IColumn> std::__1::__function::__policy_invoker<COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)>::__call_impl<std::__1::__function::__default_alloc_func<DB::FunctionCast<DB::CastInternalName>::prepareUnpackDictionaries(std::__1::shared_ptr<DB::IDataType const> const&, std::__1::shared_ptr<DB::IDataType const> const&) const::'lambda0'(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long), COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)> >(std::__1::__function::__policy_storage const*, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long) @ 0xb7db7ac in /usr/local/bin/clickhouse
2022.10.18 20:52:10.534278 [ 211659 ] <Fatal> BaseDaemon: 5. DB::ExecutableFunctionCast::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xb514633 in /usr/local/bin/clickhouse
2022.10.18 20:52:10.543808 [ 211659 ] <Fatal> BaseDaemon: 6. ./build_clang/./src/Functions/IFunction.cpp:0: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x141e3787 in /usr/local/bin/clickhouse
2022.10.18 20:52:10.553072 [ 211659 ] <Fatal> BaseDaemon: 7.1. inlined from ./build_clang/./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:115: intrusive_ptr
2022.10.18 20:52:10.553097 [ 211659 ] <Fatal> BaseDaemon: 7.2. inlined from ./build_clang/./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:122: boost::intrusive_ptr<DB::IColumn const>::operator=(boost::intrusive_ptr<DB::IColumn const>&&)
2022.10.18 20:52:10.553119 [ 211659 ] <Fatal> BaseDaemon: 7.3. inlined from ./build_clang/./src/Common/COW.h:136: COW<DB::IColumn>::immutable_ptr<DB::IColumn>::operator=(COW<DB::IColumn>::immutable_ptr<DB::IColumn>&&)
2022.10.18 20:52:10.553136 [ 211659 ] <Fatal> BaseDaemon: 7. ./build_clang/./src/Functions/IFunction.cpp:306: DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x141e3fc8 in /usr/local/bin/clickhouse
2022.10.18 20:52:10.562574 [ 211659 ] <Fatal> BaseDaemon: 8.1. inlined from ./build_clang/./contrib/libcxx/include/vector:399: ~vector
2022.10.18 20:52:10.562602 [ 211659 ] <Fatal> BaseDaemon: 8. ./build_clang/./src/Functions/IFunction.cpp:373: DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x141e50aa in /usr/local/bin/clickhouse
2022.10.18 20:52:11.115497 [ 211659 ] <Fatal> BaseDaemon: 9. DB::IFunctionBase::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0xb50c38d in /usr/local/bin/clickhouse
2022.10.18 20:52:11.553754 [ 211659 ] <Fatal> BaseDaemon: 10.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:702: ~shared_ptr
2022.10.18 20:52:11.553810 [ 211659 ] <Fatal> BaseDaemon: 10.2. inlined from ./build_clang/./src/Interpreters/castColumn.cpp:37: COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::castColumn<(DB::CastType)0>(DB::ColumnWithTypeAndName const&, std::__1::shared_ptr<DB::IDataType const> const&)
2022.10.18 20:52:11.553838 [ 211659 ] <Fatal> BaseDaemon: 10. ./build_clang/./src/Interpreters/castColumn.cpp:41: DB::castColumn(DB::ColumnWithTypeAndName const&, std::__1::shared_ptr<DB::IDataType const> const&) @ 0x15281111 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.572964 [ 211659 ] <Fatal> BaseDaemon: 11.1. inlined from ./build_clang/./contrib/libcxx/include/string:1445: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const
2022.10.18 20:52:11.572988 [ 211659 ] <Fatal> BaseDaemon: 11.2. inlined from ./build_clang/./contrib/libcxx/include/string:2231: ~basic_string
2022.10.18 20:52:11.573009 [ 211659 ] <Fatal> BaseDaemon: 11.3. inlined from ./build_clang/./src/Core/ColumnWithTypeAndName.h:19: ~ColumnWithTypeAndName
2022.10.18 20:52:11.573060 [ 211659 ] <Fatal> BaseDaemon: 11. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:346: DB::MergeTreeIndexConditionBloomFilter::traverseASTIn(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Set> const&, std::__1::shared_ptr<DB::IDataType const> const&, COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) @ 0x15b00bb7 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.589644 [ 211659 ] <Fatal> BaseDaemon: 12. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:0: DB::MergeTreeIndexConditionBloomFilter::traverseASTIn(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Set> const&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) @ 0x15afee75 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.605805 [ 211659 ] <Fatal> BaseDaemon: 13. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:293: DB::MergeTreeIndexConditionBloomFilter::traverseFunction(std::__1::shared_ptr<DB::IAST> const&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&, std::__1::shared_ptr<DB::IAST> const&) @ 0x15afe141 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.621736 [ 211659 ] <Fatal> BaseDaemon: 14. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:266: DB::MergeTreeIndexConditionBloomFilter::traverseAtomAST(std::__1::shared_ptr<DB::IAST> const&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) @ 0x15afdfaf in /usr/local/bin/clickhouse
2022.10.18 20:52:11.695216 [ 211659 ] <Fatal> BaseDaemon: 15.1. inlined from ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:0: operator()<const std::__1::shared_ptr<DB::IAST>, std::__1::shared_ptr<const DB::Context>, DB::Block, DB::MergeTreeIndexConditionBloomFilter::RPNElement>
2022.10.18 20:52:11.695251 [ 211659 ] <Fatal> BaseDaemon: 15.2. inlined from ./build_clang/./contrib/libcxx/include/type_traits:3640: decltype(static_cast<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&>(fp)(static_cast<std::__1::shared_ptr<DB::IAST> const&>(fp0), static_cast<std::__1::shared_ptr<DB::Context const>>(fp0), static_cast<DB::Block&>(fp0), static_cast<DB::MergeTreeIndexConditionBloomFilter::RPNElement&>(fp0))) std::__1::__invoke<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&>(DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>&&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)
2022.10.18 20:52:11.695281 [ 211659 ] <Fatal> BaseDaemon: 15.3. inlined from ./build_clang/./contrib/libcxx/include/__functional/invoke.h:30: bool std::__1::__invoke_void_return_wrapper<bool, false>::__call<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&>(DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>&&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)
2022.10.18 20:52:11.695338 [ 211659 ] <Fatal> BaseDaemon: 15.4. inlined from ./build_clang/./contrib/libcxx/include/__functional/function.h:230: std::__1::__function::__default_alloc_func<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3, bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)>::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>&&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)
2022.10.18 20:52:11.695376 [ 211659 ] <Fatal> BaseDaemon: 15. ./build_clang/./contrib/libcxx/include/__functional/function.h:711: bool std::__1::__function::__policy_invoker<bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)>::__call_impl<std::__1::__function::__default_alloc_func<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3, bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)> >(std::__1::__function::__policy_storage const*, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>&&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) @ 0x15b01d7d in /usr/local/bin/clickhouse
2022.10.18 20:52:11.711886 [ 211659 ] <Fatal> BaseDaemon: 16.1. inlined from ./build_clang/./contrib/libcxx/include/__functional/function.h:0: std::__1::function<bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)>::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) const
2022.10.18 20:52:11.711910 [ 211659 ] <Fatal> BaseDaemon: 16. ./build_clang/./src/Storages/MergeTree/RPNBuilder.h:82: DB::RPNBuilder<DB::MergeTreeIndexConditionBloomFilter::RPNElement>::traverseAST(std::__1::shared_ptr<DB::IAST> const&) @ 0x15b0b794 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.726374 [ 211659 ] <Fatal> BaseDaemon: 17.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:702: ~shared_ptr
2022.10.18 20:52:11.726419 [ 211659 ] <Fatal> BaseDaemon: 17. ./build_clang/./src/Storages/MergeTree/RPNBuilder.h:47: DB::RPNBuilder<DB::MergeTreeIndexConditionBloomFilter::RPNElement>::RPNBuilder(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, std::__1::function<bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)> const&) @ 0x15b02205 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.739907 [ 211659 ] <Fatal> BaseDaemon: 18.1. inlined from ./build_clang/./src/Storages/MergeTree/RPNBuilder.h:55: DB::RPNBuilder<DB::MergeTreeIndexConditionBloomFilter::RPNElement>::extractRPN()
2022.10.18 20:52:11.739928 [ 211659 ] <Fatal> BaseDaemon: 18. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:114: DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long) @ 0x15afceff in /usr/local/bin/clickhouse
2022.10.18 20:52:11.748262 [ 211659 ] <Fatal> BaseDaemon: 19.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:597: shared_ptr
2022.10.18 20:52:11.748297 [ 211659 ] <Fatal> BaseDaemon: 19.2. inlined from ./build_clang/./contrib/libcxx/include/__memory/construct_at.h:38: DB::MergeTreeIndexConditionBloomFilter* std::__1::construct_at<DB::MergeTreeIndexConditionBloomFilter, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&, DB::MergeTreeIndexConditionBloomFilter*>(DB::MergeTreeIndexConditionBloomFilter*, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&)
2022.10.18 20:52:11.748321 [ 211659 ] <Fatal> BaseDaemon: 19.3. inlined from ./build_clang/./contrib/libcxx/include/__memory/allocator_traits.h:298: void std::__1::allocator_traits<std::__1::allocator<DB::MergeTreeIndexConditionBloomFilter> >::construct<DB::MergeTreeIndexConditionBloomFilter, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&, void, void>(std::__1::allocator<DB::MergeTreeIndexConditionBloomFilter>&, DB::MergeTreeIndexConditionBloomFilter*, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&)
2022.10.18 20:52:11.748346 [ 211659 ] <Fatal> BaseDaemon: 19.4. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:293: __shared_ptr_emplace<const DB::SelectQueryInfo &, std::__1::shared_ptr<const DB::Context> &, const DB::Block &, const unsigned long &>
2022.10.18 20:52:11.748405 [ 211659 ] <Fatal> BaseDaemon: 19.5. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:954: std::__1::shared_ptr<DB::MergeTreeIndexConditionBloomFilter> std::__1::allocate_shared<DB::MergeTreeIndexConditionBloomFilter, std::__1::allocator<DB::MergeTreeIndexConditionBloomFilter>, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&, void>(std::__1::allocator<DB::MergeTreeIndexConditionBloomFilter> const&, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&)
2022.10.18 20:52:11.748438 [ 211659 ] <Fatal> BaseDaemon: 19.6. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:963: std::__1::shared_ptr<DB::MergeTreeIndexConditionBloomFilter> std::__1::make_shared<DB::MergeTreeIndexConditionBloomFilter, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&, void>(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&)
2022.10.18 20:52:11.748468 [ 211659 ] <Fatal> BaseDaemon: 19. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexBloomFilter.cpp:76: DB::MergeTreeIndexBloomFilter::createIndexCondition(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>) const @ 0x15af59f6 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.800615 [ 211659 ] <Fatal> BaseDaemon: 20. ./build_clang/./src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:919: DB::MergeTreeDataSelectExecutor::filterPartsByPrimaryKeyAndSkipIndexes(std::__1::vector<std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::allocator<std::__1::shared_ptr<DB::IMergeTreeDataPart const> > >&&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const>, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const> const&, DB::KeyCondition const&, DB::MergeTreeReaderSettings const&, Poco::Logger*, unsigned long, std::__1::vector<DB::ReadFromMergeTree::IndexStat, std::__1::allocator<DB::ReadFromMergeTree::IndexStat> >&, bool) @ 0x15acc639 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.848600 [ 211659 ] <Fatal> BaseDaemon: 21. ./build_clang/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:971: DB::ReadFromMergeTree::selectRangesToRead(std::__1::vector<std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::allocator<std::__1::shared_ptr<DB::IMergeTreeDataPart const> > >, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::ActionDAGNodes const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, unsigned int, std::__1::shared_ptr<std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, long, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, long> > > >, DB::MergeTreeData const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, bool, Poco::Logger*) @ 0x160afe2e in /usr/local/bin/clickhouse
2022.10.18 20:52:11.894914 [ 211659 ] <Fatal> BaseDaemon: 22. ./build_clang/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:0: DB::ReadFromMergeTree::selectRangesToRead(std::__1::vector<std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::allocator<std::__1::shared_ptr<DB::IMergeTreeDataPart const> > >) const @ 0x160ae4dd in /usr/local/bin/clickhouse
2022.10.18 20:52:11.943999 [ 211659 ] <Fatal> BaseDaemon: 23. ./build_clang/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1057: DB::ReadFromMergeTree::getAnalysisResult() const @ 0x160b13fd in /usr/local/bin/clickhouse
2022.10.18 20:52:11.980569 [ 211659 ] <Fatal> BaseDaemon: 24. ./build_clang/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1067: DB::ReadFromMergeTree::initializePipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x160b1573 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.986004 [ 211659 ] <Fatal> BaseDaemon: 25. ./build_clang/./src/Processors/QueryPlan/ISourceStep.cpp:0: DB::ISourceStep::updatePipeline(std::__1::vector<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> >, std::__1::allocator<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> > > >, DB::BuildQueryPipelineSettings const&) @ 0x1608538f in /usr/local/bin/clickhouse
2022.10.18 20:52:11.996769 [ 211659 ] <Fatal> BaseDaemon: 26.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:312: std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> >::reset(DB::QueryPipelineBuilder*)
2022.10.18 20:52:11.996797 [ 211659 ] <Fatal> BaseDaemon: 26.2. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:234: std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> >::operator=(std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> >&&)
2022.10.18 20:52:11.996816 [ 211659 ] <Fatal> BaseDaemon: 26. ./build_clang/./src/Processors/QueryPlan/QueryPlan.cpp:187: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x1609dbbe in /usr/local/bin/clickhouse
2022.10.18 20:52:12.020197 [ 211659 ] <Fatal> BaseDaemon: 27. ./build_clang/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:370: DB::InterpreterSelectWithUnionQuery::execute() @ 0x1503b794 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.057265 [ 211659 ] <Fatal> BaseDaemon: 28. ./build_clang/./src/Interpreters/executeQuery.cpp:0: DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x152a0fb6 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.098152 [ 211659 ] <Fatal> BaseDaemon: 29. ./build_clang/./src/Interpreters/executeQuery.cpp:1228: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x1529e5f0 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.123254 [ 211659 ] <Fatal> BaseDaemon: 30. ./build_clang/./src/Server/TCPHandler.cpp:0: DB::TCPHandler::runImpl() @ 0x15d5e145 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.163613 [ 211659 ] <Fatal> BaseDaemon: 31. ./build_clang/./src/Server/TCPHandler.cpp:1886: DB::TCPHandler::run() @ 0x15d6d419 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.164614 [ 211659 ] <Fatal> BaseDaemon: 32. ./build_clang/./contrib/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x1813f907 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.167159 [ 211659 ] <Fatal> BaseDaemon: 33.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:54: std::__1::default_delete<Poco::Net::TCPServerConnection>::operator()(Poco::Net::TCPServerConnection*) const
2022.10.18 20:52:12.167182 [ 211659 ] <Fatal> BaseDaemon: 33.2. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:315: std::__1::unique_ptr<Poco::Net::TCPServerConnection, std::__1::default_delete<Poco::Net::TCPServerConnection> >::reset(Poco::Net::TCPServerConnection*)
2022.10.18 20:52:12.167198 [ 211659 ] <Fatal> BaseDaemon: 33.3. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:269: ~unique_ptr
2022.10.18 20:52:12.167251 [ 211659 ] <Fatal> BaseDaemon: 33. ./build_clang/./contrib/poco/Net/src/TCPServerDispatcher.cpp:116: Poco::Net::TCPServerDispatcher::run() @ 0x1813fdef in /usr/local/bin/clickhouse
2022.10.18 20:52:12.169874 [ 211659 ] <Fatal> BaseDaemon: 34. ./build_clang/./contrib/poco/Foundation/src/ThreadPool.cpp:213: Poco::PooledThread::run() @ 0x182b2c07 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.172413 [ 211659 ] <Fatal> BaseDaemon: 35.1. inlined from ./build_clang/./contrib/poco/Foundation/include/Poco/SharedPtr.h:156: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable> >::assign(Poco::Runnable*)
2022.10.18 20:52:12.172434 [ 211659 ] <Fatal> BaseDaemon: 35.2. inlined from ./build_clang/./contrib/poco/Foundation/include/Poco/SharedPtr.h:208: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable> >::operator=(Poco::Runnable*)
2022.10.18 20:52:12.172453 [ 211659 ] <Fatal> BaseDaemon: 35. ./build_clang/./contrib/poco/Foundation/src/Thread_POSIX.cpp:360: Poco::ThreadImpl::runnableEntry(void*) @ 0x182b07cf in /usr/local/bin/clickhouse
2022.10.18 20:52:12.172484 [ 211659 ] <Fatal> BaseDaemon: 36. ? @ 0x7f5162620609 in ?
2022.10.18 20:52:12.172527 [ 211659 ] <Fatal> BaseDaemon: 37. clone @ 0x7f5162545163 in ?
2022.10.18 20:52:12.290589 [ 211659 ] <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: FD1CFF38D31CE1996A85E1D2122207F8)
Error on processing query: Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF) (version 22.10.1.1)
```
| https://github.com/ClickHouse/ClickHouse/issues/42460 | https://github.com/ClickHouse/ClickHouse/pull/42579 | db422fa90310f0bff87940f74f0c761141f509fe | b8ee5600be1f8bb8eb3e3dcafdc3a467a09ff7c1 | "2022-10-18T20:54:00Z" | c++ | "2022-10-26T12:17:14Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,453 | ["src/Functions/FunctionBinaryArithmetic.h", "tests/queries/0_stateless/02469_interval_msan.reference", "tests/queries/0_stateless/02469_interval_msan.sql", "tests/queries/0_stateless/02470_suspicious_low_cardinality_msan.reference", "tests/queries/0_stateless/02470_suspicious_low_cardinality_msan.sql"] | Msan: use-of-uninitialized-value in `FunctionConvert` with suspicious `LowCardinality` | **Describe the bug**
[A link to the report
](https://s3.amazonaws.com/clickhouse-test-reports/0/772978d4c0487ecc77f80b9e2aba98b8278676d2/fuzzer_astfuzzermsan//report.html)
**How to reproduce**
```sql
DROP TABLE IF EXISTS alias_2__fuzz_25;
SET allow_suspicious_low_cardinality_types = 1;
CREATE TABLE alias_2__fuzz_25 (`dt` LowCardinality(Date), `col` DateTime, `col2` Nullable(Int256), `colAlias0` Nullable(DateTime64(3)) ALIAS col, `colAlias3` Nullable(Int32) ALIAS col3 + colAlias0, `colAlias1` LowCardinality(UInt16) ALIAS colAlias0 + col2, `colAlias2` LowCardinality(Int32) ALIAS colAlias0 + colAlias1, `col3` Nullable(UInt8)) ENGINE = MergeTree ORDER BY dt;
insert into alias_2__fuzz_25 (dt, col, col2, col3) values ('2020-02-01', 1, 2, 3);
SELECT colAlias0, colAlias2, colAlias3 FROM alias_2__fuzz_25;
```
```
==199240==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0xbf49ccc in COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::ConvertImpl<DB::DataTypeDateTime64, DB::DataTypeNumber<unsigned short>, DB::NameToUInt16, DB::ConvertDefaultBehaviorTag>::execute<void*>(std::__1::vector<DB::ColumnWit
hTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, void*) (/usr/bin/clickhouse+0xbf49ccc) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#1 0xbeff4a1 in bool DB::callOnIndexAndDataType<DB::DataTypeNumber<unsigned short>, DB::FunctionConvert<DB::DataTypeNumber<unsigned short>, DB::NameToUInt16, DB::ToNumberMonotonicity<unsigned short>>::executeInternal(std::__1::vecto
r<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const::'lambda'(auto const&, auto const&)&, DB::ConvertDefaultBehaviorTag>(DB::TypeInd
ex, auto&&, DB::ConvertDefaultBehaviorTag&&) (/usr/bin/clickhouse+0xbeff4a1) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#2 0xbef645e in DB::FunctionConvert<DB::DataTypeNumber<unsigned short>, DB::NameToUInt16, DB::ToNumberMonotonicity<unsigned short>>::executeInternal(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeA
ndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/usr/bin/clickhouse+0xbef645e) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#3 0xbef4357 in DB::FunctionConvert<DB::DataTypeNumber<unsigned short>, DB::NameToUInt16, DB::ToNumberMonotonicity<unsigned short>>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndNa
me>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/usr/bin/clickhouse+0xbef4357) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#4 0xbd0c093 in DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long
) const (/usr/bin/clickhouse+0xbd0c093) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#5 0x3ca8918e in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsi
gned long, bool) const build_docker/../src/Functions/IFunction.cpp:248:15
#6 0x3ca8b491 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lon
g, bool) const build_docker/../src/Functions/IFunction.cpp:302:22
#7 0x3ca91b43 in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const build
_docker/../src/Functions/IFunction.cpp:372:16
#8 0xbd0a7f5 in DB::IFunctionBase::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/usr/bin/cl
ickhouse+0xbd0a7f5) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#9 0xbe0634e in COW<DB::IColumn>::immutable_ptr<DB::IColumn> std::__1::__function::__policy_invoker<COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndN
ame>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)>::__call_impl<std::__1::__function::__default_alloc_func<DB::FunctionCast<DB::CastInternalName>::createFunctionAdaptor(std::__1::shared_
ptr<DB::IFunction>, std::__1::shared_ptr<DB::IDataType const> const&)::'lambda'(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNu
llable const*, unsigned long), COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNulla
ble const*, unsigned long)>>(std::__1::__function::__policy_storage const*, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullab
le const*, unsigned long) (/usr/bin/clickhouse+0xbe0634e) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#10 0xcaeb6a8 in DB::FunctionCast<DB::CastInternalName>::prepareRemoveNullable(std::__1::shared_ptr<DB::IDataType const> const&, std::__1::shared_ptr<DB::IDataType const> const&, bool) const::'lambda0'(std::__1::vector<DB::ColumnWit
hTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)::operator()(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::
ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long) const (/usr/bin/clickhouse+0xcaeb6a8) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#11 0xcaeb20a in COW<DB::IColumn>::immutable_ptr<DB::IColumn> std::__1::__function::__policy_invoker<COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAnd
Name>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)>::__call_impl<std::__1::__function::__default_alloc_func<DB::FunctionCast<DB::CastInternalName>::prepareRemoveNullable(std::__1::shared
_ptr<DB::IDataType const> const&, std::__1::shared_ptr<DB::IDataType const> const&, bool) const::'lambda0'(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType
const> const&, DB::ColumnNullable const*, unsigned long), COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType con
st> const&, DB::ColumnNullable const*, unsigned long)>>(std::__1::__function::__policy_storage const*, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType cons
t> const&, DB::ColumnNullable const*, unsigned long) (/usr/bin/clickhouse+0xcaeb20a) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#12 0xcaedc2e in DB::FunctionCast<DB::CastInternalName>::prepareUnpackDictionaries(std::__1::shared_ptr<DB::IDataType const> const&, std::__1::shared_ptr<DB::IDataType const> const&) const::'lambda0'(std::__1::vector<DB::ColumnWithT
ypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)::operator()(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::Co
lumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long) const (/usr/bin/clickhouse+0xcaedc2e) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#13 0xcaec1ea in COW<DB::IColumn>::immutable_ptr<DB::IColumn> std::__1::__function::__policy_invoker<COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAnd
Name>>&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)>::__call_impl<std::__1::__function::__default_alloc_func<DB::FunctionCast<DB::CastInternalName>::prepareUnpackDictionaries(std::__1::sh
ared_ptr<DB::IDataType const> const&, std::__1::shared_ptr<DB::IDataType const> const&) const::'lambda0'(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType co
nst> const&, DB::ColumnNullable const*, unsigned long), COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const
> const&, DB::ColumnNullable const*, unsigned long)>>(std::__1::__function::__policy_storage const*, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>>&, std::__1::shared_ptr<DB::IDataType const>
const&, DB::ColumnNullable const*, unsigned long) (/usr/bin/clickhouse+0xcaec1ea) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#14 0xbd2ffe7 in DB::ExecutableFunctionCast::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/us
r/bin/clickhouse+0xbd2ffe7) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#15 0x3ca8918e in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, uns
igned long, bool) const build_docker/../src/Functions/IFunction.cpp:248:15
#16 0x3ca8b71c in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lo
ng, bool) const build_docker/../src/Functions/IFunction.cpp:306:18
#17 0x3ca91b43 in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const buil
d_docker/../src/Functions/IFunction.cpp:372:16
#18 0x3f99d893 in DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool) build_docker/../src/Interpreters/ExpressionActions.cpp:607:60
#19 0x3f99d893 in DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const build_docker/../src/Interpreters/ExpressionActions.cpp:724:13
#20 0x45bd89c7 in DB::ExpressionTransform::transform(DB::Chunk&) build_docker/../src/Processors/Transforms/ExpressionTransform.cpp:23:17
#21 0x31df97ca in DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) build_docker/../src/Processors/ISimpleTransform.h:32:9
#22 0x45309e90 in DB::ISimpleTransform::work() build_docker/../src/Processors/ISimpleTransform.cpp:89:9
#23 0x4538488d in DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:47:26
#24 0x4538488d in DB::ExecutionThreadContext::executeTask() build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92:9
#25 0x4534abfc in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:228:26
#26 0x45348ce7 in DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:194:5
#27 0x45348ce7 in DB::PipelineExecutor::executeImpl(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:367:9
#28 0x4534866d in DB::PipelineExecutor::execute(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:89:9
#29 0x45391cbb in DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:79:24
#30 0x45391cbb in DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const build_docker/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:107:13
#31 0x45391cbb in decltype(static_cast<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(DB::Pulling
AsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&) build_docker/../contrib/libcxx/include/type_traits:3648:23
#32 0x45391cbb in decltype(auto) std::__1::__apply_tuple_impl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std:
:__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1
#33 0x45391cbb in decltype(auto) std::__1::apply<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>
&) build_docker/../contrib/libcxx/include/tuple:1604:1
#34 0x45391cbb in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()
::operator()() build_docker/../src/Common/ThreadPool.h:193:13
#35 0x45391cbb in decltype(static_cast<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull
(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&) build_docker/../contrib/libcxx/include/t
ype_traits:3640:23
#36 0x45391cbb in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipel
ineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(D
B::Chunk&, unsigned long)::$_0&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9
#37 0x45391cbb in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB:
:Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12
#38 0x45391cbb in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk
&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:1
6
#39 0x25f3c5f0 in std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
#40 0x25f3c5f0 in std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
#41 0x25f3c5f0 in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17
#42 0x25f494c2 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73
#43 0x25f494c2 in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_
docker/../contrib/libcxx/include/type_traits:3640:23
#44 0x25f494c2 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<voi
d ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&
, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:282:5
#45 0x25f494c2 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__
1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) build_docker/../contrib/libcxx/include/thread:293:5
#46 0x7fcf5ea53608 in start_thread /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8
#47 0x7fcf5e978162 in __clone /build/glibc-sMfBJT/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Uninitialized value was stored to memory at
#0 0xbc9b306 in realloc (/usr/bin/clickhouse+0xbc9b306) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#1 0x25ba90ad in Allocator<false, false>::realloc(void*, unsigned long, unsigned long, unsigned long) build_docker/../src/Common/Allocator.h:134:30
#2 0xbd14ca8 in void DB::PODArrayBase<8ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::resize<>(unsigned long) (/usr/bin/clickhouse+0xbd14ca8) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#3 0x1046a000 in void DB::Adder<DB::AddSecondsImpl>::vectorVector<DB::PODArray<DB::DateTime64, 4096ul, Allocator<false, false>, 15ul, 16ul>, DB::PODArray<DB::DateTime64, 4096ul, Allocator<false, false>, 15ul, 16ul>>(DB::PODArray<DB:
:DateTime64, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<DB::DateTime64, 4096ul, Allocator<false, false>, 15ul, 16ul>&, DB::IColumn const&, DateLUTImpl const&, unsigned short) const (/usr/bin/clickhouse+0x1046a000)
(BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#4 0x1044715b in DB::DateTimeAddIntervalImpl<DB::DataTypeDateTime64, DB::DataTypeDateTime64, DB::AddSecondsImpl>::execute(DB::AddSecondsImpl, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>
> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned short) (/usr/bin/clickhouse+0x1044715b) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#5 0x10441a76 in DB::FunctionDateOrDateTimeAddInterval<DB::AddSecondsImpl>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> co
nst&, unsigned long) const (/usr/bin/clickhouse+0x10441a76) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#6 0xbd0c093 in DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long
) const (/usr/bin/clickhouse+0xbd0c093) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#7 0x3ca8918e in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsi
gned long, bool) const build_docker/../src/Functions/IFunction.cpp:248:15
#8 0x3ca8b491 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lon
g, bool) const build_docker/../src/Functions/IFunction.cpp:302:22
#9 0x3ca91b43 in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const build
_docker/../src/Functions/IFunction.cpp:372:16
#10 0xbd0a7f5 in DB::IFunctionBase::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/usr/bin/c
lickhouse+0xbd0a7f5) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#11 0x1ff5c3c3 in DB::FunctionBinaryArithmetic<DB::PlusImpl, DB::NamePlus, true, true, false>::executeDateTimeIntervalPlusMinus(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std:
:__1::shared_ptr<DB::IDataType const> const&, unsigned long, std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&) const (/usr/bin/clickhouse+0x1ff5c3c3) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#12 0x1ff58f9d in DB::FunctionBinaryArithmetic<DB::PlusImpl, DB::NamePlus, true, true, false>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::
IDataType const> const&, unsigned long) const (/usr/bin/clickhouse+0x1ff58f9d) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#13 0xbd0c093 in DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lon
g) const (/usr/bin/clickhouse+0xbd0c093) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#14 0x3ca8918e in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, uns
igned long, bool) const build_docker/../src/Functions/IFunction.cpp:248:15
#15 0x3ca89cf6 in DB::IExecutableFunction::defaultImplementationForNulls(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned
long, bool) const build_docker/../src/Functions/IFunction.cpp:199:20
#16 0x3ca88e00 in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, uns
igned long, bool) const build_docker/../src/Functions/IFunction.cpp:241:20
#17 0x3ca8b491 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lo
ng, bool) const build_docker/../src/Functions/IFunction.cpp:302:22
#18 0x3ca91b43 in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const buil
d_docker/../src/Functions/IFunction.cpp:372:16
#19 0x3f99d893 in DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool) build_docker/../src/Interpreters/ExpressionActions.cpp:607:60
#20 0x3f99d893 in DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const build_docker/../src/Interpreters/ExpressionActions.cpp:724:13
Uninitialized value was created by a heap allocation
#0 0xbc9b5c0 in malloc (/usr/bin/clickhouse+0xbc9b5c0) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#1 0x25ba7c6c in Allocator<false, false>::allocNoTrack(unsigned long, unsigned long) build_docker/../src/Common/Allocator.h:227:27
#2 0xbd150e4 in void DB::PODArrayBase<8ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::alloc<>(unsigned long) (/usr/bin/clickhouse+0xbd150e4) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#3 0x3da07f3f in DB::PODArrayBase<8ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::alloc_for_num_elements(unsigned long) build_docker/../src/Common/PODArray.h:128:9
#4 0x3da07f3f in DB::PODArray<DB::DateTime64, 4096ul, Allocator<false, false>, 15ul, 16ul>::PODArray(unsigned long) build_docker/../src/Common/PODArray.h:344:15
#5 0x3da07f3f in DB::ColumnDecimal<DB::DateTime64>::ColumnDecimal(unsigned long, unsigned int) build_docker/../src/Columns/ColumnDecimal.h:34:9
#6 0x3da07f3f in COW<DB::IColumn>::mutable_ptr<DB::ColumnDecimal<DB::DateTime64>> COWHelper<DB::ColumnVectorHelper, DB::ColumnDecimal<DB::DateTime64>>::create<int, unsigned int const&>(int&&, unsigned int const&) build_docker/../src
/Common/COW.h:284:71
#7 0x3da07cc6 in DB::DataTypeDecimalBase<DB::DateTime64>::createColumn() const build_docker/../src/DataTypes/DataTypeDecimalBase.cpp:30:12
#8 0x10446c2a in DB::DateTimeAddIntervalImpl<DB::DataTypeDateTime64, DB::DataTypeDateTime64, DB::AddSecondsImpl>::execute(DB::AddSecondsImpl, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>
> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned short) (/usr/bin/clickhouse+0x10446c2a) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#9 0x10441a76 in DB::FunctionDateOrDateTimeAddInterval<DB::AddSecondsImpl>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> co
nst&, unsigned long) const (/usr/bin/clickhouse+0x10441a76) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#10 0xbd0c093 in DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lon
g) const (/usr/bin/clickhouse+0xbd0c093) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#11 0x3ca8918e in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, uns
igned long, bool) const build_docker/../src/Functions/IFunction.cpp:248:15
#12 0x3ca8b491 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lo
ng, bool) const build_docker/../src/Functions/IFunction.cpp:302:22
#13 0x3ca91b43 in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const buil
d_docker/../src/Functions/IFunction.cpp:372:16
#14 0xbd0a7f5 in DB::IFunctionBase::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/usr/bin/c
lickhouse+0xbd0a7f5) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#15 0x1ff5c3c3 in DB::FunctionBinaryArithmetic<DB::PlusImpl, DB::NamePlus, true, true, false>::executeDateTimeIntervalPlusMinus(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std:
:__1::shared_ptr<DB::IDataType const> const&, unsigned long, std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&) const (/usr/bin/clickhouse+0x1ff5c3c3) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#16 0x1ff58f9d in DB::FunctionBinaryArithmetic<DB::PlusImpl, DB::NamePlus, true, true, false>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::
IDataType const> const&, unsigned long) const (/usr/bin/clickhouse+0x1ff58f9d) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#17 0xbd0c093 in DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lon
g) const (/usr/bin/clickhouse+0xbd0c093) (BuildId: a513f1c7233fdfedc7052d0fabc240ba3b910b0b)
#18 0x3ca8918e in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, uns
igned long, bool) const build_docker/../src/Functions/IFunction.cpp:248:15
#19 0x3ca89cf6 in DB::IExecutableFunction::defaultImplementationForNulls(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned
long, bool) const build_docker/../src/Functions/IFunction.cpp:199:20
#20 0x3ca88e00 in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, uns
igned long, bool) const build_docker/../src/Functions/IFunction.cpp:241:20
#21 0x3ca8b491 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned lo
ng, bool) const build_docker/../src/Functions/IFunction.cpp:302:22
#22 0x3ca91b43 in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const buil
d_docker/../src/Functions/IFunction.cpp:372:16
``` | https://github.com/ClickHouse/ClickHouse/issues/42453 | https://github.com/ClickHouse/ClickHouse/pull/42573 | 6c69bdd34d880302e6617e15fea4fe049797df81 | ebf330ca1ad338d77b30b69d1affeda8617bd540 | "2022-10-18T17:35:22Z" | c++ | "2022-10-22T23:31:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,452 | ["src/Interpreters/ConvertFunctionOrLikeVisitor.cpp", "src/Interpreters/QueryNormalizer.cpp", "tests/queries/0_stateless/02475_or_function_alias_and_const_where.reference", "tests/queries/0_stateless/02475_or_function_alias_and_const_where.sql"] | Logical error: 'LogicalExpressionsOptimizer: parent node information is corrupted' | **Describe the bug**
[A link to the report
](https://s3.amazonaws.com/clickhouse-test-reports/0/8af95a6fc2cff71db3407c5da987f6e7565f7148/fuzzer_astfuzzerasan//report.html)
**How to reproduce**
```sql
SELECT time, round(exp_smooth, 10), bar(exp_smooth, -9223372036854775807, 1048575, 50) AS bar FROM (SELECT 2 OR (number = 0) OR (number >= 1) AS value, number AS time, exponentialTimeDecayedSum(2147483646)(value, time) OVER (RANGE BETWEEN CURRENT ROW AND CURRENT ROW) AS exp_smooth FROM numbers(2147483647) WHERE 10) WHERE 25
```
```
2022.10.18 17:15:14.590592 [ 197608 ] {d41426f1-7c52-43ce-b387-ea0eb39100ea} <Fatal> : Logical error: 'LogicalExpressionsOptimizer: parent node information is corrupted'.
2022.10.18 17:15:14.591017 [ 197606 ] {} <Trace> BaseDaemon: Received signal 6
2022.10.18 17:15:14.591676 [ 197931 ] {} <Fatal> BaseDaemon: ########################################
2022.10.18 17:15:14.591948 [ 197931 ] {} <Fatal> BaseDaemon: (version 22.10.1.1 (official build), build id: AD76F1D00331FF83B84FF51C30F41B5C5FC116B2) (from thread 197608) (query_id: d41426f1-7c52-43ce-b387-ea0eb39100ea) (query: SELECT time, round(exp_smooth, 10), bar(exp_smooth, -9223372036854775807, 1048575, 50) AS bar FROM (SELECT 2 OR (number = 0) OR (number >= 1) AS value, number AS time, exponentialTimeDecayedSum(2147483646)(value, time) OVER (RANGE BETWEEN CURRENT ROW AND CURRENT ROW) AS exp_smooth FROM numbers(2147483647) WHERE 10) WHERE 25) Received signal Aborted (6)
2022.10.18 17:15:14.592063 [ 197931 ] {} <Fatal> BaseDaemon:
2022.10.18 17:15:14.592207 [ 197931 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f199d53803b 0x7f199d517859 0x1ead443b 0x1ead497b 0x30588a8d 0x30586616 0x3049bfa0 0x2fd7a180 0x2fd71e5e 0x2fd6b70b 0x2fe492d6 0x2fe4533d 0x2fe4b772 0x306bc90f 0x2fee6bec 0x2fd6d3cf 0x2fd6b70b 0x2fe492d6 0x2fe4533d 0x2fcd2948 0x2fccff3b 0x3067b805 0x30674d20 0x329b5ba4 0x329e7563 0x3a2d366f 0x3a2d43f3 0x3a7a98dc 0x3a7a31c8 0x7f199d6ef609 0x7f199d614163
2022.10.18 17:15:14.592356 [ 197931 ] {} <Fatal> BaseDaemon: 3. raise @ 0x7f199d53803b in ?
2022.10.18 17:15:14.592468 [ 197931 ] {} <Fatal> BaseDaemon: 4. abort @ 0x7f199d517859 in ?
2022.10.18 17:15:14.693446 [ 197931 ] {} <Fatal> BaseDaemon: 5. ./build_docker/../src/Common/Exception.cpp:40: DB::abortOnFailedAssertion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1ead443b in /usr/bin/clickhouse
2022.10.18 17:15:14.792436 [ 197931 ] {} <Fatal> BaseDaemon: 6.1. inlined from ./build_docker/../src/Common/Exception.cpp:63: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool, std::__1::vector<void*, std::__1::allocator<void*> > const&)
2022.10.18 17:15:14.792603 [ 197931 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../src/Common/Exception.cpp:70: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x1ead497b in /usr/bin/clickhouse
2022.10.18 17:15:14.879039 [ 197931 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../src/Interpreters/LogicalExpressionsOptimizer.cpp:154: DB::LogicalExpressionsOptimizer::collectDisjunctiveEqualityChains() @ 0x30588a8d in /usr/bin/clickhouse
2022.10.18 17:15:14.960704 [ 197931 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../src/Interpreters/LogicalExpressionsOptimizer.cpp:63: DB::LogicalExpressionsOptimizer::perform() @ 0x30586616 in /usr/bin/clickhouse
2022.10.18 17:15:15.000216 [ 197836 ] {} <Trace> AsynchronousMetrics: MemoryTracking: was 1.67 GiB, peak 1.67 GiB, will set to 1.80 GiB (RSS), difference: 140.41 MiB
2022.10.18 17:15:15.204321 [ 197931 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../src/Interpreters/TreeRewriter.cpp:0: DB::TreeRewriter::analyzeSelect(std::__1::shared_ptr<DB::IAST>&, DB::TreeRewriterResult&&, DB::SelectQueryOptions const&, std::__1::vector<DB::TableWithColumnNamesAndTypes, std::__1::allocator<DB::TableWithColumnNamesAndTypes> > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::TableJoin>) const @ 0x3049bfa0 in /usr/bin/clickhouse
2022.10.18 17:15:15.654206 [ 197931 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../src/Interpreters/InterpreterSelectQuery.cpp:505: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::PreparedSets>)::$_1::operator()(bool) const @ 0x2fd7a180 in /usr/bin/clickhouse
2022.10.18 17:15:16.000214 [ 197836 ] {} <Trace> AsynchronousMetrics: MemoryTracking: was 1.80 GiB, peak 1.80 GiB, will set to 1.87 GiB (RSS), difference: 70.72 MiB
2022.10.18 17:15:16.078066 [ 197931 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../src/Interpreters/InterpreterSelectQuery.cpp:0: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::PreparedSets>) @ 0x2fd71e5e in /usr/bin/clickhouse
2022.10.18 17:15:16.510060 [ 197931 ] {} <Fatal> BaseDaemon: 12. ./build_docker/../src/Interpreters/InterpreterSelectQuery.cpp:192: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x2fd6b70b in /usr/bin/clickhouse
2022.10.18 17:15:16.644165 [ 197931 ] {} <Fatal> BaseDaemon: 13. ./build_docker/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:247: DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::__1::shared_ptr<DB::IAST> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x2fe492d6 in /usr/bin/clickhouse
^C2022.10.18 17:15:16.730987 [ 197606 ] {} <Trace> BaseDaemon: Received signal 2
2022.10.18 17:15:16.731054 [ 197606 ] {} <Information> Application: Received termination signal (Interrupt)
2022.10.18 17:15:16.731106 [ 197605 ] {} <Debug> Application: Received termination signal.
2022.10.18 17:15:16.731155 [ 197605 ] {} <Debug> Application: Waiting for current connections to close.
2022.10.18 17:15:16.762459 [ 197931 ] {} <Fatal> BaseDaemon: 14. ./build_docker/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:0: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context>, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x2fe4533d in /usr/bin/clickhouse
``` | https://github.com/ClickHouse/ClickHouse/issues/42452 | https://github.com/ClickHouse/ClickHouse/pull/42827 | 3eec14790628077ce56bf74e92745f3ea5c917fc | 1c1432c11f212ce60ac0caaf218ee548a3b6f8b9 | "2022-10-18T17:16:26Z" | c++ | "2022-11-09T07:11:22Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,439 | ["src/AggregateFunctions/AggregateFunctionWelchTTest.cpp", "tests/queries/0_stateless/02461_welch_t_test_fuzz.reference", "tests/queries/0_stateless/02461_welch_t_test_fuzz.sql"] | Logical error in function `welchTTest`: Degrees of freedom argument is -nan, but must be > 0 | **Describe the bug**
[A link to the report
](https://s3.amazonaws.com/clickhouse-test-reports/42413/1a9d190788e4e9db7e1bb367d57b50719621e9a0/fuzzer_astfuzzerasan//report.html)
**How to reproduce**
```sql
DROP TABLE IF EXISTS welch_ttest__fuzz_7;
CREATE TABLE welch_ttest__fuzz_7 (left UInt128, right UInt128) ENGINE = Memory;
INSERT INTO welch_ttest__fuzz_7 VALUES (0.010268, 0), (0.000167, 0), (0.000167, 0), (0.159258, 1), (0.136278, 1), (0.122389, 1);
SET send_logs_level = 'error';
SELECT roundBankers(welchTTest(left, right).2, 6) from welch_ttest__fuzz_7;
```
```
2022.10.18 12:47:31.372017 [ 2770 ] {0542a2f4-9087-401d-bec6-d5818856f3c7} <Error> executeQuery: std::exception. Code: 1001, type: boost::wrapexcept<std::domain_error>, e.what() = Error in function boost::math::students_t_distribution<double>::students_t_distribution: Degrees of freedom argument is -nan, but must be > 0 ! (version 22.10.1.1) (from [::ffff:127.0.0.1]:41524) (in query: SELECT roundBankers(welchTTest(left, right).2, 6) from welch_ttest__fuzz_7;), Stack trace (when copying this message, always include the lines below):
0. ./build_clang/./contrib/libcxx/include/exception:133: std::logic_error::logic_error(std::logic_error const&) @ 0x1a6576f0 in /usr/local/bin/clickhouse
1. boost::wrapexcept<std::domain_error>::wrapexcept(std::domain_error const&) @ 0xe737654 in /usr/local/bin/clickhouse
2. void boost::throw_exception<std::domain_error>(std::domain_error const&) @ 0xe7375ff in /usr/local/bin/clickhouse
3. void boost::math::policies::detail::raise_error<std::domain_error, double>(char const*, char const*, double const&) @ 0xe739c7d in /usr/local/bin/clickhouse
4. ./build_clang/./contrib/boost/boost/math/policies/error_handling.hpp:0: DB::AggregateFunctionTTest<DB::(anonymous namespace)::WelchTTestData>::insertResultInto(char*, DB::IColumn&, DB::Arena*) const @ 0x122fdee3 in /usr/local/bin/clickhouse
5. ./build_clang/./src/Interpreters/Aggregator.cpp:1817: void DB::Aggregator::insertAggregatesIntoColumns<char*>(char*&, std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, DB::Arena*) const @ 0x1487ca2d in /usr/local/bin/clickhouse
6. ./build_clang/./src/Interpreters/Aggregator.cpp:2167: DB::Aggregator::prepareBlockAndFillWithoutKey(DB::AggregatedDataVariants&, bool, bool) const @ 0x147fa6cb in /usr/local/bin/clickhouse
7. ./build_clang/./src/Processors/Transforms/AggregatingTransform.cpp:0: DB::ConvertingAggregatedToChunksTransform::initialize() @ 0x15f3ef87 in /usr/local/bin/clickhouse
8. ./build_clang/./src/Processors/Executors/ExecutionThreadContext.cpp:47: DB::ExecutionThreadContext::executeTask() @ 0x15dc2e9d in /usr/local/bin/clickhouse
9. ./build_clang/./src/Processors/Executors/PipelineExecutor.cpp:228: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x15db9830 in /usr/local/bin/clickhouse
10. ./build_clang/./src/Processors/Executors/PipelineExecutor.cpp:0: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x15dbaa71 in /usr/local/bin/clickhouse
11. ./build_clang/./base/base/../base/wide_integer_impl.h:772: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x102a8e21 in /usr/local/bin/clickhouse
12. ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:312: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) @ 0x102abe6e in /usr/local/bin/clickhouse
13. ? @ 0x7f4febd6e609 in ?
14. __clone @ 0x7f4febc93163 in ?
0 rows in set. Elapsed: 0.003 sec.
Received exception from server (version 22.10.1):
Code: 1001. DB::Exception: Received from localhost:9000. DB::Exception: boost::wrapexcept<std::domain_error>: Error in function boost::math::students_t_distribution<double>::students_t_distribution: Degrees of freedom argument is -nan, but must be > 0 !. (STD_EXCEPTION)
```
| https://github.com/ClickHouse/ClickHouse/issues/42439 | https://github.com/ClickHouse/ClickHouse/pull/42487 | 4f374f64f3cb83a1ebee47b19c349f013ea72cee | 0d07aeec2f1393730ba1ac99a17db02a4f645b88 | "2022-10-18T12:52:57Z" | c++ | "2022-10-20T11:09:02Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,282 | ["CMakeLists.txt", "cmake/tools.cmake"] | Suppress ld warning in macOS | > Make sure that `git diff` result is empty and you've just pulled fresh master. Try cleaning up cmake cache. Just in case, official build instructions are published here: https://clickhouse.com/docs/en/development/build/
**Operating system**
macOS 12.3
**Cmake version**
```shell
% cmake --version
cmake version 3.24.0
```
**Ninja version**
```shell
% ninja --version
1.11.0
```
**Compiler name and version**
```shell
% clang --version
Homebrew clang version 14.0.6
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin
```
**Full cmake and/or ninja output**
```shell
....
ld: warning: direct access in function 'DB::(anonymous namespace)::ProtobufSerializerBuilder::buildFieldSerializer(std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::shared_ptr<DB::IDataType const> const&, google::protobuf::FieldDescriptor const&, bool, bool)' from file 'src/libdbms.a(ProtobufSerializer.cpp.o)' to global weak symbol 'typeinfo name for DB::DataTypeEnum<short>' from file 'src/libdbms.a(DataTypeEnum.cpp.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'DB::(anonymous namespace)::ProtobufSerializerBuilder::buildFieldSerializer(std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::shared_ptr<DB::IDataType const> const&, google::protobuf::FieldDescriptor const&, bool, bool)' from file 'src/libdbms.a(ProtobufSerializer.cpp.o)' to global weak symbol 'typeinfo name for DB::DataTypeEnum<short>' from file 'src/libdbms.a(DataTypeEnum.cpp.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'DB::(anonymous namespace)::ProtobufSerializerBuilder::buildFieldSerializer(std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::shared_ptr<DB::IDataType const> const&, google::protobuf::FieldDescriptor const&, bool, bool)' from file 'src/libdbms.a(ProtobufSerializer.cpp.o)' to global weak symbol 'typeinfo name for DB::DataTypeEnum<signed char>' from file 'src/libdbms.a(DataTypeEnum.cpp.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'DB::(anonymous namespace)::ProtobufSerializerBuilder::buildFieldSerializer(std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::shared_ptr<DB::IDataType const> const&, google::protobuf::FieldDescriptor const&, bool, bool)' from file 'src/libdbms.a(ProtobufSerializer.cpp.o)' to global weak symbol 'typeinfo name for DB::DataTypeEnum<signed char>' from file 'src/libdbms.a(DataTypeEnum.cpp.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
```
Any ways to suppress them? It output tons of those warnings each time I run `ninja clickhouse`, which is quiet annoying. | https://github.com/ClickHouse/ClickHouse/issues/42282 | https://github.com/ClickHouse/ClickHouse/pull/42470 | f081e52880947e8c4fc54e122b7d9d38a2445293 | cb1aede69452949c6874a3a8bb5b795f57a3c8fd | "2022-10-13T12:59:32Z" | c++ | "2022-11-08T18:34:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,276 | ["src/Access/ExternalAuthenticators.cpp", "src/Access/LDAPClient.cpp", "src/Access/LDAPClient.h", "src/Common/SipHash.h"] | Not AD authorization because many groups in LDAP memberOf container | **Problem:**
Some AD users can't log in, they get the error:
`Authentification failed: password is incorrect or there is no user with such name`
Clickhouse version 22.3.2.1
**There is an error in Clickhouse logs:**
`<Error> Access(user directories): from: 10.11.12.13, user: AD_USERNAME: Authentification failed: Code: 532. DB::Exception: Size limit exceeded. (LDAP_ERROR)`
This error occurs for AD users who have many groups in the **memberOf** LDAP container.
**I checked the number of groups for 4 accounts:**
AD_USERNAME_1 - 107 groups - ERROR Authentification failed
AD_USERNAME_2 - 120 groups - ERROR Authentification failed
AD_USERNAME_3 - 54 groups - OK
AD_USERNAME_4 - 38 groups - OK
**I checked the search groups through the Ldapsearch program:**
Ldapsearch gave all 107 groups for the account without errors:
`ldapsearch -H "ldaps://hostname:636" -D 'CN=AD_USERNAME_1,OU=Users,DC=company,DC=corp.DC=net' -b 'DC=company,DC=corp.DC=net' '(&(objectClass=group)(member=CN=AD_USERNAME_1,OU=Groups,DC=company,DC=corp.DC=net))'`
**Probable cause of the error:**
Clickhouse receives a list of groups which mapping from AD and cannot process a large string/array. | https://github.com/ClickHouse/ClickHouse/issues/42276 | https://github.com/ClickHouse/ClickHouse/pull/42461 | b6fd28cd851dc7da1635fea696d2bcaa714298a6 | 8cb34913a1b5d90cdd9910e0011f4393b35643e5 | "2022-10-13T07:27:52Z" | c++ | "2022-11-22T19:05:14Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,264 | ["src/Storages/System/StorageSystemDetachedParts.cpp", "tests/integration/test_partition/test.py", "tests/queries/0_stateless/00502_custom_partitioning_local.sql", "tests/queries/0_stateless/02117_show_create_table_system.reference"] | Size of parts in system.detached_parts | Right now size of data parts is available only for non-detached parts in `system.parts`, but `system.detached_parts` lacks this information. It will be useful for analyzing disk space usage.
| https://github.com/ClickHouse/ClickHouse/issues/42264 | https://github.com/ClickHouse/ClickHouse/pull/42303 | 2c568df7142a5dfcb64a7031051c00fbe6f9b0d7 | 92b5ca326c74df79a6b19fcfe9500ad7a8f05f7b | "2022-10-12T14:45:07Z" | c++ | "2022-11-08T11:00:56Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,226 | ["src/Storages/StorageBuffer.cpp", "tests/queries/0_stateless/02459_read_in_order_bufer.reference", "tests/queries/0_stateless/02459_read_in_order_bufer.sql"] | Unexpected / incorrect result when selecting from Buffer table with ORDER BY DESC | **Describe what's wrong**
Selecting from a Buffer table with ORDER BY <col> DESC clause returns wrong rows, and the returned rows are not ordered.
**Does it reproduce on recent release?**
Tested version: 22.7.2.15
**How to reproduce**
* Which ClickHouse server version to use
22.7.2.15
* `CREATE TABLE` statements for all tables involved
CREATE TABLE mydb.mytable_stored
(
`a` UInt8
)
ENGINE = MergeTree
ORDER BY a;
CREATE TABLE mydb.mytable
(
`a` UInt8
)
ENGINE = Buffer('mydb', 'mytable_stored', 4, 600, 3600, 10, 100, 10000, 10000000);
* Sample data for all these tables
Note: rows must be inserted one-by-one:
INSERT INTO mydb.mytable VALUES (0);
INSERT INTO mydb.mytable VALUES (1);
INSERT INTO mydb.mytable VALUES (2);
INSERT INTO mydb.mytable VALUES (3);
INSERT INTO mydb.mytable VALUES (4);
INSERT INTO mydb.mytable VALUES (5);
INSERT INTO mydb.mytable VALUES (6);
INSERT INTO mydb.mytable VALUES (7);
INSERT INTO mydb.mytable VALUES (8);
INSERT INTO mydb.mytable VALUES (9);
* Queries to run that lead to unexpected result
SELECT a FROM mydb.mytable ORDER BY a DESC LIMIT 5;
┌─a─┐
│ 3 │
│ 7 │
└───┘
┌─a─┐
│ 2 │
│ 6 │
└───┘
┌─a─┐
│ 1 │
└───┘
5 rows in set. Elapsed: 0.007 sec.
(Interestingly, ascending order *seems* to work, did not test it thoroughly though.)
**Expected behavior**
Get the results in descending order, ie. `9, 8, 7, 6, 5`.
**Additional context**
Selecting the maximal value works:
SELECT max(a) FROM mydb.mytable;
┌─max(a)─┐
│ 9 │
└────────┘
1 row in set. Elapsed: 0.007 sec.
After the rows are flushed to the backing MergeTree table, the results are good.
OPTIMIZE TABLE mydb.mytable;
SELECT a FROM mydb.mytable ORDER BY a DESC LIMIT 5;
┌─a─┐
│ 9 │
│ 8 │
│ 7 │
│ 6 │
│ 5 │
└───┘
5 rows in set. Elapsed: 0.008 sec.
| https://github.com/ClickHouse/ClickHouse/issues/42226 | https://github.com/ClickHouse/ClickHouse/pull/42236 | 26e8d0a93d0976cf7ffd9490941a3ac74f0ac982 | 9af817bb438c8ae0cd47655cb81a73bf9d3bd2bf | "2022-10-10T16:23:03Z" | c++ | "2022-10-17T12:25:31Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,192 | ["src/Interpreters/Context.cpp", "src/Interpreters/Context.h", "src/Storages/StorageFile.cpp"] | When importing from multiple files using globs, the number of parallel parsing threads should be lowered. | Similarly to reading from the internal tables in `Merge` table. | https://github.com/ClickHouse/ClickHouse/issues/42192 | https://github.com/ClickHouse/ClickHouse/pull/46661 | 701e2fb6e350a6f84c0826b8abec419316cd664d | f2172ab8dddbde33d6155e5d991c48818c9d21dc | "2022-10-08T19:36:26Z" | c++ | "2023-05-30T06:53:08Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,189 | ["src/Storages/MergeTree/KeyCondition.cpp", "src/Storages/MergeTree/KeyCondition.h", "src/Storages/System/StorageSystemMergeTreeMetadataCache.cpp", "tests/queries/0_stateless/02458_key_condition_not_like_prefix.reference", "tests/queries/0_stateless/02458_key_condition_not_like_prefix.sql"] | Primary key is not used for NOT LIKE 'prefix%' | According to the following page, a primary key is used for both LIKE and NOT LIKE conditions:
https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree/#functions-support
As I found, a primary key is not used for NOT LIKE 'prefix%' conditions, engine scans all granules.
**How to reproduce**
ClickHouse Playground:
https://fiddle.clickhouse.com/095384c8-7b7e-45ec-b7e7-42dc8150be89
```
CREATE TABLE data
(str String)
ENGINE=MergeTree
ORDER BY str;
INSERT INTO data (str)
SELECT 'aa' FROM numbers(100000);
INSERT INTO data (str)
SELECT 'ba' FROM numbers(100000);
INSERT INTO data (str)
SELECT 'ca' FROM numbers(100000);
SET send_logs_level='trace';
SELECT count()
FROM data
WHERE str NOT LIKE 'a%';
```
`(SelectExecutor): Selected 3/3 parts by partition key, 3 parts by primary key, 36/36 marks by primary key, 36 marks to read from 3 ranges`
**Additional context**
Primary key is used for LIKE conditions, engine skips granules:
https://fiddle.clickhouse.com/95dd14a6-2e9f-4c45-94cd-169233f2a702
Primary key is used for != conditions, engine skips granules:
https://fiddle.clickhouse.com/e208b937-20c3-4cc0-896b-bfe83b42454a
| https://github.com/ClickHouse/ClickHouse/issues/42189 | https://github.com/ClickHouse/ClickHouse/pull/42209 | 12c6a1116c16ddefce8632138b7871753e1394f3 | bb507356ef33ae55f094cadfbd8ad78e7bff51b0 | "2022-10-08T15:18:49Z" | c++ | "2022-11-08T09:07:21Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,185 | ["src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp", "tests/queries/0_stateless/02317_distinct_in_order_optimization.reference", "tests/queries/0_stateless/02317_distinct_in_order_optimization.sql"] | DISTINCT in order: LOGICAL_ERROR if first column in sorting key contains function | **Describe what's wrong**
if the first column in sorting key contains function, `DISTINCT` query with the same column will fail
Example:
<pre>
CREATE TABLE t
(
`datetime` DateTime,
`a` UInt64
)
ENGINE = MergeTree
ORDER BY <b>toDate(datetime)</b>;
INSERT INTO t FORMAT Values ('2000-01-01', 1);
SELECT DISTINCT <b>toDate(datetime)</b> FROM t;
</pre>
**Does it reproduce on recent release?**
Yes, version 22.10.1.15995 (official build)
**Stack**
```
Code: 49. DB::Exception: Sort description can't be empty when reading in order. (LOGICAL_ERROR), Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x78fd3ba in /usr/bin/clickhouse
1. DB::ReadFromMergeTree::requestReadingInOrder(unsigned long, int, unsigned long) @ 0x1337fc67 in /usr/bin/clickhouse
2. DB::QueryPlanOptimizations::tryDistinctReadInOrder(DB::QueryPlan::Node*, std::__1::list<DB::QueryPlan::Node, std::__1::allocator<DB::QueryPlan::Node> >&) @ 0x133ce567 in /usr/bin/clickhouse
3. DB::QueryPlanOptimizations::optimizeTree(DB::QueryPlanOptimizationSettings const&, DB::QueryPlan::Node&, std::__1::list<DB::QueryPlan::Node, std::__1::allocator<DB::QueryPlan::Node> >&) @ 0x133c78a8 in /usr/bin/clickhouse
4. DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x13360731 in /usr/bin/clickhouse
5. DB::InterpreterSelectWithUnionQuery::execute() @ 0x120ef7e6 in /usr/bin/clickhouse
6. ? @ 0x123ea4eb in /usr/bin/clickhouse
7. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::__1::shared_ptr<DB::Context>, std::__1::function<void (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>, std::__1::optional<DB::FormatSettings> const&) @ 0x123ef213 in /usr/bin/clickhouse
8. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::__1::optional<DB::CurrentThread::QueryScope>&) @ 0x12f5ba4e in /usr/bin/clickhouse
9. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x12f60870 in /usr/bin/clickhouse
10. DB::HTTPServerConnection::run() @ 0x12fdbaaa in /usr/bin/clickhouse
11. Poco::Net::TCPServerConnection::start() @ 0x15a7342f in /usr/bin/clickhouse
12. Poco::Net::TCPServerDispatcher::run() @ 0x15a757bb in /usr/bin/clickhouse
13. Poco::PooledThread::run() @ 0x15c30d52 in /usr/bin/clickhouse
14. Poco::ThreadImpl::runnableEntry(void*) @ 0x15c2e4dd in /usr/bin/clickhouse
15. ? @ 0x7fcced143609 in ?
16. clone @ 0x7fcced068133 in ?
(version 22.10.1.15995 (official build))
```
**Expected behavior**
No error occurs | https://github.com/ClickHouse/ClickHouse/issues/42185 | https://github.com/ClickHouse/ClickHouse/pull/42186 | 8a2ba6cd816ded5718f403a4f9751390e2550649 | dac71f445b5096e3c7e4e3f6d9f07387819ed1a0 | "2022-10-08T09:56:21Z" | c++ | "2022-10-10T07:51:29Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,161 | ["src/Storages/MergeTree/MutateTask.cpp", "src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp", "tests/queries/0_stateless/02012_zookeeper_changed_enum_type_incompatible.reference", "tests/queries/0_stateless/02012_zookeeper_changed_enum_type_incompatible.sql", "tests/queries/0_stateless/02461_alter_update_respect_part_column_type_bug.reference", "tests/queries/0_stateless/02461_alter_update_respect_part_column_type_bug.sql"] | alter update "corrupts" collumns.txt | ```sql
drop table if exists src;
create table src( A Int64, B String, C String) Engine=MergeTree order by A
SETTINGS min_bytes_for_wide_part=0;
insert into src values(1, 'one', 'test');
alter table src detach partition tuple();
alter table src modify column B Nullable(String);
alter table src attach partition tuple();
select * from src;
┌─A─┬─B───┬─C────┐
│ 1 │ one │ test │
└───┴─────┴──────┘
alter table src update C = 'test1' where 1 settings mutations_sync=2;
select * from src;
┌─A─┬─B────┬─C─────┐
│ 1 │ ᴺᵁᴸᴸ │ test1 │ -- expected B='one'
└───┴──────┴───────┘
```
```sql
drop table if exists src;
create table src( A String, B String, C String) Engine=MergeTree order by A
SETTINGS min_bytes_for_wide_part=0;
insert into src values('one', 'one', 'test');
alter table src detach partition tuple();
alter table src modify column A LowCardinality(String);
alter table src attach partition tuple();
select * from src;
┌─A───┬─B───┬─C────┐
│ one │ one │ test │
└─────┴─────┴──────┘
alter table src update C = 'test1' where 1 settings mutations_sync=2;
select * from src;
Received exception from server (version 22.9.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception:
Got empty stream for SerializationLowCardinality keys.: (while reading column A):
(while reading from part /var/lib/clickhouse/store/11b/11b74812-48b9-4c1f-9bdc-3e7a28137a9e/all_3_3_0_4/ from mark 0 with max_rows_to_read = 1):
While executing MergeTreeInOrder. (LOGICAL_ERROR)
```
```sql
drop table if exists src;
create table src( A String, B String, C String) Engine=MergeTree order by A
SETTINGS min_bytes_for_wide_part=0;
insert into src values('one', 'one', 'test');
alter table src detach partition tuple();
alter table src modify column A LowCardinality(String);
alter table src attach partition tuple();
select * from src;
┌─A───┬─B───┬─C────┐
│ one │ one │ test │
└─────┴─────┴──────┘
alter table src modify column C LowCardinality(String);
select * from src;
Received exception from server (version 22.9.3):
Code: 49. DB::Exception: Received from localhost:9000.
DB::Exception: Got empty stream for SerializationLowCardinality keys.:
```
related https://github.com/ClickHouse/ClickHouse/issues/42083 , https://github.com/ClickHouse/ClickHouse/issues/42074
(basically it's the same one issue, but I opened this one, because I think the root issue is in `alter update`.
it seems `alter update` updates columns.txt for all columns even if they are not participated in the `alter update`. | https://github.com/ClickHouse/ClickHouse/issues/42161 | https://github.com/ClickHouse/ClickHouse/pull/42319 | cf6442fa65c2598cd8fc03bd1a13b949a52a6832 | c9aa6a655cf3f6621a27c45ea921304297c33f19 | "2022-10-07T17:43:05Z" | c++ | "2022-10-17T10:44:16Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,138 | ["src/IO/ReadHelpers.h", "tests/queries/0_stateless/01802_toDateTime64_large_values.reference", "tests/queries/0_stateless/01802_toDateTime64_large_values.sql"] | toDateTime64 unexpected behaviour for dates around 2299-01-01 | ```sql
SELECT
toDate32('2299-01-01') AS x,
toDateTime64(x, 3),
toDateTime64('2299-01-01 00:00:00', 0);
┌──────────x─┬─toDateTime64(toDate32('2299-01-01'), 3)─┬─toDateTime64('2299-01-01 00:00:00', 0)─┐
│ 2299-01-01 │ 2299-01-01 00:00:00.000 │ 2299-01-01 00:00:00 │
└────────────┴─────────────────────────────────────────┴────────────────────────────────────────┘
OK.
SELECT
toDateTime64('2299-01-01 00:00:00', 0) AS _0,
toDateTime64('2299-01-01 00:00:00', 1) AS _1,
toDateTime64('2299-01-01 00:00:00', 2) AS _2,
toDateTime64('2299-01-01 00:00:00', 3) AS _3;
┌──────────────────_0─┬────────────────────_1─┬─────────────────────_2─┬──────────────────────_3─┐
│ 2299-01-01 00:00:00 │ 2002-11-25 12:00:00.0 │ 1973-04-16 15:36:00.00 │ 1970-05-01 03:57:36.000 │
└─────────────────────┴───────────────────────┴────────────────────────┴─────────────────────────┘
Not OK.
```
@rvasin | https://github.com/ClickHouse/ClickHouse/issues/42138 | https://github.com/ClickHouse/ClickHouse/pull/52130 | 6524031348c3a1148e27ef926baabb35e833a09c | 1f1fcd027ae2828a9b449f53700554ed81fc15e5 | "2022-10-06T22:26:35Z" | c++ | "2023-07-16T16:11:28Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,077 | ["src/Interpreters/NormalizeSelectWithUnionQueryVisitor.cpp", "tests/queries/0_stateless/02896_union_distinct_http_format.reference", "tests/queries/0_stateless/02896_union_distinct_http_format.sh"] | UNION DISTINCT may strip FORMAT from the query | Union distinct can not be returned as PrettyCompactMonoBlock.
```
select 1
union all
select 2
format PrettyCompactMonoBlock
```
https://play.clickhouse.com/?user=play&query=select%201%20union%20all%20select%202%20format%20PrettyCompactMonoBlock
Returns as expected:
```
┌─[1m1[0m─┐
│ 1 │
│ 2 │
└───┘
```
However:
```
select 1
union distinct
select 2
format PrettyCompactMonoBlock
```
https://play.clickhouse.com/?user=play&query=select%201%20union%20distinct%20select%202%20format%20PrettyCompactMonoBlock
Returns TSV. | https://github.com/ClickHouse/ClickHouse/issues/42077 | https://github.com/ClickHouse/ClickHouse/pull/55887 | 9313b343e4102a328a2fe1112a0d690f13d79b2c | da42f2eb0fb414a3fd7ab1f6e7c73c86e7606f72 | "2022-10-05T07:22:46Z" | c++ | "2023-10-26T11:53:58Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,038 | ["src/IO/parseDateTimeBestEffort.cpp", "tests/queries/0_stateless/02457_parse_date_time_best_effort.reference", "tests/queries/0_stateless/02457_parse_date_time_best_effort.sql"] | `parseDateTimeBestEffort` function does not for for `01/12/2017, 18:31:44` format | `select parseDateTimeBestEffort('01/12/2017, 18:31:44')`
It is confused by a comma - should be easy to fix. | https://github.com/ClickHouse/ClickHouse/issues/42038 | https://github.com/ClickHouse/ClickHouse/pull/42049 | 8123f2f30812fb2ce165199d9caa9e1e8e882279 | 0513824fa2f9f320c960bc131b6f785215a22261 | "2022-10-03T19:14:19Z" | c++ | "2022-10-06T09:11:42Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,012 | ["src/AggregateFunctions/AggregateFunctionRankCorrelation.h", "tests/queries/0_stateless/02347_rank_corr_size_overflow.reference", "tests/queries/0_stateless/02347_rank_corr_size_overflow.sql"] | rankCorr wrong result | rankCorr returns huge number (-17.543489999420327 for my case). It should be between -1 and 1.
clickhouse version: 22.8.5.29
test data are located at (oneDrive share, 150M):
https://1drv.ms/u/s!AuNxjqg2JayilU2PtuLTicBa662Z?e=ofy3ZG
simply create a table, import the csv, and then select the rankCorr to reproduce the bug
```
create table yg.testData(a Float32,b Float32 ) engine=MergeTree order by a
```
```
select rankCorr(a,b) from yg.testData
```
For reference, I also used pandas to calculate the rankCorr, the result is -0.018601.
| https://github.com/ClickHouse/ClickHouse/issues/42012 | https://github.com/ClickHouse/ClickHouse/pull/42020 | 980600dc2f1cff0cefaea4ee027b8e35bb8e0388 | 85e431112738c8c96f9ff8cd4bbe188ca11cba71 | "2022-10-03T03:36:30Z" | c++ | "2022-10-05T07:19:57Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 42,009 | ["src/Processors/Formats/Impl/ParallelParsingInputFormat.cpp", "tests/integration/test_storage_s3/test.py"] | Abort in `~ParallelParsingInputFormat` | https://s3.amazonaws.com/clickhouse-test-reports/41945/e40917a9c50f2a9e9e90d4a0f5e065195671f7f3/stateless_tests__release__wide_parts_enabled_.html
```
2022.10.02 02:23:19.183911 [ 10348 ] {} <Fatal> BaseDaemon: ########################################
2022.10.02 02:23:19.184022 [ 10348 ] {} <Fatal> BaseDaemon: (version 22.10.1.605, build id: 94AB863D64F2C501BD444AD6EDD20765D46E47FB) (from thread 4308) (query_id: 8aeac991-7aed-431d-8f28-359a991a125c) (query: SELECT * FROM s3('http://localhost:11111/test/{a,tsv_with_header}.tsv', 'TSV', 'c1 UInt64, c2 UInt64, c3 UInt64')) Received signal Aborted (6)
2022.10.02 02:23:19.184075 [ 10348 ] {} <Fatal> BaseDaemon:
2022.10.02 02:23:19.184113 [ 10348 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f2f1b52a00b 0x7f2f1b509859 0x1311bfd9 0x1145b4ef 0x128b7bfc 0x1300c135 0x1300bcc6 0x13027da6 0x1301bf7c 0x1301e5fd 0x79fe66c 0x7a03d7e 0x7f2f1b6e1609 0x7f2f1b606133
2022.10.02 02:23:19.184151 [ 10348 ] {} <Fatal> BaseDaemon: 2. raise @ 0x7f2f1b52a00b in ?
2022.10.02 02:23:19.184169 [ 10348 ] {} <Fatal> BaseDaemon: 3. abort @ 0x7f2f1b509859 in ?
2022.10.02 02:23:19.233583 [ 10348 ] {} <Fatal> BaseDaemon: 4. ./build_docker/../contrib/libcxxabi/src/cxa_exception.cpp:657: DB::ParallelParsingInputFormat::~ParallelParsingInputFormat() @ 0x1311bfd9 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.261060 [ 10348 ] {} <Fatal> BaseDaemon: 5.1. inlined from ./build_docker/../contrib/libcxx/src/include/atomic_support.h:74: long std::__1::(anonymous namespace)::__libcpp_atomic_load<long>(long const*, int)
2022.10.02 02:23:19.261102 [ 10348 ] {} <Fatal> BaseDaemon: 5.2. inlined from ./build_docker/../contrib/libcxx/src/memory.cpp:102: std::__1::__shared_weak_count::__release_weak()
2022.10.02 02:23:19.261121 [ 10348 ] {} <Fatal> BaseDaemon: 5.3. inlined from ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:217: std::__1::__shared_weak_count::__release_shared()
2022.10.02 02:23:19.261134 [ 10348 ] {} <Fatal> BaseDaemon: 5.4. inlined from ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:703: ~shared_ptr
2022.10.02 02:23:19.261156 [ 10348 ] {} <Fatal> BaseDaemon: 5.5. inlined from ./build_docker/../contrib/libcxx/include/__memory/construct_at.h:56: void std::__1::__destroy_at<std::__1::shared_ptr<DB::IProcessor>, 0>(std::__1::shared_ptr<DB::IProcessor>*)
2022.10.02 02:23:19.261173 [ 10348 ] {} <Fatal> BaseDaemon: 5.6. inlined from ./build_docker/../contrib/libcxx/include/__memory/construct_at.h:81: void std::__1::destroy_at<std::__1::shared_ptr<DB::IProcessor>, 0>(std::__1::shared_ptr<DB::IProcessor>*)
2022.10.02 02:23:19.261192 [ 10348 ] {} <Fatal> BaseDaemon: 5.7. inlined from ./build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:317: void std::__1::allocator_traits<std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> > >::destroy<std::__1::shared_ptr<DB::IProcessor>, void, void>(std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> >&, std::__1::shared_ptr<DB::IProcessor>*)
2022.10.02 02:23:19.261213 [ 10348 ] {} <Fatal> BaseDaemon: 5.8. inlined from ./build_docker/../contrib/libcxx/include/vector:803: std::__1::vector<std::__1::shared_ptr<DB::IProcessor>, std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> > >::__base_destruct_at_end(std::__1::shared_ptr<DB::IProcessor>*)
2022.10.02 02:23:19.261226 [ 10348 ] {} <Fatal> BaseDaemon: 5.9. inlined from ./build_docker/../contrib/libcxx/include/vector:797: std::__1::vector<std::__1::shared_ptr<DB::IProcessor>, std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> > >::__clear()
2022.10.02 02:23:19.261241 [ 10348 ] {} <Fatal> BaseDaemon: 5.10. inlined from ./build_docker/../contrib/libcxx/include/vector:401: ~vector
2022.10.02 02:23:19.261262 [ 10348 ] {} <Fatal> BaseDaemon: 5. ./build_docker/../src/QueryPipeline/QueryPipeline.cpp:35: DB::QueryPipeline::~QueryPipeline() @ 0x1145b4ef in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.350057 [ 10348 ] {} <Fatal> BaseDaemon: 6.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54: std::__1::default_delete<DB::QueryPipeline>::operator()(DB::QueryPipeline*) const
2022.10.02 02:23:19.350109 [ 10348 ] {} <Fatal> BaseDaemon: 6.2. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315: std::__1::unique_ptr<DB::QueryPipeline, std::__1::default_delete<DB::QueryPipeline> >::reset(DB::QueryPipeline*)
2022.10.02 02:23:19.350150 [ 10348 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../src/Storages/StorageS3.cpp:551: DB::StorageS3Source::generate() @ 0x128b7bfc in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.361691 [ 10348 ] {} <Fatal> BaseDaemon: 7.1. inlined from ./build_docker/../src/Processors/Chunk.h:90: DB::Chunk::hasRows() const
2022.10.02 02:23:19.361755 [ 10348 ] {} <Fatal> BaseDaemon: 7.2. inlined from ./build_docker/../src/Processors/Chunk.h:92: DB::Chunk::empty() const
2022.10.02 02:23:19.361794 [ 10348 ] {} <Fatal> BaseDaemon: 7.3. inlined from ./build_docker/../src/Processors/Chunk.h:93: DB::Chunk::operator bool() const
2022.10.02 02:23:19.361817 [ 10348 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../src/Processors/ISource.cpp:125: DB::ISource::tryGenerate() @ 0x1300c135 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.372958 [ 10348 ] {} <Fatal> BaseDaemon: 8.1. inlined from ./build_docker/../contrib/libcxx/include/optional:321: std::__1::__optional_storage_base<DB::Chunk, false>::has_value() const
2022.10.02 02:23:19.373040 [ 10348 ] {} <Fatal> BaseDaemon: 8.2. inlined from ./build_docker/../contrib/libcxx/include/optional:975: std::__1::optional<DB::Chunk>::operator bool() const
2022.10.02 02:23:19.373067 [ 10348 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../src/Processors/ISource.cpp:94: DB::ISource::work() @ 0x1300bcc6 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.378588 [ 10348 ] {} <Fatal> BaseDaemon: 9.1. inlined from ./build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:0: DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*)
2022.10.02 02:23:19.378848 [ 10348 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92: DB::ExecutionThreadContext::executeTask() @ 0x13027da6 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.392970 [ 10348 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:228: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x1301bf7c in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.427134 [ 10348 ] {} <Fatal> BaseDaemon: 11.1. inlined from ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:0: operator()
2022.10.02 02:23:19.427191 [ 10348 ] {} <Fatal> BaseDaemon: 11.2. inlined from ./build_docker/../contrib/libcxx/include/type_traits:3640: decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&)
2022.10.02 02:23:19.427224 [ 10348 ] {} <Fatal> BaseDaemon: 11.3. inlined from ./build_docker/../contrib/libcxx/include/__functional/invoke.h:61: void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&)
2022.10.02 02:23:19.427261 [ 10348 ] {} <Fatal> BaseDaemon: 11.4. inlined from ./build_docker/../contrib/libcxx/include/__functional/function.h:230: std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()()
2022.10.02 02:23:19.427284 [ 10348 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../contrib/libcxx/include/__functional/function.h:711: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x1301e5fd in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.440268 [ 10348 ] {} <Fatal> BaseDaemon: 12.1. inlined from ./build_docker/../base/base/../base/wide_integer_impl.h:772: bool wide::integer<128ul, unsigned int>::_impl::operator_eq<wide::integer<128ul, unsigned int> >(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
2022.10.02 02:23:19.440324 [ 10348 ] {} <Fatal> BaseDaemon: 12.2. inlined from ./build_docker/../base/base/../base/wide_integer_impl.h:1439: bool wide::operator==<128ul, unsigned int, 128ul, unsigned int>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
2022.10.02 02:23:19.440348 [ 10348 ] {} <Fatal> BaseDaemon: 12.3. inlined from ./build_docker/../base/base/../base/strong_typedef.h:42: StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>::operator==(StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag> const&) const
2022.10.02 02:23:19.440376 [ 10348 ] {} <Fatal> BaseDaemon: 12.4. inlined from ./build_docker/../src/Common/OpenTelemetryTraceContext.h:39: DB::OpenTelemetry::Span::isTraceEnabled() const
2022.10.02 02:23:19.440400 [ 10348 ] {} <Fatal> BaseDaemon: 12. ./build_docker/../src/Common/ThreadPool.cpp:296: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x79fe66c in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.460734 [ 10348 ] {} <Fatal> BaseDaemon: 13.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:312: std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >::reset(std::__1::__thread_struct*)
2022.10.02 02:23:19.460795 [ 10348 ] {} <Fatal> BaseDaemon: 13.2. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:269: ~unique_ptr
2022.10.02 02:23:19.460825 [ 10348 ] {} <Fatal> BaseDaemon: 13.3. inlined from ./build_docker/../contrib/libcxx/include/tuple:210: ~__tuple_leaf
2022.10.02 02:23:19.460844 [ 10348 ] {} <Fatal> BaseDaemon: 13.4. inlined from ./build_docker/../contrib/libcxx/include/tuple:470: ~tuple
2022.10.02 02:23:19.460879 [ 10348 ] {} <Fatal> BaseDaemon: 13.5. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54: std::__1::default_delete<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >::operator()(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>*) const
2022.10.02 02:23:19.460918 [ 10348 ] {} <Fatal> BaseDaemon: 13.6. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315: std::__1::unique_ptr<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>, std::__1::default_delete<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> > >::reset(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>*)
2022.10.02 02:23:19.460951 [ 10348 ] {} <Fatal> BaseDaemon: 13.7. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:269: ~unique_ptr
2022.10.02 02:23:19.460979 [ 10348 ] {} <Fatal> BaseDaemon: 13. ./build_docker/../contrib/libcxx/include/thread:295: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) @ 0x7a03d7e in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.461036 [ 10348 ] {} <Fatal> BaseDaemon: 14. ? @ 0x7f2f1b6e1609 in ?
2022.10.02 02:23:19.461076 [ 10348 ] {} <Fatal> BaseDaemon: 15. __clone @ 0x7f2f1b606133 in ?
2022.10.02 02:23:19.715861 [ 10348 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: 04D484300E9032E20175057C6F1CE880)
2022.10.02 02:23:39.607974 [ 643 ] {} <Fatal> Application: Child process was terminated by signal 6.
```
cc: @nikitamikhaylov | https://github.com/ClickHouse/ClickHouse/issues/42009 | https://github.com/ClickHouse/ClickHouse/pull/45498 | 4e0dd08f8cf92e9455957d278e1e7216677cf20d | 61b0c4da380028b50971ad40dd6277f20097dcce | "2022-10-02T12:13:52Z" | c++ | "2023-01-23T13:12:53Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,985 | ["docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md", "docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md", "src/Dictionaries/ClickHouseDictionarySource.cpp", "src/Dictionaries/ClickHouseDictionarySource.h", "src/Dictionaries/HashedDictionary.cpp", "src/Dictionaries/HashedDictionary.h", "src/Dictionaries/IDictionarySource.h", "tests/queries/0_stateless/01509_dictionary_preallocate.reference", "tests/queries/0_stateless/01509_dictionary_preallocate.sh", "tests/queries/0_stateless/02025_dictionary_array_nested_map.sql"] | Excessive dictionary memory preallocating | This bug is reproduced on any version ( 22.1.3.7 , 22.3.11.12 , 22.9.3)
**How to reproduce**
*(cant reproduce well on fiddle, but easy locally or on production)*
**NOT OK (with preallocate)**
```
CREATE TABLE default.oom_table (key String) ENGINE = MergeTree() ORDER BY tuple();
INSERT INTO default.oom_table SELECT hex(sipHash128(toString(number % 100))) FROM numbers(1000000000);
CREATE VIEW default.oom_view AS SELECT xxHash32(key) hash, key FROM default.oom_table GROUP BY key;
CREATE DICTIONARY default.oom_dict (hash UInt32, key String) PRIMARY KEY hash SOURCE(CLICKHOUSE(host 'localhost' user 'default' port 9000 db 'default' table 'oom_view')) LAYOUT (HASHED(PREALLOCATE 1)) LIFETIME (600);
SELECT * FROM dictionary('default.oom_dict');
```
**Error**
```
Code: 241. DB::Exception: Received from clickhouse-server:9000. DB::Exception: Memory limit (total) exceeded: would use 48.48 GiB (attempt to allocate chunk of 51540792506 bytes), maximum: 13.50 GiB. OvercommitTracker decision: Query was selected to stop by OvercommitTracker.. (MEMORY_LIMIT_EXCEEDED)
```
**OK (without preallocate)**
```
CREATE TABLE default.oom_table (key String) ENGINE = MergeTree() ORDER BY tuple();
INSERT INTO default.oom_table SELECT hex(sipHash128(toString(number % 100))) FROM numbers(1000000000);
CREATE VIEW default.oom_view AS SELECT xxHash32(key) hash, key FROM default.oom_table GROUP BY key;
CREATE DICTIONARY default.oom_dict (hash UInt32, key String) PRIMARY KEY hash SOURCE(CLICKHOUSE(host 'localhost' user 'default' port 9000 db 'default' table 'oom_view')) LAYOUT (HASHED()) LIFETIME (600);
SELECT * FROM dictionary('default.oom_dict');
```
| https://github.com/ClickHouse/ClickHouse/issues/41985 | https://github.com/ClickHouse/ClickHouse/pull/45388 | 9c0ba7c7ca987a87033cf755f8be7437d8711011 | 3e08a98f163bb3879954ce5747cc5c7f241e0e7b | "2022-10-01T09:03:02Z" | c++ | "2023-01-20T11:51:25Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,848 | ["src/Parsers/ASTFunction.cpp", "tests/queries/0_stateless/02990_format_lambdas.reference", "tests/queries/0_stateless/02990_format_lambdas.sh"] | Parsing/formatting of lambdas is broken | https://s3.amazonaws.com/clickhouse-test-reports/41796/19062e9d9743f6a926d24fa26abe1f3b56cd2354/fuzzer_astfuzzertsan//report.html
```
CREATE FUNCTION IF NOT EXISTS `02102_test_function` AS x -> plus(x, (x -> ('214748364.6' + 256)) -> plus(1048576), 1)
Found error: The query formatting is broken.
Changed settings: receive_timeout = '10', receive_data_timeout_ms = '10000', send_logs_level = 'fatal'
Got the following (different) text after formatting the fuzzed query and parsing it back:
'CREATE FUNCTION IF NOT EXISTS `02102_test_function` AS x -> ((((x, x) -> ('214748364.6' + 256)) -> plus(1048576)) + 1)'
, expected:
'CREATE FUNCTION IF NOT EXISTS `02102_test_function` AS x -> (((x, x -> ('214748364.6' + 256)) -> plus(1048576)) + 1)'
In more detail:
AST-1 (generated by fuzzer):
'CreateFunctionQuery_02102_test_function, 0x00007b2c00000bc8
-Identifier_02102_test_function, 0x00007b3000010158
-Function_lambda, 0x00007b3c00032dd8
--ExpressionList, 0x00007b1c0001ae98
---Function_tuple, 0x00007b3c0002ba88
----ExpressionList, 0x00007b1c0001a8e8
-----Identifier_x, 0x00007b3000012258
---Function_plus, 0x00007b3c00032ce8
----ExpressionList, 0x00007b1c0001b058
-----Identifier_x, 0x00007b300000b418
-----Function_lambda, 0x00007b3c00032928
------ExpressionList, 0x00007b1c0001afe8
-------Function_lambda, 0x00007b3c00032a18
--------ExpressionList, 0x00007b1c0001af78
---------Function_tuple, 0x00007b3c00032b08
----------ExpressionList, 0x00007b1c0001ab18
-----------Identifier_x, 0x00007b3000012cd8
---------Function_plus, 0x00007b3c00032ec8
----------ExpressionList, 0x00007b1c0001adb8
-----------Literal_Decimal64_'214748364.6', 0x00007b4400039818
-----------Literal_Int64_256, 0x00007b440003a5d8
-------Function_plus, 0x00007b3c00031938
--------ExpressionList, 0x00007b1c0001a258
---------Literal_Int64_1048576, 0x00007b440003a218
-----Literal_UInt64_1, 0x00007b44000396d8
'
Text-1 (AST-1 formatted):
'CREATE FUNCTION IF NOT EXISTS `02102_test_function` AS x -> plus(x, (x -> ('214748364.6' + 256)) -> plus(1048576), 1)'
AST-2 (Text-1 parsed):
'CreateFunctionQuery_02102_test_function, 0x00007b2c00000e88
-Identifier_02102_test_function, 0x00007b3000012798
-Function_lambda, 0x00007b3c00032fb8
--ExpressionList, 0x00007b1c0001aa38
---Function_tuple, 0x00007b3c00032bf8
----ExpressionList, 0x00007b1c0001af08
-----Identifier_x, 0x00007b3000012318
---Function_plus, 0x00007b3c00031fc8
----ExpressionList, 0x00007b1c0001b138
-----Function_lambda, 0x00007b3c000330a8
------ExpressionList, 0x00007b1c0001ac68
-------Function_tuple, 0x00007b3c000320b8
--------ExpressionList, 0x00007b1c0001ad48
---------Identifier_x, 0x00007b3000012498
---------Function_lambda, 0x00007b3c00032478
----------ExpressionList, 0x00007b1c0001acd8
-----------Function_tuple, 0x00007b3c00032838
------------ExpressionList, 0x00007b1c0001ae28
-------------Identifier_x, 0x00007b3000012b58
-----------Function_plus, 0x00007b3c00032298
------------ExpressionList, 0x00007b1c0001abf8
-------------Literal_'214748364.6', 0x00007b440003a718
-------------Literal_UInt64_256, 0x00007b4400039958
-------Function_plus, 0x00007b3c00032658
--------ExpressionList, 0x00007b1c0001b1a8
---------Literal_UInt64_1048576, 0x00007b4400039a98
-----Literal_UInt64_1, 0x00007b4400039bd8
'
Text-2 (AST-2 formatted):
'CREATE FUNCTION IF NOT EXISTS `02102_test_function` AS x -> (((x, x -> ('214748364.6' + 256)) -> plus(1048576)) + 1)'
AST-3 (Text-2 parsed):
'CreateFunctionQuery_02102_test_function, 0x00007b2c00001148
-Identifier_02102_test_function, 0x00007b3000012918
-Function_lambda, 0x00007b3c00033558
--ExpressionList, 0x00007b1c0001b3d8
---Function_tuple, 0x00007b3c00032568
----ExpressionList, 0x00007b1c0001ab88
-----Identifier_x, 0x00007b3000012858
---Function_plus, 0x00007b3c00033468
----ExpressionList, 0x00007b1c0001b368
-----Function_lambda, 0x00007b3c00033378
------ExpressionList, 0x00007b1c0001b2f8
-------Function_tuple, 0x00007b3c00032388
--------ExpressionList, 0x00007b1c0001a878
---------Function_lambda, 0x00007b3c0002b038
----------ExpressionList, 0x00007b1c0001a808
-----------Function_tuple, 0x00007b3c0002a4f8
------------ExpressionList, 0x00007b1c0001a958
-------------Identifier_x, 0x00007b3000012198
-------------Identifier_x, 0x00007b30000129d8
-----------Function_plus, 0x00007b3c000321a8
------------ExpressionList, 0x00007b1c000178c8
-------------Literal_'214748364.6', 0x00007b4400039d18
-------------Literal_UInt64_256, 0x00007b4400039e58
-------Function_plus, 0x00007b3c00033198
--------ExpressionList, 0x00007b1c0001b218
---------Literal_UInt64_1048576, 0x00007b4400039f98
-----Literal_UInt64_1, 0x00007b44000391d8
'
Text-3 (AST-3 formatted):
'CREATE FUNCTION IF NOT EXISTS `02102_test_function` AS x -> ((((x, x) -> ('214748364.6' + 256)) -> plus(1048576)) + 1)'
Text-3 must be equal to Text-2, but it is not.
```
cc: @evillique | https://github.com/ClickHouse/ClickHouse/issues/41848 | https://github.com/ClickHouse/ClickHouse/pull/60012 | cc59e06fea463c382d356b602cdc91640e13e2bc | b1a911108aca4d86c1ebe1af66fcbf4837dad810 | "2022-09-27T19:13:26Z" | c++ | "2024-02-15T16:59:51Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,736 | ["docs/en/interfaces/formats.md"] | parsing error for jsoncompactcolumns | This text was changed after I realized that in jsoncompactcolumns you need to put the data in columns not rows as it may seem at a first glance in the documentation | https://github.com/ClickHouse/ClickHouse/issues/41736 | https://github.com/ClickHouse/ClickHouse/pull/46244 | 279232fc64d330496129cc01229f8318cf2adb0c | b3e60530f27ddd89f70a030f49f98d075ab28547 | "2022-09-23T15:05:03Z" | c++ | "2023-02-09T18:06:45Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,727 | ["tests/queries/0_stateless/02806_cte_block_cannot_be_empty.reference", "tests/queries/0_stateless/02806_cte_block_cannot_be_empty.sql"] | Exception: Column name in Block cannot be empty: while executing 'FUNCTION | ClickHouse version 22.3.12.19
When I execute the following request
`
with c as (
select 1 ID, today() dt, 0 p
)
select
multiIf(t.ID = 1, formatRowNoNewline('JSONEachRow', dd), '') AS params
from (
select ID, case when p = 0 then toString(date_add(hour, p, dt)) else '2022-01-01' end as dd
from c
) t
`
I get an error
`SQL Error [1002]: ClickHouse exception, code: 1002, host: host, port: 8123; Code: 352. DB::Exception: Column name in Block cannot be empty: while executing 'FUNCTION multiIf(equals(ID, 1) :: 0, formatRowNoNewline('JSONEachRow', dd) :: 8, '' :: 7) -> multiIf(equals(ID, 1), formatRowNoNewline('JSONEachRow', dd), '') String : 4'. (AMBIGUOUS_COLUMN_NAME) (version 22.3.12.19 (official build))
`
But if you add dd column, the query succeeds.
`
with c as (
select 1 ID, today() dt, 0 p
)
select
multiIf(t.ID = 1, formatRowNoNewline('JSONEachRow', dd), '') AS params, dd
from (
select ID, case when p = 0 then toString(date_add(hour, p, dt)) else '2022-01-01' end as dd
from c
) t
` | https://github.com/ClickHouse/ClickHouse/issues/41727 | https://github.com/ClickHouse/ClickHouse/pull/51355 | 0fca64ced48e24c873290bd87116b100e5c22634 | 845ea87fbfa8e41fa2390caa1eee4ce66aaf1fbf | "2022-09-23T12:24:35Z" | c++ | "2023-07-19T20:17:02Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,716 | ["src/Interpreters/InterpreterCreateQuery.cpp", "src/Storages/AlterCommands.cpp", "tests/queries/0_stateless/02454_disable_mergetree_with_lightweight_delete_column.reference", "tests/queries/0_stateless/02454_disable_mergetree_with_lightweight_delete_column.sql"] | Lightweight delete causes segfault when table is created with _row_exists column | **Describe the unexpected behaviour**
The lightweight delete feature implementation causes server side segfault when table is created with a `_row_exists` column.
**How to reproduce**
Tested on ~~master branch (commit `74ffb8438`)~~ tag `v22.8.5.29-lts`.
Edit: WARNING: be careful when testing, the created table cannot be dropped from CH!
```
CREATE TABLE test(
whatever String,
_row_exists String
)
ENGINE = MergeTree()
ORDER BY whatever; -- Works
INSERT INTO test values('1', '1'); -- Still works
SELECT * FROM test; -- Fails in client, sometimes segfault in server?
DROP TABLE test; -- Client hangs for a while, then exits, segfault in server
```
**Expected behavior**
If it is not possible to use tables with explicitly created `_row_exists` column, the create statement should raise an error, and this restriction should be documented IMHO. (It would be a nice feature if the column name containing the delete mask could be specified in the MergeTree parameters upon table creation, defaulting to `_row_exists`.)
**Error message and/or stacktrace**
Failure message in client after `SELECT`:
```
Received exception from server (version 22.8.5):
Code: 352. DB::Exception: Received from localhost:9000. DB::Exception: Block structure mismatch in (columns with identical name must have identical structure) stream: different types:
_row_exists String String(size = 1)
_row_exists UInt8 UInt8(size = 1): While executing MergeTreeInOrder. (AMBIGUOUS_COLUMN_NAME)
```
Error message in server after `SELECT`:
```
2022.09.23 10:17:31.352611 [ 306928 ] {6906df8e-36b2-4ec3-9012-3f1faaa00fc3} <Error> executeQuery: Code: 352. DB::Exception: Block structure mismatch in (columns with identical name must have identical structure) stream: different types:
_row_exists String String(size = 1)
_row_exists UInt8 UInt8(size = 1): While executing MergeTreeThread. (AMBIGUOUS_COLUMN_NAME) (version 22.8.5.1) (from [::1]:34452) (in query: select * from test;), Stack trace (when copying this message, always include the lines below):
0. /home/clickhouse/build/./contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x183f3aac in /home/clickhouse/build/programs/clickhouse
1. /home/clickhouse/build/./src/Common/Exception.cpp:69: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x1035f348 in /home/clickhouse/build/programs/clickhouse
2. /home/clickhouse/build/./src/Core/Block.cpp:36: void DB::checkColumnStructure<void>(DB::ColumnWithTypeAndName const&, DB::ColumnWithTypeAndName const&, std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool, int) @ 0x1471e8cb in /home/clickhouse/build/programs/clickhouse
3. /home/clickhouse/build/./contrib/libcxx/include/vector:1575: DB::Block::insert(DB::ColumnWithTypeAndName) @ 0x1471f094 in /home/clickhouse/build/programs/clickhouse
4. /home/clickhouse/build/./contrib/libcxx/include/string:1445: DB::MergeTreeBaseSelectProcessor::injectVirtualColumns(DB::Block&, unsigned long, DB::MergeTreeReadTask*, std::__1::shared_ptr<DB::IDataType const> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x1641590e in /home/clickhouse/build/programs/clickhouse
5. /home/clickhouse/build/./src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:216: DB::MergeTreeBaseSelectProcessor::generate() @ 0x16414dbd in /home/clickhouse/build/programs/clickhouse
6. /home/clickhouse/build/./src/Processors/Chunk.h:90: DB::ISource::tryGenerate() @ 0x160ee323 in /home/clickhouse/build/programs/clickhouse
7. /home/clickhouse/build/./contrib/libcxx/include/optional:321: DB::ISource::work() @ 0x160edf92 in /home/clickhouse/build/programs/clickhouse
8. /home/clickhouse/build/./src/Processors/Executors/ExecutionThreadContext.cpp:0: DB::ExecutionThreadContext::executeTask() @ 0x16107bc0 in /home/clickhouse/build/programs/clickhouse
9. /home/clickhouse/build/./src/Processors/Executors/PipelineExecutor.cpp:228: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x160fdcba in /home/clickhouse/build/programs/clickhouse
10. /home/clickhouse/build/./src/Processors/Executors/PipelineExecutor.cpp:0: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x160ff1fe in /home/clickhouse/build/programs/clickhouse
11. /home/clickhouse/build/./contrib/libcxx/include/__functional/function.h:832: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x103f435f in /home/clickhouse/build/programs/clickhouse
12. /home/clickhouse/build/./contrib/libcxx/include/__memory/unique_ptr.h:312: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()> >(void*) @ 0x103f67c0 in /home/clickhouse/build/programs/clickhouse
13. ? @ 0x7efea9f4078d in ?
14. clone @ 0x7efea9fc18e4 in ?
```
Failure message in client after `DROP`:
```
Exception on client:
Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF)
Connecting to localhost:9000 as user default.
Code: 210. DB::NetException: Connection refused (localhost:9000). (NETWORK_ERROR)
```
Server after `SELECT` / `DROP`:
```
Segmentation fault (core dumped)
```
**Additional context**
Tested on ~~master branch (commit `74ffb8438`)~~ `v22.8.5.29-lts`. | https://github.com/ClickHouse/ClickHouse/issues/41716 | https://github.com/ClickHouse/ClickHouse/pull/41763 | caf6a99f41af59033ef61c7b06d6d6d70105b7e5 | 1719e000ea4bd3f461f06c3e647a3e7f3fc35a4d | "2022-09-23T08:21:28Z" | c++ | "2022-09-27T10:20:19Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,692 | ["src/Interpreters/ClusterProxy/executeQuery.cpp", "src/Interpreters/ClusterProxy/executeQuery.h", "src/Storages/getStructureOfRemoteTable.cpp", "tests/queries/0_stateless/02346_additional_filters.reference", "tests/queries/0_stateless/02346_additional_filters.sql", "tests/queries/0_stateless/02346_additional_filters_distr.reference", "tests/queries/0_stateless/02346_additional_filters_distr.sql", "tests/queries/0_stateless/02346_additional_filters_index.reference", "tests/queries/0_stateless/02346_additional_filters_index.sql"] | additional_table_filters with distributed table | This impacts the Grafana plugin.
From https://github.com/grafana/clickhouse-datasource/issues/198
if an adhoc filter is specified for the field t1_distributed.f2
the following query will be built by the plugin SELECT f1 from t1_distributed settings additional_table_filters = {'t1_distributed': 'f2 = xxx'}
this query will actually not do its job of filtering
i guess it is coming from the fact that additional_table_filters are applied by clickhouse when it reads the table....but distributed tables are not read.....
if i replace in the built query, within the additional_table_filters settings, t1_distributed with t1_local (so a query like `SELECT f1 from t1_distributed settings additional_table_filters = {'t1_local': 'f2 = xxx'}), then it is working as expected
i gave a try to add an adhoc filter on the "local" table (while my "main" query is still on the distributed table) (ie define an adhoc filter on the fied t1_local.f2)
then the built query by the plugin does not include any additional_table_filters settings (i guess there is a check in order to add additional_table_filters only on the table used in the query)
| https://github.com/ClickHouse/ClickHouse/issues/41692 | https://github.com/ClickHouse/ClickHouse/pull/42322 | 10b176fe197d5fde73f7254c64545bcf58655449 | d85bfe6ea346889680314edfa1bea6c5309ea11e | "2022-09-22T13:31:13Z" | c++ | "2022-10-19T15:09:51Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,686 | ["src/DataTypes/DataTypesDecimal.h", "src/Functions/FunctionsConversion.h", "tests/queries/0_stateless/01691_DateTime64_clamp.reference", "tests/queries/0_stateless/01734_datetime64_from_float.reference", "tests/queries/0_stateless/01734_datetime64_from_float.sql"] | toDateTime64 returns different output with Float type and int type arguments. |
select toDateTime64(-86400 ,9,'UTC') == 1969-12-31 00:00:00.000000000
select toDateTime64(-86400.00 ,9,'UTC') == 1970-01-01 00:00:00.000000000
However, I expect both outputs to be same.
Version affected : 22.8 | https://github.com/ClickHouse/ClickHouse/issues/41686 | https://github.com/ClickHouse/ClickHouse/pull/42025 | f4f85a069b2a246118e8e454c2efccaf7e7e0dfa | 5e86375f177d79054b5f47cebbce7fc7234029e8 | "2022-09-22T12:40:07Z" | c++ | "2022-10-04T12:12:18Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,647 | ["src/Storages/MergeTree/MergeTreeData.cpp", "tests/queries/0_stateless/02460_projections_and_aggregate_null_if_empty.reference", "tests/queries/0_stateless/02460_projections_and_aggregate_null_if_empty.sh"] | select max(date) from test_date always return -127593672 | **Describe the unexpected behaviour**
max(date) and min(date) always return the same negative value: -127593672
**How to reproduce**
ClickHouse version: Docker -- clickhouse/clickhouse-server:22.6.8.35-alpine
Architecture: linux/arm64
```
MySQL [test]> create table test_date (
date Int32,
hour Int32
) ENGINE = MergeTree ORDER BY (date);
-> -> -> Query OK, 0 rows affected (0.01 sec)
```
```
MySQL [test]> insert into test_date values(20220920, 1);
Query OK, 1 row affected (0.00 sec)
```
```
MySQL [test]> select max(date) from test_date;
+-----------------+
| maxOrNull(date) |
+-----------------+
| -127593672 |
+-----------------+
1 row in set (0.00 sec)
```
```
MySQL [test]> select max(hour) from test_date;
+-----------------+
| maxOrNull(hour) |
+-----------------+
| 1 |
+-----------------+
1 row in set (0.00 sec)
```
**Expected behavior**
I expect it to return ``20220920``.
| https://github.com/ClickHouse/ClickHouse/issues/41647 | https://github.com/ClickHouse/ClickHouse/pull/42198 | 509f0426a9a447807ab5e5f0ac33b5f2bf738324 | 018c68b36d97d2bfe7b850f0165a208944c1b1fa | "2022-09-21T16:43:45Z" | c++ | "2022-10-14T01:14:19Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,490 | ["src/Functions/FunctionsConversion.h", "tests/queries/0_stateless/02426_to_string_nullable_fixedstring.reference", "tests/queries/0_stateless/02426_to_string_nullable_fixedstring.sql"] | 21.9+: Illegal column Nullable(FixedString(32)) of first argument of function toString | **Describe what's wrong**
```sql
SELECT toTypeName(s), toString(s) FROM
(
SELECT toFixedString('',32) AS s
UNION ALL
SELECT null AS s
)
```
this query works in all versions from 19.17 to 21.8, but stop works after 21.9+
https://fiddle.clickhouse.com/7bd65b36-a6e6-470a-8bdc-4c98a33ff453
21.8 works
https://fiddle.clickhouse.com/9e40a424-4027-4c7f-bd41-b20935ae9129
21.9 doesn't work
```
Received exception from server (version 21.9.6):
Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Illegal column Nullable(FixedString(32)) of first argument of function toString. (ILLEGAL_COLUMN)
```
this query works in all versions
```sql
SELECT toTypeName(s), toString(s) FROM
(
SELECT '' AS s
UNION ALL
SELECT null AS s
)
```
https://fiddle.clickhouse.com/4f810f03-1644-4eb7-b696-0341b1bbdbc4
**Does it reproduce on recent release?**
Yes, reproduce in all releases 21.9+ | https://github.com/ClickHouse/ClickHouse/issues/41490 | https://github.com/ClickHouse/ClickHouse/pull/41541 | 49e0a87b8fe84670ba7ce85968f1463fc3809fa5 | a4feb81383c66a176e0f54874ad08bb66ff9f993 | "2022-09-19T08:06:18Z" | c++ | "2022-09-21T17:44:14Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,452 | ["src/Core/Settings.h", "src/Interpreters/InterpreterCreateQuery.cpp", "tests/queries/0_stateless/02426_create_suspicious_fixed_string.reference", "tests/queries/0_stateless/02426_create_suspicious_fixed_string.sql", "tests/queries/0_stateless/02426_low_cardinality_fixed_string_insert_field.sh"] | A setting `allow_suspicious_fixed_string_types` | **Use case**
If FixedString is used with more than 256 bytes in size, it is suspicious and most likely indicates misusage.
Forbid this by default and add a setting to override it; ATTACH queries should allow creating tables nevertheless.
See also: `allow_suspicious_low_cardinality_types`.
| https://github.com/ClickHouse/ClickHouse/issues/41452 | https://github.com/ClickHouse/ClickHouse/pull/41495 | 0414d9587887c5b5718aa95141910ce66437b457 | 49e0a87b8fe84670ba7ce85968f1463fc3809fa5 | "2022-09-18T02:25:17Z" | c++ | "2022-09-21T17:35:34Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,443 | ["src/AggregateFunctions/AggregateFunctionCategoricalInformationValue.cpp", "src/AggregateFunctions/AggregateFunctionCategoricalInformationValue.h", "src/DataTypes/Serializations/SerializationArray.cpp", "tests/queries/0_stateless/02425_categorical_information_value_properties.reference", "tests/queries/0_stateless/02425_categorical_information_value_properties.sql"] | Crash in `categorialInformationValue` function | ```
SELECT categoricalInformationValue(x.1, x.2) FROM (SELECT arrayJoin([(0, 0), (NULL, 2), (1, 0), (1, 1)]) AS x)
``` | https://github.com/ClickHouse/ClickHouse/issues/41443 | https://github.com/ClickHouse/ClickHouse/pull/41449 | 45dc3faecadd5617c870678a314c0d556300e67a | c8c728e7407ad899adf36fa0c31ad32855bf2647 | "2022-09-17T21:27:58Z" | c++ | "2022-09-18T02:26:26Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,418 | ["src/Common/Exception.cpp", "src/Common/Exception.h", "tests/queries/0_stateless/00956_sensitive_data_masking.reference", "tests/queries/0_stateless/00956_sensitive_data_masking.sh"] | query_masking_rules not work for exception messages at query_log | version 22.8.4.7
How to reproduce:
1. Add section to config.xml
` <query_masking_rules>
<rule>
<name>hide encrypt/decrypt arguments</name>
<regexp>((?:aes_)?(?:encrypt|decrypt)(?:_mysql)?)\s*\(\s*(?:'(?:\\'|.)+'|.*?)\s*\)</regexp>
<!-- or more secure, but also more invasive:
(aes_\w+)\s*\(.*\)
-->
<replace>\1(???)</replace>
</rule>
</query_masking_rules>
`
2. Run query and get exception
`select decrypt('aes-256-ecb', 'my_text', 'mykey123451234512345123451234512');`
3. Check query_log
`select exception, query from system.query_log
where exception_code>0
order by event_time desc
limit 1`
Here we have masked query
`select decrypt(???)`
And not masked exception message
`Code: 454. DB::Exception: Failed to decrypt. OpenSSL error code: 503316603: While processing decrypt('aes-256-ecb', 'my_text', 'mykey123451234512345123451234512'). (OPENSSL_ERROR) (version 22.8.4.7 (official build))`
And for example, i can easily get encrypt key from the exception message | https://github.com/ClickHouse/ClickHouse/issues/41418 | https://github.com/ClickHouse/ClickHouse/pull/42940 | 581e57be9fa4ee68e507fe0eb4f33bf787423119 | 6c2b53f0ae767b222ce41d01df256e85382161e4 | "2022-09-16T14:50:43Z" | c++ | "2022-11-21T22:20:15Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,416 | ["programs/client/Client.cpp", "tests/queries/shell_config.sh"] | Duplicate accept request on self-signed server certificate | **Describe the unexpected behaviour**
On connection with server having self-signed certificate warning message and acceptance request issued twice.
**How to reproduce**
Provide server with self-signed certificate and make a secure connection.
**Expected behavior**
Only one warning message and acceptance request should be issued.
**Error message and/or stacktrace**
```
ubuntu@ip-172-31-42-195:~/ClickHouse-comb/build_debug/programs$ ./clickhouse-client -s --port 9541
ClickHouse client version 22.9.1.1.
Connecting to localhost:9541 as user default.
WARNING: Certificate verification failed
----------------------------------------
Issuer Name: /CN=another
Subject Name: /CN=another
The certificate yielded the error: self signed certificate
The error occurred in the certificate chain at position 0
Accept the certificate (y,n)? y
Connected to ClickHouse server version 22.9.1 revision 54460.
Warnings:
* Server was built in debug mode. It will work slowly.
ip-172-31-42-195.us-east-2.compute.internal :)
WARNING: Certificate verification failed
----------------------------------------
Issuer Name: /CN=another
Subject Name: /CN=another
The certificate yielded the error: self signed certificate
The error occurred in the certificate chain at position 0
Accept the certificate (y,n)?
``` | https://github.com/ClickHouse/ClickHouse/issues/41416 | https://github.com/ClickHouse/ClickHouse/pull/41743 | 072c19ba96236a9dc3a8a613afe607c3c7cf6aa9 | b5768be1cadda0d5f28ccdcecd15c5eaab16a33c | "2022-09-16T12:58:37Z" | c++ | "2022-09-28T14:13:13Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,383 | ["src/Processors/OffsetTransform.cpp", "tests/queries/0_stateless/02429_offset_pipeline_stuck_bug.reference", "tests/queries/0_stateless/02429_offset_pipeline_stuck_bug.sql"] | Logical error: Pipeline stuck | https://pastila.nl/?001ae728/52bc538966a011139c5dac06472b22f6 | https://github.com/ClickHouse/ClickHouse/issues/41383 | https://github.com/ClickHouse/ClickHouse/pull/41588 | c849dd4c76fe8f7d9987daf602f0d179cfc5ffd1 | 7e0914c3cebf513db693c12cd948e4c274d54f3b | "2022-09-15T16:06:49Z" | c++ | "2022-09-21T14:42:42Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,380 | ["docker/test/integration/runner/compose/docker_compose_ldap.yml", "src/Access/LDAPAccessStorage.h", "src/Access/MemoryAccessStorage.h", "tests/integration/helpers/cluster.py", "tests/integration/test_ldap_external_user_directory/__init__.py", "tests/integration/test_ldap_external_user_directory/configs/ldap_with_role_mapping.xml", "tests/integration/test_ldap_external_user_directory/test.py"] | Using LDAP user from a group with no matching ClickHouse role causes hangup. | **Describe the unexpected behaviour**
I have an LDAP user in a group with no matching role. When I try to execute a query as that user, ClickHouse hangs.
**How to reproduce**
* Which ClickHouse server version to use
22.8.5.29-alpine
```
Sep 07,2022 16:06:49 ⟥ When I add LDAP user to the group that maps to unknown role
Sep 07,2022 16:06:49 ⟥ By adding user cn=user1,ou=users,dc=company,dc=com to group cn=clickhouse_role_97fc199b_2ee8_11ed_9111_6986de65a63d_unknown,ou=groups,dc=company,dc=com
Sep 07,2022 16:06:49 ⟥ And executing command
echo -e "dn: cn=clickhouse_role_97fc199b_2ee8_11ed_9111_6986de65a63d_unknown,ou=groups,dc=company,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=user1,ou=users,dc=company,dc=com" | ldapmodify -x -H ldap://localhost -D "cn=admin,dc=company,dc=com" -w admin
3ms [openldap1] bash# echo -e "dn: cn=clickhouse_role_97fc199b_2ee8_11ed_9111_6986de65a63d_unknown,ou=groups,dc=company,dc=com
4ms [openldap1] > changetype: modify
4ms [openldap1] > add: uniquemember
7ms [openldap1] > uniquemember: cn=user1,ou=users,dc=company,dc=com" | ldapmodify -x -H ldap://localhost -D "cn=admin,dc=company,dc=com" -w admin
14ms [openldap1] modifying entry "cn=clickhouse_role_97fc199b_2ee8_11ed_9111_6986de65a63d_unknown,ou=groups,dc=company,dc=com"
19ms [openldap1]
22ms [openldap1] bash# echo $?
22ms [openldap1] 0
23ms [openldap1] bash#
Sep 07,2022 16:06:49 ⟥ When I again login as an LDAP user
Sep 07,2022 16:06:49 ⟥ By executing command
(set -o pipefail && echo -e "SHOW GRANTS" | clickhouse client -n --user "user1" --password "user1" 2>&1 | head -c -0)
5ms [clickhouse1] bash# (set -o pipefail && echo -e "SHOW GRANTS" | clickhouse client -n --user "user1" --password "user1" 2>&1 | head -c -0)
5m 0s [clickhouse1]
5m 0s [clickhouse1]
```
**Expected behavior**
Works on previous versions.
| https://github.com/ClickHouse/ClickHouse/issues/41380 | https://github.com/ClickHouse/ClickHouse/pull/55119 | 48ce595e247c76020f3a74dd9ea965aec1e3ce10 | b38d4b5b0fb6956242e9a870ea5d6275210f3a22 | "2022-09-15T15:52:45Z" | c++ | "2023-10-07T22:38:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,269 | ["src/Interpreters/MonotonicityCheckVisitor.h", "tests/queries/0_stateless/02147_order_by_optimizations.sql"] | Clickhouse got stuck and had thrown a coredump |
Clickhouse got stuck and had thrown a coredump
Optimize table process has been started there before the fail
**Does it reproduce on recent release?**
v22.3.6.5-lts
**Error message and/or stacktrace**
https://pastila.nl/?00ea0713/9ad972e00fde60564ff00853050fcc1d
Can't provide the coredump file for NDA reason, but ready to analyse it
| https://github.com/ClickHouse/ClickHouse/issues/41269 | https://github.com/ClickHouse/ClickHouse/pull/41740 | cea21846ea8977b811802b3e7ec3979651c24b4c | da375f27c5ead71ac5f70e883164a368b07d53c9 | "2022-09-13T16:13:57Z" | c++ | "2022-09-28T12:45:02Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,200 | ["docker/server/entrypoint.sh"] | Not found: https_port (version 22.9.1.1693 (official build)) | Hello,
I just updated my local clickhouse version in docker to head (from 22.8.4.7) and now it refuses to start.
The error in the log is :
Poco::Exception. Code: 1000, e.code() = 0, Not found: https_port (version 22.9.1.1693 (official build))
Is there any extra configuration to do for version 22.9 ?
Thanks,
Aubry
| https://github.com/ClickHouse/ClickHouse/issues/41200 | https://github.com/ClickHouse/ClickHouse/pull/41693 | e36a53a762e0c18e34ceeda25a454ba8d1c6d229 | 10bb41a2b7842a45f43bf92b1c0aa051c3f744de | "2022-09-12T08:55:42Z" | c++ | "2022-09-22T14:02:29Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,182 | ["src/Processors/Transforms/PartialSortingTransform.cpp", "tests/queries/0_stateless/02428_partial_sort_optimization_bug.reference", "tests/queries/0_stateless/02428_partial_sort_optimization_bug.sql"] | Random results of ORDER BY with LIMIT and a segfault | Hello! It seems I have managed to produce a segfault in my ClickHouse server.
I have a table that looks like this:
```
CREATE TABLE test_table (
"column_1" String NOT NULL,
"column_2" LowCardinality(String) NOT NULL,
"column_3" LowCardinality(String) NOT NULL,
"timestamp" Datetime64(6) NOT NULL
)
ENGINE = AggregatingMergeTree()
PARTITION BY toYYYYMM("timestamp")
PRIMARY KEY ("column_1", "column_2", "timestamp", "column_3")
;
```
Then I run a query that looks likes this
```
SELECT max(timestamp) FROM (
SELECT timestamp, column_1, column_2, column_3
FROM test_table
ORDER BY timestamp asc
LIMIT 1500
)
```
Next, 3 strange things happen:
1. I am a getting a different result timestamp every time I run this query (no data is being inserted into the table and I ran OPTIMIZE FINAL earlier to make sure no merging is happening in the background)
2. If I change the limit to anything below 1500 (even 1499) the problem disappears.
3. When testing this query on my production server that has a lot other queries running on it at the same time I managed to crash the server and I got a stack trace that looks like this
```
2022.09.08 09:20:56.777322 [ 2857169 ] {} <Fatal> BaseDaemon: ########################################
2022.09.08 09:20:56.777425 [ 2857169 ] {} <Fatal> BaseDaemon: (version 22.6.2.12 (official build), build id: 52AFD84A0FEDD1BA) (from thread 2857119) (query_id: c94aa1c3-4b1e-4d34-a35a-a94c22d7e3ea) (query: select max(timestamp) from ( SELECT timestamp, column_1, column_2, column_3 FROM test_table
order by timestamp asc, id asc limit 1500 )) Received signal Segmentation fault (11)
2022.09.08 09:20:56.777461 [ 2857169 ] {} <Fatal> BaseDaemon: Address: 0x6 Access: read. Address not mapped to object.
2022.09.08 09:20:56.777500 [ 2857169 ] {} <Fatal> BaseDaemon: Stack trace: 0x1668ecb5 0x1739af43 0x12df9570 0x171903a7 0x171af8da 0x171a47fe 0x171a60c4 0xb94d077 0xb95049d 0x7fabdf964609 0x7fabdf889133
2022.09.08 09:20:56.777560 [ 2857169 ] {} <Fatal> BaseDaemon: 2. DB::ColumnString::compareAt(unsigned long, unsigned long, DB::IColumn const&, int) const @ 0x1668ecb5 in /usr/bin/clickhouse
2022.09.08 09:20:56.777583 [ 2857169 ] {} <Fatal> BaseDaemon: 3. DB::PartialSortingTransform::transform(DB::Chunk&) @ 0x1739af43 in /usr/bin/clickhouse
2022.09.08 09:20:56.777604 [ 2857169 ] {} <Fatal> BaseDaemon: 4. DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x12df9570 in /usr/bin/clickhouse
2022.09.08 09:20:56.777627 [ 2857169 ] {} <Fatal> BaseDaemon: 5. DB::ISimpleTransform::work() @ 0x171903a7 in /usr/bin/clickhouse
2022.09.08 09:20:56.777644 [ 2857169 ] {} <Fatal> BaseDaemon: 6. DB::ExecutionThreadContext::executeTask() @ 0x171af8da in /usr/bin/clickhouse
2022.09.08 09:20:56.777664 [ 2857169 ] {} <Fatal> BaseDaemon: 7. DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x171a47fe in /usr/bin/clickhouse
2022.09.08 09:20:56.777691 [ 2857169 ] {} <Fatal> BaseDaemon: 8. ? @ 0x171a60c4 in /usr/bin/clickhouse
2022.09.08 09:20:56.777714 [ 2857169 ] {} <Fatal> BaseDaemon: 9. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xb94d077 in /usr/bin/clickhouse
2022.09.08 09:20:56.777774 [ 2857169 ] {} <Fatal> BaseDaemon: 10. ? @ 0xb95049d in /usr/bin/clickhouse
2022.09.08 09:20:56.777792 [ 2857169 ] {} <Fatal> BaseDaemon: 11. ? @ 0x7fabdf964609 in ?
2022.09.08 09:20:56.777805 [ 2857169 ] {} <Fatal> BaseDaemon: 12. clone @ 0x7fabdf889133 in ?
2022.09.08 09:20:56.971010 [ 2857169 ] {} <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: 894C4AAB85FCB9AAC26136BC446CC5AF)
```
I froze the partition and attached it to local clickhouse server running newest 22.8 version and the random timestamp problem was still there. I couldn't get it to produce a segfault but the local instance has no other query running on it so that's not really comparable.
Has someone seen anything like this before?
I would be happy to share the partition since that's probably where the problem lies but the data stored on it is private. Is there some method of randomizing/encrypting the column_* columns without affecting the primary key? | https://github.com/ClickHouse/ClickHouse/issues/41182 | https://github.com/ClickHouse/ClickHouse/pull/41576 | 7e0914c3cebf513db693c12cd948e4c274d54f3b | 1204f643f1b0f2e8eb92bc844ca8fac3865db3c2 | "2022-09-10T18:16:23Z" | c++ | "2022-09-21T14:47:18Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,076 | ["src/Coordination/CoordinationSettings.h", "src/Coordination/KeeperDispatcher.cpp", "tests/integration/test_keeper_session/configs/keeper_config1.xml", "tests/integration/test_keeper_session/configs/keeper_config2.xml", "tests/integration/test_keeper_session/configs/keeper_config3.xml", "tests/integration/test_keeper_session/test.py"] | Remove all connected sessions during keeper shutdown | Sessions in clickhouse-keeper are local entity for each quorum participant but some information about session are global for the state of keeper: session_ids and corresponding ephemeral nodes. It make sense to send close requests to RAFT during server shutdown so all connected sessions will be closed properly and corresponding ephemeral nodes will be removed from state.
| https://github.com/ClickHouse/ClickHouse/issues/41076 | https://github.com/ClickHouse/ClickHouse/pull/41215 | 7e3fb0a681618676475f5721f6a0f06ec33fc77b | 36f46891ddada9fded30156dce733e3cee03c5e6 | "2022-09-07T09:45:45Z" | c++ | "2022-09-13T17:09:34Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,043 | ["docs/zh/whats-new/changelog/2017.md", "docs/zh/whats-new/changelog/2018.md", "docs/zh/whats-new/changelog/2019.md", "docs/zh/whats-new/changelog/2020.md"] | The changelog in Chinese has unreasonable and outdated mistranslations | (you don't have to strictly follow this form)
**Describe the issue**
A clear and concise description of what's wrong in documentation.
- The changelog in Chinese has unreasonable and outdated mistranslations. For example, `碌莽禄release拢.0755-88888888` is actually a malicious advertising call, which will mislead people viewing the document. Refer to https://clickhouse.com/docs/zh/changelog/ and https://clickhouse.com/docs/en/whats-new/changelog/ .
- The documentation has some unreasonable translation behavior. For example, there are machine translations of `阿利沙平`, `阿列克谢-米洛维多夫`, but there are English names like `Ilya Yatsishin`. As a habit, I think the English name of github should be used uniformly for people's names.
-

-

**Additional context**
Add any other context about the problem here.
- I will try to submit a documentation PR that adds the missing new version changelog.
| https://github.com/ClickHouse/ClickHouse/issues/41043 | https://github.com/ClickHouse/ClickHouse/pull/41174 | 6924a931c63a9f151318c55fab1d83308925e173 | 115de2c843c9f61af5ca0f1ba02d7d3769bef8e8 | "2022-09-06T12:16:11Z" | c++ | "2022-09-10T04:03:27Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,018 | ["src/Parsers/ParserSelectQuery.cpp", "src/Parsers/ParserTablesInSelectQuery.cpp", "src/Parsers/ParserTablesInSelectQuery.h", "tests/queries/0_stateless/02417_from_select_syntax.reference", "tests/queries/0_stateless/02417_from_select_syntax.sql"] | FROM table SELECT column | **Use case**
We're building a publicly available CH query interface (like Play UI but with enhanced capabilities like exploring the data and other goodies).
Essentially, it will contain TBs of publicly available blockchain analytics data served over browser and powered by CH.
Thousands of users are expected to use the UI and send arbitrary SQL statements to our CH cluster.
For the best experience, we want to provide fast, intuitive and seamless environment for the users.
As you can guess, the product is all about writing ad-hoc queries.
Considering the number of tables, it becomes really hard to use the mouse to explore the data and to type the table/column names with the keyboard.
This is why we have implemented autocomplete into our SQL editor.
One significant problem about the autocomplete is that the system cannot know beforehand the column names of the table unless the table name is provided.
**Describe the solution you'd like**
If somehow users provide the table name first then all the column names would be inferred and could be autocompleted, only if CH supports this:
```sql
FROM table
SELECT *
```
It is a simple yet powerfull way to increase the user experience. This project will also lead lots of users to get to know CH and show the world that there is a better DBMS.
| https://github.com/ClickHouse/ClickHouse/issues/41018 | https://github.com/ClickHouse/ClickHouse/pull/41095 | 9eeed564aa0b7521a39efcda9552ae46ff7971d1 | c2ceb783ea793df7a792a21a20a885dcc7905d84 | "2022-09-05T23:31:43Z" | c++ | "2022-12-02T19:17:44Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,017 | ["utils/self-extracting-executable/decompressor.cpp"] | Issue running client from MacOS Aarch64 (Apple Silicon) binary | Hi,
I'm running the ClickHouse binary, I downloaded it with the command
```bash
curl -O 'https://builds.clickhouse.com/master/macos-aarch64/clickhouse' && chmod a+x ./clickhouse
```
But when I run `./clickhouse client` I got the following error:
```
$ ./clickhouse client
open maps: No such file or directory
Unable to obtain inode.
```
Any ideas of how to solve the issue? | https://github.com/ClickHouse/ClickHouse/issues/41017 | https://github.com/ClickHouse/ClickHouse/pull/41006 | b7bdd38e410826953353e6cfa1687d91215a9bd3 | 6339b106beb18fb57739a841d9ad9a258c529258 | "2022-09-05T22:30:10Z" | c++ | "2022-09-06T01:45:53Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,004 | ["base/base/StringRef.h", "src/Columns/ColumnNullable.cpp", "src/Columns/ColumnNullable.h", "src/Columns/ColumnUnique.h", "src/Columns/IColumnUnique.h", "src/Functions/array/arrayIndex.h", "src/Processors/Formats/Impl/RawBLOBRowOutputFormat.cpp", "tests/queries/0_stateless/02419_contingency_array_nullable.reference", "tests/queries/0_stateless/02419_contingency_array_nullable.sql"] | Buffer overflow in `AggregateFunctionCrossTab` | https://s3.amazonaws.com/clickhouse-test-reports/0/e12858dca51e4587b01547cc132e527502f136c1/stateless_tests__asan__[1/2].html
```
==641==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c002494a40 at pc 0x000039cd0635 bp 0x7f4d78fa9f00 sp 0x7f4d78fa9ef8
READ of size 8 at 0x60c002494a40 thread T1818 (QueryPipelineEx)
#0 0x39cd0634 in CityHash_v1_0_2::UNALIGNED_LOAD64(char const*) build_docker/../contrib/cityhash102/src/city.cc:79:3
#1 0x39cd0634 in CityHash_v1_0_2::Fetch64(char const*) build_docker/../contrib/cityhash102/src/city.cc:90:10
#2 0x39cd0634 in CityHash_v1_0_2::CityHash64(char const*, unsigned long) build_docker/../contrib/cityhash102/src/city.cc:231:31
#3 0x1409673e in DB::UniqVariadicHash<false, false>::apply(unsigned long, DB::IColumn const**, unsigned long) build_docker/../src/AggregateFunctions/UniqVariadicHash.h:50:20
#4 0x1409673e in DB::AggregateFunctionCrossTab<DB::(anonymous namespace)::ContingencyData>::add(char*, DB::IColumn const**, unsigned long, DB::Arena*) const build_docker/../src/AggregateFunctions/CrossTab.h:147:24
#5 0x14097443 in DB::IAggregateFunctionHelper<DB::AggregateFunctionCrossTab<DB::(anonymous namespace)::ContingencyData> >::addBatchSinglePlace(unsigned long, unsigned long, char*, DB::IColumn const**, DB::Arena*, long) const build_docker/../src/AggregateFunctions/IAggregateFunction.h:476:53
#6 0x2df09764 in void DB::Aggregator::executeWithoutKeyImpl<false>(char*&, unsigned long, unsigned long, DB::Aggregator::AggregateFunctionInstruction*, DB::Arena*) const build_docker/../src/Interpreters/Aggregator.cpp
#7 0x2ddc51cf in DB::Aggregator::executeOnBlock(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >, unsigned long, unsigned long, DB::AggregatedDataVariants&, std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> >&, std::__1::vector<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> >, std::__1::allocator<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> > > >&, bool&) const build_docker/../src/Interpreters/Aggregator.cpp:1442:13
#8 0x32e1a4be in DB::AggregatingTransform::consume(DB::Chunk) build_docker/../src/Processors/Transforms/AggregatingTransform.cpp:531:33
#9 0x32e15a9c in DB::AggregatingTransform::work() build_docker/../src/Processors/Transforms/AggregatingTransform.cpp:490:9
#10 0x328dca6d in DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:47:26
#11 0x328dca6d in DB::ExecutionThreadContext::executeTask() build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92:9
#12 0x328bb842 in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:228:26
#13 0x328bf43c in DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:194:5
#14 0x328bf43c in DB::PipelineExecutor::spawnThreads()::$_0::operator()() const build_docker/../src/Processors/Executors/PipelineExecutor.cpp:315:17
#15 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&) build_docker/../contrib/libcxx/include/type_traits:3648:23
#16 0x328bf43c in decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1
#17 0x328bf43c in decltype(auto) std::__1::apply<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&) build_docker/../contrib/libcxx/include/tuple:1604:1
#18 0x328bf43c in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:193:13
#19 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#20 0x328bf43c in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9
#21 0x328bf43c in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12
#22 0x328bf43c in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16
#23 0xdce412b in std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
#24 0xdce412b in std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
#25 0xdce412b in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17
#26 0xdcee281 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73
#27 0xdcee281 in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#28 0xdcee281 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:282:5
#29 0xdcee281 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) build_docker/../contrib/libcxx/include/thread:293:5
#30 0x7f5205c9e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
#31 0x7f5205bc3132 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f132) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
0x60c002494a40 is located 0 bytes to the right of 128-byte region [0x60c0024949c0,0x60c002494a40)
allocated by thread T1818 (QueryPipelineEx) here:
#0 0xda93b3e in malloc (/usr/bin/clickhouse+0xda93b3e) (BuildId: 1b4e3e8d26f64d77d9c64e1765ce544156fd08d0)
#1 0xdbf1036 in Allocator<false, false>::allocNoTrack(unsigned long, unsigned long) build_docker/../src/Common/Allocator.h:227:27
#2 0xdc9652e in Allocator<false, false>::alloc(unsigned long, unsigned long) build_docker/../src/Common/Allocator.h:96:16
#3 0xdc9652e in void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::alloc<>(unsigned long) build_docker/../src/Common/PODArray.h:128:65
#4 0x30971926 in void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::realloc<>(unsigned long) build_docker/../src/Common/PODArray.h:153:13
#5 0x30971926 in void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::reserve<>(unsigned long) build_docker/../src/Common/PODArray.h:234:13
#6 0x30971926 in void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::resize<>(unsigned long) build_docker/../src/Common/PODArray.h:247:9
#7 0x30971926 in DB::ColumnFixedString::insertRangeFrom(DB::IColumn const&, unsigned long, unsigned long) build_docker/../src/Columns/ColumnFixedString.cpp:202:11
#8 0x30728021 in DB::ColumnArray::insertFrom(DB::IColumn const&, unsigned long) build_docker/../src/Columns/ColumnArray.cpp:313:15
#9 0x30728021 in DB::ColumnArray::replicateGeneric(DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const&) const build_docker/../src/Columns/ColumnArray.cpp:1137:26
#10 0x307228a4 in DB::ColumnArray::replicate(DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const&) const build_docker/../src/Columns/ColumnArray.cpp:946:12
#11 0x307255b8 in DB::ColumnArray::replicateNullable(DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const&) const build_docker/../src/Columns/ColumnArray.cpp:1152:14
#12 0x30722893 in DB::ColumnArray::replicate(DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const&) const build_docker/../src/Columns/ColumnArray.cpp:944:65
#13 0x307c4a53 in DB::ColumnConst::convertToFullColumn() const build_docker/../src/Columns/ColumnConst.cpp:48:18
#14 0x307c9d6d in DB::ColumnConst::convertToFullColumnIfConst() const build_docker/../src/Columns/ColumnConst.h:39:16
#15 0x2ddc172a in DB::Aggregator::prepareAggregateInstructions(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >, std::__1::vector<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> >, std::__1::allocator<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> > > >&, std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >&, std::__1::vector<DB::Aggregator::AggregateFunctionInstruction, std::__1::allocator<DB::Aggregator::AggregateFunctionInstruction> >&, std::__1::vector<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> >, std::__1::allocator<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> > > >&) const build_docker/../src/Interpreters/Aggregator.cpp:1314:61
#16 0x2ddc4e4b in DB::Aggregator::executeOnBlock(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >, unsigned long, unsigned long, DB::AggregatedDataVariants&, std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> >&, std::__1::vector<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> >, std::__1::allocator<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> > > >&, bool&) const build_docker/../src/Interpreters/Aggregator.cpp:1419:5
#17 0x32e1a4be in DB::AggregatingTransform::consume(DB::Chunk) build_docker/../src/Processors/Transforms/AggregatingTransform.cpp:531:33
#18 0x32e15a9c in DB::AggregatingTransform::work() build_docker/../src/Processors/Transforms/AggregatingTransform.cpp:490:9
#19 0x328dca6d in DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:47:26
#20 0x328dca6d in DB::ExecutionThreadContext::executeTask() build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92:9
#21 0x328bb842 in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:228:26
#22 0x328bf43c in DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:194:5
#23 0x328bf43c in DB::PipelineExecutor::spawnThreads()::$_0::operator()() const build_docker/../src/Processors/Executors/PipelineExecutor.cpp:315:17
#24 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&) build_docker/../contrib/libcxx/include/type_traits:3648:23
#25 0x328bf43c in decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1
#26 0x328bf43c in decltype(auto) std::__1::apply<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&) build_docker/../contrib/libcxx/include/tuple:1604:1
#27 0x328bf43c in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:193:13
#28 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#29 0x328bf43c in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9
#30 0x328bf43c in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12
#31 0x328bf43c in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16
#32 0xdce412b in std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
#33 0xdce412b in std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
#34 0xdce412b in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17
#35 0xdcee281 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73
#36 0xdcee281 in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#37 0xdcee281 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:282:5
#38 0xdcee281 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) build_docker/../contrib/libcxx/include/thread:293:5
#39 0x7f5205c9e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
Thread T1818 (QueryPipelineEx) created by T705 (QueryPipelineEx) here:
#0 0xda7d04c in pthread_create (/usr/bin/clickhouse+0xda7d04c) (BuildId: 1b4e3e8d26f64d77d9c64e1765ce544156fd08d0)
#1 0xdced0d4 in std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) build_docker/../contrib/libcxx/include/__threading_support:375:10
#2 0xdced0d4 in std::__1::thread::thread<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'(), void>(void&&) build_docker/../contrib/libcxx/include/thread:309:16
#3 0xdce09cc in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool) build_docker/../src/Common/ThreadPool.cpp:144:35
#4 0xdce2627 in ThreadPoolImpl<std::__1::thread>::scheduleOrThrow(std::__1::function<void ()>, int, unsigned long, bool) build_docker/../src/Common/ThreadPool.cpp:180:5
#5 0x328bec7c in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../src/Common/ThreadPool.h:176:38
#6 0x328bec7c in ThreadFromGlobalPoolImpl<true>* std::__1::construct_at<ThreadFromGlobalPoolImpl<true>, DB::PipelineExecutor::spawnThreads()::$_0, ThreadFromGlobalPoolImpl<true>*>(ThreadFromGlobalPoolImpl<true>*, DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
#7 0x328bec7c in void std::__1::allocator_traits<std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::construct<ThreadFromGlobalPoolImpl<true>, DB::PipelineExecutor::spawnThreads()::$_0, void, void>(std::__1::allocator<ThreadFromGlobalPoolImpl<true> >&, ThreadFromGlobalPoolImpl<true>*, DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
#8 0x328bd791 in void std::__1::vector<ThreadFromGlobalPoolImpl<true>, std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::__construct_one_at_end<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/vector:778:5
#9 0x328bd791 in ThreadFromGlobalPoolImpl<true>& std::__1::vector<ThreadFromGlobalPoolImpl<true>, std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::emplace_back<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/vector:1577:9
#10 0x328bd791 in DB::PipelineExecutor::spawnThreads() build_docker/../src/Processors/Executors/PipelineExecutor.cpp:304:17
#11 0x328bbe6d in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:259:13
#12 0x328bf43c in DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:194:5
#13 0x328bf43c in DB::PipelineExecutor::spawnThreads()::$_0::operator()() const build_docker/../src/Processors/Executors/PipelineExecutor.cpp:315:17
#14 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&) build_docker/../contrib/libcxx/include/type_traits:3648:23
#15 0x328bf43c in decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1
#16 0x328bf43c in decltype(auto) std::__1::apply<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&) build_docker/../contrib/libcxx/include/tuple:1604:1
#17 0x328bf43c in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:193:13
#18 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#19 0x328bf43c in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9
#20 0x328bf43c in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12
#21 0x328bf43c in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16
#22 0xdce412b in std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
#23 0xdce412b in std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
#24 0xdce412b in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17
#25 0xdcee281 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73
#26 0xdcee281 in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#27 0xdcee281 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:282:5
#28 0xdcee281 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) build_docker/../contrib/libcxx/include/thread:293:5
#29 0x7f5205c9e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
Thread T705 (QueryPipelineEx) created by T270 (QueryPipelineEx) here:
#0 0xda7d04c in pthread_create (/usr/bin/clickhouse+0xda7d04c) (BuildId: 1b4e3e8d26f64d77d9c64e1765ce544156fd08d0)
#1 0xdced0d4 in std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) build_docker/../contrib/libcxx/include/__threading_support:375:10
#2 0xdced0d4 in std::__1::thread::thread<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'(), void>(void&&) build_docker/../contrib/libcxx/include/thread:309:16
#3 0xdce09cc in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool) build_docker/../src/Common/ThreadPool.cpp:144:35
#4 0xdce2627 in ThreadPoolImpl<std::__1::thread>::scheduleOrThrow(std::__1::function<void ()>, int, unsigned long, bool) build_docker/../src/Common/ThreadPool.cpp:180:5
#5 0x328bec7c in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../src/Common/ThreadPool.h:176:38
#6 0x328bec7c in ThreadFromGlobalPoolImpl<true>* std::__1::construct_at<ThreadFromGlobalPoolImpl<true>, DB::PipelineExecutor::spawnThreads()::$_0, ThreadFromGlobalPoolImpl<true>*>(ThreadFromGlobalPoolImpl<true>*, DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
#7 0x328bec7c in void std::__1::allocator_traits<std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::construct<ThreadFromGlobalPoolImpl<true>, DB::PipelineExecutor::spawnThreads()::$_0, void, void>(std::__1::allocator<ThreadFromGlobalPoolImpl<true> >&, ThreadFromGlobalPoolImpl<true>*, DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
#8 0x328bd791 in void std::__1::vector<ThreadFromGlobalPoolImpl<true>, std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::__construct_one_at_end<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/vector:778:5
#9 0x328bd791 in ThreadFromGlobalPoolImpl<true>& std::__1::vector<ThreadFromGlobalPoolImpl<true>, std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::emplace_back<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/vector:1577:9
#10 0x328bd791 in DB::PipelineExecutor::spawnThreads() build_docker/../src/Processors/Executors/PipelineExecutor.cpp:304:17
#11 0x328bbe6d in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:259:13
#12 0x328bf43c in DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:194:5
#13 0x328bf43c in DB::PipelineExecutor::spawnThreads()::$_0::operator()() const build_docker/../src/Processors/Executors/PipelineExecutor.cpp:315:17
#14 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&) build_docker/../contrib/libcxx/include/type_traits:3648:23
#15 0x328bf43c in decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1
#16 0x328bf43c in decltype(auto) std::__1::apply<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&) build_docker/../contrib/libcxx/include/tuple:1604:1
#17 0x328bf43c in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:193:13
#18 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#19 0x328bf43c in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9
#20 0x328bf43c in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12
#21 0x328bf43c in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16
#22 0xdce412b in std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
#23 0xdce412b in std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
#24 0xdce412b in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17
#25 0xdcee281 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73
#26 0xdcee281 in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#27 0xdcee281 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:282:5
#28 0xdcee281 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) build_docker/../contrib/libcxx/include/thread:293:5
#29 0x7f5205c9e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
Thread T270 (QueryPipelineEx) created by T266 (ThreadPool) here:
#0 0xda7d04c in pthread_create (/usr/bin/clickhouse+0xda7d04c) (BuildId: 1b4e3e8d26f64d77d9c64e1765ce544156fd08d0)
#1 0xdced0d4 in std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) build_docker/../contrib/libcxx/include/__threading_support:375:10
#2 0xdced0d4 in std::__1::thread::thread<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'(), void>(void&&) build_docker/../contrib/libcxx/include/thread:309:16
#3 0xdce09cc in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool) build_docker/../src/Common/ThreadPool.cpp:144:35
#4 0xdcf376a in ThreadPoolImpl<std::__1::thread>::scheduleOrThrow(std::__1::function<void ()>, int, unsigned long, bool) build_docker/../src/Common/ThreadPool.cpp:180:5
#5 0xdcf376a in ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false> >::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/../src/Common/ThreadPool.h:176:38
#6 0xdce6820 in void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false> >::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool) build_docker/../src/Common/ThreadPool.cpp:144:35
#7 0xdce5f7b in ThreadPoolImpl<ThreadFromGlobalPoolImpl<false> >::scheduleOrThrowOnError(std::__1::function<void ()>, int) build_docker/../src/Common/ThreadPool.cpp:168:5
#8 0x32b9e139 in DB::ParallelFormattingOutputFormat::scheduleFormatterThreadForUnitWithNumber(unsigned long, unsigned long) build_docker/../src/Processors/Formats/Impl/ParallelFormattingOutputFormat.h:251:14
#9 0x32b9a94d in DB::ParallelFormattingOutputFormat::addChunk(DB::Chunk, DB::ParallelFormattingOutputFormat::ProcessingUnitType, bool) build_docker/../src/Processors/Formats/Impl/ParallelFormattingOutputFormat.cpp:66:9
#10 0x32b99c5c in DB::ParallelFormattingOutputFormat::finalizeImpl() build_docker/../src/Processors/Formats/Impl/ParallelFormattingOutputFormat.cpp:13:9
#11 0x328fcae7 in DB::IOutputFormat::finalize() build_docker/../src/Processors/Formats/IOutputFormat.cpp:126:5
#12 0x328fcae7 in DB::IOutputFormat::work() build_docker/../src/Processors/Formats/IOutputFormat.cpp:75:9
#13 0x328dca6d in DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:47:26
#14 0x328dca6d in DB::ExecutionThreadContext::executeTask() build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92:9
#15 0x328bb842 in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:228:26
#16 0x328bf43c in DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:194:5
#17 0x328bf43c in DB::PipelineExecutor::spawnThreads()::$_0::operator()() const build_docker/../src/Processors/Executors/PipelineExecutor.cpp:315:17
#18 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&) build_docker/../contrib/libcxx/include/type_traits:3648:23
#19 0x328bf43c in decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/tuple:1595:1
#20 0x328bf43c in decltype(auto) std::__1::apply<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&) build_docker/../contrib/libcxx/include/tuple:1604:1
#21 0x328bf43c in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:193:13
#22 0x328bf43c in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#23 0x328bf43c in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&) build_docker/../contrib/libcxx/include/__functional/invoke.h:61:9
#24 0x328bf43c in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()() build_docker/../contrib/libcxx/include/__functional/function.h:230:12
#25 0x328bf43c in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) build_docker/../contrib/libcxx/include/__functional/function.h:711:16
#26 0xdce412b in std::__1::__function::__policy_func<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
#27 0xdce412b in std::__1::function<void ()>::operator()() const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
#28 0xdce412b in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17
#29 0xdcee281 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73
#30 0xdcee281 in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
#31 0xdcee281 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/libcxx/include/thread:282:5
#32 0xdcee281 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) build_docker/../contrib/libcxx/include/thread:293:5
#33 0x7f5205c9e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
Thread T266 (ThreadPool) created by T3 (HTTPHandler) here:
#0 0xda7d04c in pthread_create (/usr/bin/clickhouse+0xda7d04c) (BuildId: 1b4e3e8d26f64d77d9c64e1765ce544156fd08d0)
#1 0xdced0d4 in std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) build_docker/../contrib/libcxx/include/__threading_support:375:10
#2 0xdced0d4 in std::__1::thread::thread<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'(), void>(void&&) build_docker/../contrib/libcxx/include/thread:309:16
#3 0xdce09cc in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool) build_docker/../src/Common/ThreadPool.cpp:144:35
#4 0xdce2627 in ThreadPoolImpl<std::__1::thread>::scheduleOrThrow(std::__1::function<void ()>, int, unsigned long, bool) build_docker/../src/Common/ThreadPool.cpp:180:5
#5 0x328bec7c in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../src/Common/ThreadPool.h:176:38
#6 0x328bec7c in ThreadFromGlobalPoolImpl<true>* std::__1::construct_at<ThreadFromGlobalPoolImpl<true>, DB::PipelineExecutor::spawnThreads()::$_0, ThreadFromGlobalPoolImpl<true>*>(ThreadFromGlobalPoolImpl<true>*, DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/__memory/construct_at.h:38:50
#7 0x328bec7c in void std::__1::allocator_traits<std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::construct<ThreadFromGlobalPoolImpl<true>, DB::PipelineExecutor::spawnThreads()::$_0, void, void>(std::__1::allocator<ThreadFromGlobalPoolImpl<true> >&, ThreadFromGlobalPoolImpl<true>*, DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:298:9
#8 0x328bd791 in void std::__1::vector<ThreadFromGlobalPoolImpl<true>, std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::__construct_one_at_end<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/vector:778:5
#9 0x328bd791 in ThreadFromGlobalPoolImpl<true>& std::__1::vector<ThreadFromGlobalPoolImpl<true>, std::__1::allocator<ThreadFromGlobalPoolImpl<true> > >::emplace_back<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_docker/../contrib/libcxx/include/vector:1577:9
#10 0x328bd791 in DB::PipelineExecutor::spawnThreads() build_docker/../src/Processors/Executors/PipelineExecutor.cpp:304:17
#11 0x328ba0a1 in DB::PipelineExecutor::executeImpl(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:360:9
#12 0x328b9d13 in DB::PipelineExecutor::execute(unsigned long) build_docker/../src/Processors/Executors/PipelineExecutor.cpp:89:9
#13 0x328b735f in DB::CompletedPipelineExecutor::execute() build_docker/../src/Processors/Executors/CompletedPipelineExecutor.cpp:100:18
#14 0x3053f539 in DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::__1::shared_ptr<DB::Context>, std::__1::function<void (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>, std::__1::optional<DB::FormatSettings> const&) build_docker/../src/Interpreters/executeQuery.cpp:1232:22
#15 0x326e102c in DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::__1::optional<DB::CurrentThread::QueryScope>&) build_docker/../src/Server/HTTPHandler.cpp:818:5
#16 0x326ef04d in DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) build_docker/../src/Server/HTTPHandler.cpp:990:9
#17 0x3280592f in DB::HTTPServerConnection::run() build_docker/../src/Server/HTTP/HTTPServerConnection.cpp:65:34
#18 0x3996864e in Poco::Net::TCPServerConnection::start() build_docker/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3
#19 0x39969412 in Poco::Net::TCPServerDispatcher::run() build_docker/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115:20
#20 0x39e492bb in Poco::PooledThread::run() build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14
#21 0x39e428d9 in Poco::ThreadImpl::runnableEntry(void*) build_docker/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27
#22 0x7f5205c9e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
Thread T3 (HTTPHandler) created by T0 here:
#0 0xda7d04c in pthread_create (/usr/bin/clickhouse+0xda7d04c) (BuildId: 1b4e3e8d26f64d77d9c64e1765ce544156fd08d0)
#1 0x39e41b45 in Poco::ThreadImpl::startImpl(Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable> >) build_docker/../contrib/poco/Foundation/src/Thread_POSIX.cpp:202:6
#2 0x39e44cfd in Poco::Thread::start(Poco::Runnable&) build_docker/../contrib/poco/Foundation/src/Thread.cpp:128:2
#3 0x39e49cc9 in Poco::PooledThread::start() build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:85:10
#4 0x39e49cc9 in Poco::ThreadPool::ThreadPool(int, int, int, int) build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:252:12
#5 0xdaeaf25 in DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) build_docker/../programs/server/Server.cpp:733:22
#6 0x399a1e47 in Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8
#7 0xdadec7e in DB::Server::run() build_docker/../programs/server/Server.cpp:466:25
#8 0x399e66a7 in Poco::Util::ServerApplication::run(int, char**) build_docker/../contrib/poco/Util/src/ServerApplication.cpp:611:9
#9 0xdad7aed in mainEntryClickHouseServer(int, char**) build_docker/../programs/server/Server.cpp:181:20
#10 0xdad257f in main build_docker/../programs/main.cpp:449:12
#11 0x7f5205ac8082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
SUMMARY: AddressSanitizer: heap-buffer-overflow build_docker/../contrib/cityhash102/src/city.cc:79:3 in CityHash_v1_0_2::UNALIGNED_LOAD64(char const*)
```
| https://github.com/ClickHouse/ClickHouse/issues/41004 | https://github.com/ClickHouse/ClickHouse/pull/40195 | 49e0b1316df5e7ddff014af19b67bcb21f01f2d0 | 2aedd410233e8590df7c0ec46e941fbcdb13972c | "2022-09-05T15:01:39Z" | c++ | "2022-09-12T14:29:23Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 41,001 | ["src/Interpreters/ProcessList.cpp", "src/Interpreters/ProcessList.h", "tests/queries/0_stateless/02450_kill_distributed_query_deadlock.reference", "tests/queries/0_stateless/02450_kill_distributed_query_deadlock.sh"] | Lock order inversion in OvercommitTracker | https://s3.amazonaws.com/clickhouse-test-reports/0/8ea7b9c9784f7014dccb4fe0dfd269265126a30d/stress_test__msan_.html
Post-processed traces: https://pastila.nl/?0006a09d/4a3864799d8b23c3998deeefcdca5d8f
Post-processed traces without boring threads: https://pastila.nl/?0006a09d/f342d95a823d513df62d68a5d8a1a50b
Explanation: https://pastila.nl/?000fcc82/3a48f372d3410a8691d50cb5647b2c20 | https://github.com/ClickHouse/ClickHouse/issues/41001 | https://github.com/ClickHouse/ClickHouse/pull/41467 | 8d88b68a85c0a9d94823a75ef91ef9f7c959015c | c8f2820bf1f107b7d874bd98753e69074c7063c8 | "2022-09-05T13:34:12Z" | c++ | "2022-09-20T10:59:55Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 40,913 | ["programs/server/config.xml", "src/Access/AccessControl.cpp", "src/Access/AccessControl.h", "src/Interpreters/Access/InterpreterCreateUserQuery.cpp", "tests/queries/0_stateless/02422_allow_implicit_no_password.config.xml", "tests/queries/0_stateless/02422_allow_implicit_no_password.reference", "tests/queries/0_stateless/02422_allow_implicit_no_password.sh"] | An option to prevent creating a user identified with no password when the section IDENTIFIED WITH is omitted. | **Describe the solution you'd like**
An option to make the `IDENTIFIED WITH` section mandatory.
| https://github.com/ClickHouse/ClickHouse/issues/40913 | https://github.com/ClickHouse/ClickHouse/pull/41341 | 63e757a659ad9040968620242a0c7fcf6adb89a0 | a7f3c7086c66c972aa72988c2fb63da9bd1b6c75 | "2022-09-01T23:17:20Z" | c++ | "2022-09-22T13:19:43Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 40,846 | ["src/Processors/Transforms/AggregatingTransform.cpp", "tests/queries/0_stateless/02418_do_not_return_empty_blocks_from_ConvertingAggregatedToChunksTransform.reference", "tests/queries/0_stateless/02418_do_not_return_empty_blocks_from_ConvertingAggregatedToChunksTransform.sh"] | multiple empty blocks in the result | ```sql
cat s1.sql
drop table if exists temp2;
CREATE TABLE temp2
(
`u` Date,
`c` String,
`p` UInt32
)
ENGINE = Log as
select * from (
select '2022-08-01' u ,'A',202208 from numbers(300000)
union all select '2022-08-02','A',202208 from numbers(300000)
union all select '2022-08-03','A',202208 from numbers(300000)
union all select '2022-08-04','A',202208 from numbers(300000)
union all select '2022-08-05','A',202208 from numbers(300000)
union all select '2022-08-06','A',202208 from numbers(300000)
union all select '2022-08-07','A',202208 from numbers(300000)
union all select '2022-08-08','A',202208 from numbers(300000)
union all select '2022-08-09','A',202208 from numbers(300000)
union all select '2022-08-10','A',202208 from numbers(300000)
union all select '2022-08-11','A',202208 from numbers(300000)
union all select '2022-08-12','A',202208 from numbers(300000)
union all select '2022-08-13','A',202208 from numbers(300000)
union all select '2022-08-14','A',202208 from numbers(300000)
union all select '2022-08-15','A',202208 from numbers(300000)
union all select '2022-08-16','A',202208 from numbers(300000)
union all select '2022-08-17','A',202208 from numbers(300000)
union all select '2022-08-18','A',202208 from numbers(300000)
union all select '2022-08-19','A',202208 from numbers(300000)
union all select '2022-08-20','A',202208 from numbers(300000)
union all select '2022-08-21','A',202208 from numbers(300000)
union all select '2022-08-22','A',202208 from numbers(300000)
union all select '2022-08-23','A',202208 from numbers(300000)
union all select '2022-08-24','A',202208 from numbers(300000)
union all select '2022-08-25','A',202208 from numbers(300000)
union all select '2022-08-26','A',202208 from numbers(300000)
union all select '2022-08-27','A',202208 from numbers(300000)
union all select '2022-08-28','A',202208 from numbers(300000)
union all select '2022-08-29','A',202208 from numbers(300000)
union all select '2022-08-30','A',202208 from numbers(67584)
union all select '2022-08-31','A',202208 from numbers(408)
) order by rand();
------------------------------------------------------------
cat s2.sql
WITH tenants AS
(
SELECT p
FROM temp2 AS s
LEFT JOIN
(
SELECT 'A' AS c
FROM temp2 AS t
WHERE u >= today()
LIMIT 1
) AS min_date ON min_date.c = s.c
GROUP BY s.p
)
SELECT *
FROM tenants
WHERE 0
UNION ALL
SELECT p
FROM tenants
GROUP BY p
SETTINGS max_threads = 10
format PrettyCompact
```
```
# expected result
clickhouse-client -mn <s1.sql; curl 'http://localhost:8123/?max_bytes_before_external_group_by=0' --data-binary @s2.sql
┌──────p─┐
│ 202208 │
└────────┘
# not expected result
clickhouse-client -mn <s1.sql; curl 'http://localhost:8123/?max_bytes_before_external_group_by=700000000' --data-binary @s2.sql
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌──────p─┐
│ 202208 │
└────────┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
┌─p─┐
└───┘
``` | https://github.com/ClickHouse/ClickHouse/issues/40846 | https://github.com/ClickHouse/ClickHouse/pull/41152 | 6e77751581121a41949882bfc7907594905b3d87 | 6f186d3dd2e67f32ba300272c0b4e15e6333c63e | "2022-08-31T12:20:36Z" | c++ | "2022-09-16T19:54:36Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 40,706 | ["src/Storages/StorageView.cpp", "tests/queries/0_stateless/02402_merge_engine_with_view.reference", "tests/queries/0_stateless/02402_merge_engine_with_view.sql"] | Logical error: invalid table expression | **How to reproduce**
clickhouse-local:
```
CREATE TABLE f (`s` String) ENGINE = File(TSV, '/dev/null');
CREATE VIEW v AS SELECT * FROM f;
SELECT '', NULL FROM merge('', '\0');
```
| https://github.com/ClickHouse/ClickHouse/issues/40706 | https://github.com/ClickHouse/ClickHouse/pull/40734 | b3fc6eafe7098050d3b5a9046e3734b721be8c2b | 018f4118bb11b199f1c5f632034f789b60e1bd16 | "2022-08-27T14:07:28Z" | c++ | "2022-09-01T10:20:00Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 40,637 | ["src/Interpreters/DatabaseCatalog.cpp", "src/Storages/StorageBuffer.cpp", "src/Storages/StorageBuffer.h", "tests/queries/0_stateless/02391_recursive_buffer.reference", "tests/queries/0_stateless/02391_recursive_buffer.sql"] | SegFault with "recursive" buffer table | ClickHouse crushed on request to system.tables if has an incorrect "self-flushing" buffer table.
```
xxxx :) CREATE TABLE test (key UInt32) Engine=Buffer(default, test, 16, 10, 100, 10000, 1000000, 10000000, 100000000);
CREATE TABLE test
(
`key` UInt32
)
ENGINE = Buffer(default, test, 16, 10, 100, 10000, 1000000, 10000000, 100000000)
Query id: a90ea965-ac7c-420f-a947-f900b6b0d014
Ok.
0 rows in set. Elapsed: 0.005 sec.
xxxx :) select * from system.tables
SELECT *
FROM system.tables
Query id: bbb7d7eb-b782-4527-9803-ddc4f8703d5c
[xxxx] 2022.08.25 21:44:05.507879 [ 841325 ] <Fatal> BaseDaemon: ########################################
[xxxx] 2022.08.25 21:44:05.508036 [ 841325 ] <Fatal> BaseDaemon: (version 22.8.2.11 (official build), build id: F509FE73D83F8136) (from thread 841253) (query_id: bbb7d7eb-b782-4527-9803-ddc4f8703d5c) (query: select * from system.tables) Received signal Segmentation fault (11)
[xxxx] 2022.08.25 21:44:05.508105 [ 841325 ] <Fatal> BaseDaemon: Address: 0x7f06c12f7ff8 Access: write. Attempted access has violated the permissions assigned to the memory area.
[xxxx] 2022.08.25 21:44:05.508141 [ 841325 ] <Fatal> BaseDaemon: Stack trace: 0xa480065
[xxxx] 2022.08.25 21:44:05.508200 [ 841325 ] <Fatal> BaseDaemon: 2. ? @ 0xa480065 in /usr/bin/clickhouse
[xxxx] 2022.08.25 21:44:05.697982 [ 841325 ] <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: 26BBB329434F6C45E2D0312BCEE49FC1)
↘ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.) Exception on client:
Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF)
Connecting to localhost:9000 as user default.
Code: 210. DB::NetException: Connection reset by peer, while writing to socket ([::1]:9000). (NETWORK_ERROR)
```
Found on version 22.3.9.19, reproduced also on 22.8.2.11
| https://github.com/ClickHouse/ClickHouse/issues/40637 | https://github.com/ClickHouse/ClickHouse/pull/40643 | abfddf17e29199be3345b61be782f099e1a09330 | 7569cbb38184c631772b3c130a7515f1e55b77b3 | "2022-08-25T18:54:15Z" | c++ | "2022-08-27T16:27:24Z" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.