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 | 20,880 | ["src/DataStreams/CheckConstraintsBlockOutputStream.cpp", "tests/queries/0_stateless/01720_constraints_complex_types.reference", "tests/queries/0_stateless/01720_constraints_complex_types.sql", "tests/queries/0_stateless/01721_constraints_constant_expressions.reference", "tests/queries/0_stateless/01721_constraints_constant_expressions.sql", "tests/queries/skip_list.json"] | Constraints do not work on Nullable types | Constraints on Nullable types don't seem to work and return errors like the following:
```
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Constraint `c0` does not return a value of type UInt8.
```
**Does it reproduce on recent release?**
This issue has been encountered on Clickhouse `20.10.2.20`. I did not test latest `master`.
```
$ clickhouse-server --version
ClickHouse server version 20.10.2.20 (official build).
```
EDIT: this is also reproducible with the latest stable release:
```
$ clickhouse-server --version
ClickHouse server version 21.2.4.6 (official build).
```
**How to reproduce**
All settings are defaults.
To reproduce the error, create the following table:
```
CREATE TABLE foo.bar
(
`id` UInt32,
`buggy` Nullable(UInt32),
CONSTRAINT `c0` CHECK `buggy` = 1
)
ENGINE = MergeTree()
PRIMARY KEY `id`
ORDER BY `id`
```
The table creation works fine. However, one gets an exception when trying to insert:
```
server :) INSERT INTO foo.bar VALUES (0, 1)
INSERT INTO foo.bar VALUES
Received exception from server (version 20.10.2):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Constraint `c0` does not return a value of type UInt8.
1 rows in set. Elapsed: 0.001 sec.
```
The exception is unexpected as the constraint is a valid boolean expression. Not that I tried many variants of the constraints and the only one referring the field `buggy` that worked as expected is:
```
CONSTRAINT `c0` CHECK isNull(`buggy`)
```
**Expected behavior**
No exception raised as the constraint is a valid boolean expression.
**Error message and/or stacktrace**
```
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Constraint `c0` does not return a value of type UInt8.
```
**Additional context**
The following issue may be related: #19334 | https://github.com/ClickHouse/ClickHouse/issues/20880 | https://github.com/ClickHouse/ClickHouse/pull/20990 | df728dc4ba5cae45958a1c5ee96d49049f1d6919 | 9996f681606d2017c5fe9a2e8344831906e874ae | "2021-02-18T14:31:05Z" | c++ | "2021-02-27T10:16:29Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,876 | ["src/Interpreters/InterpreterSelectWithUnionQuery.cpp", "src/Interpreters/NormalizeSelectWithUnionQueryVisitor.cpp", "src/Interpreters/NormalizeSelectWithUnionQueryVisitor.h", "src/Interpreters/executeQuery.cpp", "src/Interpreters/ya.make", "tests/queries/0_stateless/01732_explain_syntax_union_query.reference", "tests/queries/0_stateless/01732_explain_syntax_union_query.sql"] | EXPLAIN SYNTAX + UNION DISTINCT in subquery crash | How to reproduce:
```sql
EXPLAIN SYNTAX
SELECT x
FROM
(
SELECT 1 AS x
UNION DISTINCT
SELECT 1
)
Query id: e777bc02-5d1b-4d49-ba89-4ebe31172387
Exception on client:
Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000
```
| https://github.com/ClickHouse/ClickHouse/issues/20876 | https://github.com/ClickHouse/ClickHouse/pull/21246 | d9e22ba646d9946a4c3e3abee39a1842b552dfc3 | 8e6fa404c4b6eb618d84411814432e59fc1d9a72 | "2021-02-18T13:22:19Z" | c++ | "2021-03-02T18:37:07Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,872 | ["src/Processors/QueryPlan/FillingStep.cpp", "src/Processors/Transforms/FillingTransform.cpp", "src/Processors/Transforms/FillingTransform.h", "tests/queries/0_stateless/01921_with_fill_with_totals.reference", "tests/queries/0_stateless/01921_with_fill_with_totals.sql"] | WITH FILL FROM TO breaks WITH TOTALS result | ```
SELECT *
FROM xrollup
Query id: e702f6fe-8595-4a9f-aeff-ea65e2045801
โโmetricโโฌโโโโโโโโโโbโโฌโvโโ
โ 2 โ 2018-01-01 โ 1 โ
โ 2 โ 2018-02-02 โ 1 โ
โโโโโโโโโโดโโโโโโโโโโโโโดโโโโ
โโmetricโโฌโโโโโโโโโโbโโฌโvโโ
โ 1 โ 2018-01-01 โ 1 โ
โ 1 โ 2018-01-02 โ 1 โ
โ 1 โ 2018-02-01 โ 1 โ
โ 1 โ 2017-03-01 โ 1 โ
โโโโโโโโโโดโโโโโโโโโโโโโดโโโโ
6 rows in set. Elapsed: 0.004 sec.
```
`WITH TOTALS + WITH FILL:`
```
SELECT
b,
sum(v)
FROM xrollup
GROUP BY b
WITH TOTALS
ORDER BY b DESC WITH FILL
LIMIT 5
Query id: ae21086d-eb89-4b73-b9be-7baa4c0cee27
โโโโโโโโโโโbโโฌโsum(v)โโ
โ 2018-02-02 โ 1 โ
โ 2018-02-01 โ 1 โ
โ 2018-01-31 โ 0 โ
โ 2018-01-30 โ 0 โ
โ 2018-01-29 โ 0 โ
โโโโโโโโโโโโโโดโโโโโโโโโ
Totals:
โโโโโโโโโโโbโโฌโsum(v)โโ
โ 1970-01-01 โ 6 โ
โโโโโโโโโโโโโโดโโโโโโโโโ
5 rows in set. Elapsed: 0.003 sec.
```
`WITH TOTALS + WITH FILL FROM:`
```
SELECT
b,
sum(v)
FROM xrollup
GROUP BY b
WITH TOTALS
ORDER BY b DESC WITH FILL FROM today()
LIMIT 5
Query id: cbf3d659-cf10-4b3b-800f-a5af11fc9faa
โโโโโโโโโโโbโโฌโsum(v)โโ
โ 2021-02-18 โ 0 โ
โ 2021-02-17 โ 0 โ
โ 2021-02-16 โ 0 โ
โ 2021-02-15 โ 0 โ
โ 2021-02-14 โ 0 โ
โโโโโโโโโโโโโโดโโโโโโโโโ
Totals:
โโโโโโโโโโโbโโฌโsum(v)โโ
โ 2021-02-18 โ 0 โ
โโโโโโโโโโโโโโดโโโโโโโโโ
5 rows in set. Elapsed: 0.006 sec.
```
| https://github.com/ClickHouse/ClickHouse/issues/20872 | https://github.com/ClickHouse/ClickHouse/pull/25539 | c2458778f68b284863624a8d65439dfdf49960b1 | 93f15e443de2fd7e08c2ac88486f92b24ff71f4d | "2021-02-18T09:23:54Z" | c++ | "2021-06-23T10:42:27Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,870 | ["tests/queries/0_stateless/01911_logical_error_minus.reference", "tests/queries/0_stateless/01911_logical_error_minus.sql"] | Invalid Field get from type UInt64 to type Float64 in PREWHERE | ```
2021.02.17 19:45:50.277814 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Debug> executeQuery: (from [::1]:37834, using production parser) SELECT c1.key, c1.name, c1.ref_valueF64, c1.valueF64, c1.ref_valueF64 - c1.valueF64 AS dF64, '', c2.key, c2.ref_valueF64 FROM codecTest AS c1 , codecTest AS c2 WHERE (dF64 != 3) AND c1.valueF64 AND (c2.key = (c1.key - 1048576)) LIMIT 0
2021.02.17 19:45:50.284323 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Debug> InterpreterSelectQuery: MergeTreeWhereOptimizer: condition "valueF64" moved to PREWHERE
2021.02.17 19:45:50.289180 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Trace> ContextAccess (default): Access granted: SELECT(key, ref_valueF64) ON default.codecTest
2021.02.17 19:45:50.289984 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Debug> default.codecTest (f634a297-5fc3-4c13-a97d-6495514e9757) (SelectExecutor): Key condition: unknown
2021.02.17 19:45:50.290882 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Debug> default.codecTest (f634a297-5fc3-4c13-a97d-6495514e9757) (SelectExecutor): Selected 4/4 parts by partition key, 4 parts by primary key, 4/8 marks by primary key, 4 marks to read from 4 ranges
2021.02.17 19:45:50.292441 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Trace> default.codecTest (f634a297-5fc3-4c13-a97d-6495514e9757) (SelectExecutor): Reading approx. 400 rows with 4 streams
2021.02.17 19:45:50.293954 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2021.02.17 19:45:50.295128 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Debug> HashJoin: Right sample block: c2.key UInt64 UInt64(size = 0), c2.ref_valueF64 Float64 Float64(size = 0)
2021.02.17 19:45:50.311836 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Trace> ContextAccess (default): Access granted: SELECT(key, name, ref_valueF64, valueF64) ON default.codecTest
2021.02.17 19:45:50.315593 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Debug> default.codecTest (f634a297-5fc3-4c13-a97d-6495514e9757) (SelectExecutor): Key condition: unknown, unknown, unknown, and, and, unknown, and
2021.02.17 19:45:50.316567 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Debug> default.codecTest (f634a297-5fc3-4c13-a97d-6495514e9757) (SelectExecutor): Selected 4/4 parts by partition key, 4 parts by primary key, 4/8 marks by primary key, 4 marks to read from 4 ranges
2021.02.17 19:45:50.318355 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Trace> default.codecTest (f634a297-5fc3-4c13-a97d-6495514e9757) (SelectExecutor): Reading approx. 400 rows with 4 streams
2021.02.17 19:45:50.318965 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Fatal> : Logical error: 'Invalid Field get from type UInt64 to type Float64'.
2021.02.17 19:45:50.321070 [ 209 ] {} <Fatal> BaseDaemon: (version 21.3.1.6049, build id: 94227D53AE6C40F3747699BD7A10251D7C371B29) (from thread 91) (query_id: fe83f01c-2b89-4f48-aff9-3597a3a8de31) Received signal Aborted (6)
2021.02.17 19:45:50.318965 [ 91 ] {fe83f01c-2b89-4f48-aff9-3597a3a8de31} <Fatal> : Logical error: 'Invalid Field get from type UInt64 to type Float64'.
2021.02.17 19:45:50.320654 [ 209 ] {} <Fatal> BaseDaemon: ########################################
2021.02.17 19:45:50.321070 [ 209 ] {} <Fatal> BaseDaemon: (version 21.3.1.6049, build id: 94227D53AE6C40F3747699BD7A10251D7C371B29) (from thread 91) (query_id: fe83f01c-2b89-4f48-aff9-3597a3a8de31) Received signal Aborted (6)
2021.02.17 19:45:50.321334 [ 209 ] {} <Fatal> BaseDaemon:
2021.02.17 19:45:50.321725 [ 209 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f1ff24d918b 0x7f1ff24b8859 0x10e69a86 0x10e69b43 0x10ecc45c 0x10eccb9a 0x10ecbaad 0x11cc1795 0x1a660497 0x19997c1d 0x1ac630c8 0x1ac60f65 0x1ac60b0b 0x1ac9f296 0x1aba3554 0x1aba335e 0x1aba2fc1 0x1aba2b20 0x1aba27aa 0x1ab956a1 0x1ab8e8af 0x1ab87825 0x1ab7f545 0x1a7f71d3 0x1a008548 0x1a001099 0x1a000676 0x1a2dafaa 0x1a2db71d 0x1a4f53f0 0x1a4f390a 0x1ae57b02 0x1ae63f08 0x1e82769c 0x1e827ea0 0x1e965013 0x1e961e9d 0x1e960d28 0x7f1ff268e609 0x7f1ff25b5293
2021.02.17 19:45:50.322108 [ 209 ] {} <Fatal> BaseDaemon: 4. raise @ 0x4618b in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.02.17 19:45:50.322301 [ 209 ] {} <Fatal> BaseDaemon: 5. abort @ 0x25859 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.02.17 19:45:50.462701 [ 209 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:50: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x10e69a86 in /workspace/clickhouse
2021.02.17 19:45:50.590280 [ 209 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:57: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x10e69b43 in /workspace/clickhouse
2021.02.17 19:45:50.889532 [ 209 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Common/Exception.h:38: DB::Exception::Exception<char const*, char const*>(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*&&, char const*&&) @ 0x10ecc45c in /workspace/clickhouse
2021.02.17 19:45:51.172281 [ 209 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Core/Field.h:790: double& DB::Field::get<double>() @ 0x10eccb9a in /workspace/clickhouse
2021.02.17 19:45:51.470875 [ 209 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Core/Field.h:408: double const& DB::Field::get<double>() const @ 0x10ecbaad in /workspace/clickhouse
2021.02.17 19:45:52.889426 [ 209 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Core/Field.h:808: double DB::get<double>(DB::Field const&) @ 0x11cc1795 in /workspace/clickhouse
2021.02.17 19:45:53.226791 [ 209 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/Columns/ColumnVector.h:257: DB::ColumnVector<double>::insert(DB::Field const&) @ 0x1a660497 in /workspace/clickhouse
2021.02.17 19:45:53.355451 [ 209 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../src/DataTypes/IDataType.cpp:107: DB::IDataType::createColumnConst(unsigned long, DB::Field const&) const @ 0x19997c1d in /workspace/clickhouse
2021.02.17 19:45:53.908615 [ 209 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:352: DB::MergeTreeBaseSelectProcessor::executePrewhereActions(DB::Block&, std::__1::shared_ptr<DB::PrewhereInfo> const&) @ 0x1ac630c8 in /workspace/clickhouse
2021.02.17 19:45:54.456126 [ 209 ] {} <Fatal> BaseDaemon: 15. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:360: DB::MergeTreeBaseSelectProcessor::getHeader(DB::Block, std::__1::shared_ptr<DB::PrewhereInfo> 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&) @ 0x1ac60f65 in /workspace/clickhouse
2021.02.17 19:45:55.009136 [ 209 ] {} <Fatal> BaseDaemon: 16. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:33: DB::MergeTreeBaseSelectProcessor::MergeTreeBaseSelectProcessor(DB::Block, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::PrewhereInfo> const&, unsigned long, unsigned long, unsigned long, DB::MergeTreeReaderSettings const&, bool, 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&) @ 0x1ac60b0b in /workspace/clickhouse
2021.02.17 19:45:55.537688 [ 209 ] {} <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeThreadSelectBlockInputProcessor.cpp:25: DB::MergeTreeThreadSelectBlockInputProcessor::MergeTreeThreadSelectBlockInputProcessor(unsigned long, std::__1::shared_ptr<DB::MergeTreeReadPool> const&, unsigned long, unsigned long, unsigned long, unsigned long, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&) @ 0x1ac9f296 in /workspace/clickhouse
2021.02.17 19:45:56.576773 [ 209 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:887: void std::__1::allocator<DB::MergeTreeThreadSelectBlockInputProcessor>::construct<DB::MergeTreeThreadSelectBlockInputProcessor, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&>(DB::MergeTreeThreadSelectBlockInputProcessor*, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&) @ 0x1aba3554 in /workspace/clickhouse
2021.02.17 19:45:57.609837 [ 209 ] {} <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__memory/allocator_traits.h:521: void std::__1::allocator_traits<std::__1::allocator<DB::MergeTreeThreadSelectBlockInputProcessor> >::__construct<DB::MergeTreeThreadSelectBlockInputProcessor, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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::integral_constant<bool, true>, std::__1::allocator<DB::MergeTreeThreadSelectBlockInputProcessor>&, DB::MergeTreeThreadSelectBlockInputProcessor*, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&) @ 0x1aba335e in /workspace/clickhouse
2021.02.17 19:45:58.642571 [ 209 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__memory/allocator_traits.h:482: void std::__1::allocator_traits<std::__1::allocator<DB::MergeTreeThreadSelectBlockInputProcessor> >::construct<DB::MergeTreeThreadSelectBlockInputProcessor, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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::allocator<DB::MergeTreeThreadSelectBlockInputProcessor>&, DB::MergeTreeThreadSelectBlockInputProcessor*, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&) @ 0x1aba2fc1 in /workspace/clickhouse
2021.02.17 19:45:59.680681 [ 209 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2594: std::__1::__shared_ptr_emplace<DB::MergeTreeThreadSelectBlockInputProcessor, std::__1::allocator<DB::MergeTreeThreadSelectBlockInputProcessor> >::__shared_ptr_emplace<unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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::allocator<DB::MergeTreeThreadSelectBlockInputProcessor>, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&) @ 0x1aba2b20 in /workspace/clickhouse
2021.02.17 19:46:00.721150 [ 209 ] {} <Fatal> BaseDaemon: 22. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:3360: std::__1::shared_ptr<DB::MergeTreeThreadSelectBlockInputProcessor> std::__1::allocate_shared<DB::MergeTreeThreadSelectBlockInputProcessor, std::__1::allocator<DB::MergeTreeThreadSelectBlockInputProcessor>, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&, void>(std::__1::allocator<DB::MergeTreeThreadSelectBlockInputProcessor> const&, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&) @ 0x1aba27aa in /workspace/clickhouse
2021.02.17 19:46:01.720200 [ 209 ] {} <Fatal> BaseDaemon: 23. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:3369: std::__1::shared_ptr<DB::MergeTreeThreadSelectBlockInputProcessor> std::__1::make_shared<DB::MergeTreeThreadSelectBlockInputProcessor, unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&, void>(unsigned long&, std::__1::shared_ptr<DB::MergeTreeReadPool>&, unsigned long const&, unsigned long&, DB::SettingFieldNumber<unsigned long> const&, DB::SettingFieldNumber<unsigned long> const&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool&, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::MergeTreeReaderSettings 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&) @ 0x1ab956a1 in /workspace/clickhouse
2021.02.17 19:46:02.661644 [ 209 ] {} <Fatal> BaseDaemon: 24. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:1051: DB::MergeTreeDataSelectExecutor::spreadMarkRangesAmongStreams(std::__1::vector<DB::RangesInDataPart, std::__1::allocator<DB::RangesInDataPart> >&&, unsigned long, 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&, unsigned long, bool, DB::SelectQueryInfo 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&, DB::Settings const&, DB::MergeTreeReaderSettings const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const @ 0x1ab8e8af in /workspace/clickhouse
2021.02.17 19:46:03.558433 [ 209 ] {} <Fatal> BaseDaemon: 25. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:840: DB::MergeTreeDataSelectExecutor::readFromParts(std::__1::vector<std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::allocator<std::__1::shared_ptr<DB::IMergeTreeDataPart 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&, DB::SelectQueryInfo const&, DB::Context const&, unsigned long, unsigned int, 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> > > const*) const @ 0x1ab87825 in /workspace/clickhouse
2021.02.17 19:46:04.501683 [ 209 ] {} <Fatal> BaseDaemon: 26. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:157: DB::MergeTreeDataSelectExecutor::read(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&, DB::SelectQueryInfo const&, DB::Context const&, unsigned long, unsigned int, 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> > > const*) const @ 0x1ab7f545 in /workspace/clickhouse
2021.02.17 19:46:05.404514 [ 209 ] {} <Fatal> BaseDaemon: 27. ./obj-x86_64-linux-gnu/../src/Storages/StorageMergeTree.cpp:186: DB::StorageMergeTree::read(DB::QueryPlan&, 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&, DB::SelectQueryInfo&, DB::Context const&, DB::QueryProcessingStage::Enum, unsigned long, unsigned int) @ 0x1a7f71d3 in /workspace/clickhouse
2021.02.17 19:46:06.602585 [ 209 ] {} <Fatal> BaseDaemon: 28. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:1610: DB::InterpreterSelectQuery::executeFetchColumns(DB::QueryProcessingStage::Enum, DB::QueryPlan&, std::__1::shared_ptr<DB::PrewhereDAGInfo> const&, std::__1::unordered_set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, 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::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x1a008548 in /workspace/clickhouse
2021.02.17 19:46:07.810595 [ 209 ] {} <Fatal> BaseDaemon: 29. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:879: DB::InterpreterSelectQuery::executeImpl(DB::QueryPlan&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>) @ 0x1a001099 in /workspace/clickhouse
2021.02.17 19:46:09.012424 [ 209 ] {} <Fatal> BaseDaemon: 30. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:528: DB::InterpreterSelectQuery::buildQueryPlan(DB::QueryPlan&) @ 0x1a000676 in /workspace/clickhouse
2021.02.17 19:46:09.574185 [ 209 ] {} <Fatal> BaseDaemon: 31. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:360: DB::InterpreterSelectWithUnionQuery::buildQueryPlan(DB::QueryPlan&) @ 0x1a2dafaa in /workspace/clickhouse
2021.02.17 19:46:10.124603 [ 209 ] {} <Fatal> BaseDaemon: 32. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:414: DB::InterpreterSelectWithUnionQuery::execute() @ 0x1a2db71d in /workspace/clickhouse
2021.02.17 19:46:11.903613 [ 82 ] {} <Fatal> Application: Child process was terminated by signal 6.
```
| https://github.com/ClickHouse/ClickHouse/issues/20870 | https://github.com/ClickHouse/ClickHouse/pull/25262 | 35ef7266dbec1f04758a5e756af0d4b5e7001ec4 | d822ba1f3b89b62da981823e035c8ff9ca10c4ca | "2021-02-18T08:40:55Z" | c++ | "2021-10-03T09:09:28Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,629 | ["base/mysqlxx/PoolWithFailover.cpp"] | Randomize external dictionary replicas | First choice of replica for given external dictionary should be based on randomness instead of order in configuration file.
| https://github.com/ClickHouse/ClickHouse/issues/20629 | https://github.com/ClickHouse/ClickHouse/pull/20632 | 36c178c0231a073fdb3f75ca52a85ba9e4fbea7e | 3cda69feaf1295333a1dc2f4030730bd3edbb425 | "2021-02-17T16:59:46Z" | c++ | "2021-02-25T10:11:41Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,624 | ["tests/queries/0_stateless/01101_literal_column_clash.reference", "tests/queries/0_stateless/01101_literal_column_clash.sql"] | `Data compressed with different methods` if column name match expression from other column | **Describe the bug**
```
select 2 as `toString(x)`, x from (select 1 as x);
```
In debug it would be `LOGICAL_ERROR`
```
Code: 271, e.displayText() = DB::Exception: Data compressed with different methods, given method byte 0x69, previous method byte 0x82: while receiving packet from localhost:9000, Stack trace (when copying this message, always include the lines below):
```
If types match, no error, but result is unexpected:
```
select '2' as `toString(x)`, toString(x) from (select 1 as x);
โโtoString(x)โโฌโtoString(x)โโ
โ 2 โ 2 โ
โโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
```
| https://github.com/ClickHouse/ClickHouse/issues/20624 | https://github.com/ClickHouse/ClickHouse/pull/25409 | 3e71181451600c8433a53f6f071fc6395c42d523 | 85c64346d96d30799abb1c3b47f4c787434b6afc | "2021-02-17T13:58:14Z" | c++ | "2021-06-17T22:52:12Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,619 | ["src/Dictionaries/getDictionaryConfigurationFromAST.cpp", "tests/queries/0_stateless/01720_dictionary_create_source_with_functions.reference", "tests/queries/0_stateless/01720_dictionary_create_source_with_functions.sql"] | Signal 11 Crash on CREATE DICTIONARY SOURCE CLICKHOUSE | (you don't have to strictly follow this form)
**Describe the bug**
Clickhouse server crashes with `signal 11` message after executing following:
**Does it reproduce on recent release?**
Reproducible on `yandex/clickhouse-server:20.12.6.29` Docker image from dockerhub.
**How to reproduce**
* Which ClickHouse server version to use
`20.12.6.29`
* Which interface to use, if matters
clickhouse client
* Non-default settings, if any
`none`
* `CREATE TABLE` statements for all tables involved
`see below`
* Queries to run that lead to unexpected result
``` SQL
CREATE DATABASE ch_crash_test;
CREATE TABLE ch_crash_test.table
(
i UInt8, s String
)
ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
CREATE DICTIONARY ch_crash_test.dictionary (key UInt64, value UInt64) PRIMARY KEY key SOURCE(CLICKHOUSE(DB 'ch_crash_test' TABLE 'table' HOST hostName() PORT tcpPort())) LIFETIME(0) LAYOUT(FLAT());
```
**Expected behavior**
CH gives an error message or creates a dictionary.
**Error message and/or stacktrace**
```
[3d980a87c6db] 2021.02.17 10:27:10.046906 [ 104 ] <Fatal> BaseDaemon: ########################################
[3d980a87c6db] 2021.02.17 10:27:10.047020 [ 104 ] <Fatal> BaseDaemon: (version 20.12.6.29 (official build), build id: 3EBB7402D1E5864D) (from thread 74) (query_id: 7ecb645a-e37b-478e-bcd1-c49fb6c066a1) Received signal Segmentation fault (11)
[3d980a87c6db] 2021.02.17 10:27:10.047078 [ 104 ] <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
[3d980a87c6db] 2021.02.17 10:27:10.047150 [ 104 ] <Fatal> BaseDaemon: Stack trace: 0xd92e4b2 0xba40111 0x93efd5e 0x941bbb0 0x941c251 0x94238dd 0xd5ed41d 0xd5e9bb0 0xda66115 0xdc3f2e4 0xdc400af 0xe01ffe7 0xe01ebbd 0xe6f7f46 0xe704447 0x10eaec1f 0x10eb0631 0x10fddc09 0x10fd9b9a 0x7fe33d652609 0x7fe33d568293
[3d980a87c6db] 2021.02.17 10:27:10.047244 [ 104 ] <Fatal> BaseDaemon: 2. DB::IDataType::createColumnConst(unsigned long, DB::Field const&) const @ 0xd92e4b2 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047305 [ 104 ] <Fatal> BaseDaemon: 3. ? @ 0xba40111 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047374 [ 104 ] <Fatal> BaseDaemon: 4. DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x93efd5e in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047439 [ 104 ] <Fatal> BaseDaemon: 5. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x941bbb0 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047510 [ 104 ] <Fatal> BaseDaemon: 6. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x941c251 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047581 [ 104 ] <Fatal> BaseDaemon: 7. 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 @ 0x94238dd in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047633 [ 104 ] <Fatal> BaseDaemon: 8. ? @ 0xd5ed41d in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047683 [ 104 ] <Fatal> BaseDaemon: 9. DB::getDictionaryConfigurationFromAST(DB::ASTCreateQuery const&, DB::Context const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xd5e9bb0 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047746 [ 104 ] <Fatal> BaseDaemon: 10. DB::DatabaseWithDictionaries::createDictionary(DB::Context const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::IAST> const&) @ 0xda66115 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047809 [ 104 ] <Fatal> BaseDaemon: 11. DB::InterpreterCreateQuery::createDictionary(DB::ASTCreateQuery&) @ 0xdc3f2e4 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047864 [ 104 ] <Fatal> BaseDaemon: 12. DB::InterpreterCreateQuery::execute() @ 0xdc400af in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047921 [ 104 ] <Fatal> BaseDaemon: 13. ? @ 0xe01ffe7 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047969 [ 104 ] <Fatal> BaseDaemon: 14. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0xe01ebbd in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048030 [ 104 ] <Fatal> BaseDaemon: 15. DB::TCPHandler::runImpl() @ 0xe6f7f46 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048091 [ 104 ] <Fatal> BaseDaemon: 16. DB::TCPHandler::run() @ 0xe704447 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048150 [ 104 ] <Fatal> BaseDaemon: 17. Poco::Net::TCPServerConnection::start() @ 0x10eaec1f in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048212 [ 104 ] <Fatal> BaseDaemon: 18. Poco::Net::TCPServerDispatcher::run() @ 0x10eb0631 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048252 [ 104 ] <Fatal> BaseDaemon: 19. Poco::PooledThread::run() @ 0x10fddc09 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048311 [ 104 ] <Fatal> BaseDaemon: 20. Poco::ThreadImpl::runnableEntry(void*) @ 0x10fd9b9a in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048367 [ 104 ] <Fatal> BaseDaemon: 21. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
[3d980a87c6db] 2021.02.17 10:27:10.048424 [ 104 ] <Fatal> BaseDaemon: 22. clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
```
**Additional context**
Looks like related to `hostName()` function, since both queries without it work just fine:
``` SQL
CREATE DICTIONARY ch_crash_test.dictionary (key UInt64, value UInt64) PRIMARY KEY key SOURCE(CLICKHOUSE(DB 'ch_crash_test' TABLE 'table' HOST 'localhost' PORT 9001)) LIFETIME(0) LAYOUT(FLAT());
CREATE DICTIONARY ch_crash_test.dictionary (key UInt64, value UInt64) PRIMARY KEY key SOURCE(CLICKHOUSE(DB 'ch_crash_test' TABLE 'table' HOST 'localhost' PORT tcpPort())) LIFETIME(0) LAYOUT(FLAT());
```
| https://github.com/ClickHouse/ClickHouse/issues/20619 | https://github.com/ClickHouse/ClickHouse/pull/20623 | abe5d9df1e04a05d9864e74ee84d59dd68159ad8 | dcabbc95ed4b4781f82d2667d1d40243bb201d09 | "2021-02-17T10:31:50Z" | c++ | "2021-02-18T08:50:20Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,597 | ["src/Interpreters/InterpreterSelectQuery.cpp", "tests/queries/0_stateless/01720_union_distinct_with_limit.reference", "tests/queries/0_stateless/01720_union_distinct_with_limit.sql"] | UNION DISTINCT + LIMIT Bad cast from type DB::ASTSelectWithUnionQuery to DB::ASTSelectQuery. | **How to reproduce**
Clickhouse version 21.2-21.3
```
SELECT x
FROM
(
SELECT 1 AS x
UNION DISTINCT
SELECT 1
)
LIMIT 1
Query id: b82bbb8d-dea9-4f1c-9a2f-5b0e9b6c2422
0 rows in set. Elapsed: 0.002 sec.
Received exception from server (version 21.2.3):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Bad cast from type DB::ASTSelectWithUnionQuery to DB::ASTSelectQuery.
```
| https://github.com/ClickHouse/ClickHouse/issues/20597 | https://github.com/ClickHouse/ClickHouse/pull/20610 | f91caf2ccf96d425b79813b4cec2f41515e0a9ec | 80e6ad7aae080ad9d3ab3d49a67214f8d713c11a | "2021-02-16T23:32:40Z" | c++ | "2021-02-17T18:24:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,558 | ["src/Interpreters/MutationsInterpreter.cpp", "src/Interpreters/MutationsInterpreter.h", "tests/queries/0_stateless/01753_mutate_table_predicated_with_table.reference", "tests/queries/0_stateless/01753_mutate_table_predicated_with_table.sql"] | 21.X Deadlock in mutations referencing the same table in subquery | ```
create table mmm engine=MergeTree ORDER BY number AS select number, rand()%10 as a from numbers(1000);
alter table mmm delete where a in (select a from mmm);
select * from system.mutations;
```
20.12 - works.
21.1 and newer - hangs.
Stacktrace from 21.3:
```
__lll_lock_wait
__GI___pthread_mutex_lock
std::__1::mutex::lock()
DB::StorageMergeTree::getFirstAlterMutationCommandsForPart(std::__1::shared_ptr<DB::IMergeTreeDataPart const> const&) const
DB::MergeTreeData::getAlterConversionsForPart(std::__1::shared_ptr<DB::IMergeTreeDataPart const>) const
DB::injectRequiredColumns(DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::IMergeTreeDataPart 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> > > >&)
DB::getReadTaskColumns(DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::IMergeTreeDataPart 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&, std::__1::shared_ptr<DB::PrewhereInfo> const&, bool)
DB::MergeTreeReadPool::fillPerPartInfo(std::__1::vector<DB::RangesInDataPart, std::__1::allocator<DB::RangesInDataPart> > const&, bool)
DB::MergeTreeReadPool::MergeTreeReadPool(unsigned long, unsigned long, unsigned long, std::__1::vector<DB::RangesInDataPart, std::__1::allocator<DB::RangesInDataPart> >&&, DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::PrewhereInfo> const&, bool, 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&, DB::MergeTreeReadPool::BackoffSettings const&, unsigned long, bool)
DB::MergeTreeDataSelectExecutor::spreadMarkRangesAmongStreams(std::__1::vector<DB::RangesInDataPart, std::__1::allocator<DB::RangesInDataPart> >&&, unsigned long, 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&, unsigned long, bool, DB::SelectQueryInfo 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&, DB::Settings const&, DB::MergeTreeReaderSettings const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
DB::MergeTreeDataSelectExecutor::readFromParts(std::__1::vector<std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::allocator<std::__1::shared_ptr<DB::IMergeTreeDataPart 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&, DB::SelectQueryInfo const&, DB::Context const&, unsigned long, unsigned int, 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> > > const*) const
DB::MergeTreeDataSelectExecutor::read(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&, DB::SelectQueryInfo const&, DB::Context const&, unsigned long, unsigned int, 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> > > const*) const
DB::StorageMergeTree::read(DB::QueryPlan&, 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&, DB::SelectQueryInfo&, DB::Context const&, DB::QueryProcessingStage::Enum, unsigned long, unsigned int)
DB::InterpreterSelectQuery::executeFetchColumns(DB::QueryProcessingStage::Enum, DB::QueryPlan&, std::__1::shared_ptr<DB::PrewhereDAGInfo> const&, std::__1::unordered_set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, 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::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)
DB::InterpreterSelectQuery::executeImpl(DB::QueryPlan&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>)
DB::InterpreterSelectQuery::buildQueryPlan(DB::QueryPlan&)
DB::InterpreterSelectWithUnionQuery::buildQueryPlan(DB::QueryPlan&)
DB::ActionsMatcher::makeSet(DB::ASTFunction const&, DB::ActionsMatcher::Data&, bool)
DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&)
DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&)
DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&)
DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool)
DB::SelectQueryExpressionAnalyzer::appendPrewhere(DB::ExpressionActionsChain&, bool, 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&)
DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterInfo> const&, DB::Block const&)
DB::InterpreterSelectQuery::getSampleBlockImpl()
DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> 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&)
DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IStorage> const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, DB::SelectQueryOptions const&)
DB::MutationsInterpreter::MutationsInterpreter(std::__1::shared_ptr<DB::IStorage>, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, DB::MutationCommands, DB::Context const&, bool)
DB::StorageMergeTree::selectPartsToMutate(std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::shared_ptr<DB::RWLockImpl::LockHolderImpl>&)
โ 2020 โ 1e5d8a33-a0d8-481b-ad74-6f7e9d5321db โ __lll_lock_wait
__GI___pthread_mutex_lock
std::__1::mutex::lock()
DB::StorageMergeTree::getMutationsStatus() const
DB::StorageSystemMutations::fillData(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, DB::Context const&, DB::SelectQueryInfo const&) const
DB::IStorageSystemOneBlock<DB::StorageSystemMutations>::read(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&, DB::SelectQueryInfo&, DB::Context const&, DB::QueryProcessingStage::Enum, unsigned long, unsigned int)
DB::IStorage::read(DB::QueryPlan&, 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&, DB::SelectQueryInfo&, DB::Context const&, DB::QueryProcessingStage::Enum, unsigned long, unsigned int)
DB::InterpreterSelectQuery::executeFetchColumns(DB::QueryProcessingStage::Enum, DB::QueryPlan&, std::__1::shared_ptr<DB::PrewhereDAGInfo> const&, std::__1::unordered_set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, 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::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)
DB::InterpreterSelectQuery::executeImpl(DB::QueryPlan&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>)
DB::InterpreterSelectQuery::buildQueryPlan(DB::QueryPlan&)
DB::InterpreterSelectWithUnionQuery::buildQueryPlan(DB::QueryPlan&)
DB::InterpreterSelectWithUnionQuery::execute()
DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool)
DB::TCPHandler::runImpl()
DB::TCPHandler::run()
Poco::Net::TCPServerConnection::start()
Poco::Net::TCPServerDispatcher::run()
Poco::PooledThread::run()
Poco::ThreadImpl::runnableEntry(void*)
start_thread
clone โ
``` | https://github.com/ClickHouse/ClickHouse/issues/20558 | https://github.com/ClickHouse/ClickHouse/pull/21477 | af906583697550994a4ca6afc3215d6f5e01bd5a | af2135ef9dc72f16fa4f229b731262c3f0a8bbdc | "2021-02-16T11:53:44Z" | c++ | "2021-03-05T23:08:00Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,551 | ["src/Interpreters/ActionsDAG.h", "src/Storages/StorageView.cpp", "src/Storages/StorageView.h", "src/TableFunctions/TableFunctionView.cpp", "tests/queries/0_stateless/00109_shard_totals_after_having.sql", "tests/queries/0_stateless/01866_view_persist_settings.reference", "tests/queries/0_stateless/01866_view_persist_settings.sql"] | select with join_use_nulls=1 breaks some views created under join_use_nulls=0 | Reproduction example:
```(sql)
SET join_use_nulls = 0;
create or replace view
some_test_view
as
select *
from
(
select
arrayJoin([1, 2]) as a,
arrayJoin([11, 12]) as b
) as t1
full join
(
select
arrayJoin([2, 3]) as a,
arrayJoin([22, 23]) as c
) as t2
using a
order by a
```
In `describe table some_test_view` the resulting columns are non-nullable, as expected.
However, changing the setting and selecting from the view:
```(sql)
SET join_use_nulls = 1;
select * from some_test_view
```
Results in an error: `Code: 349, e.displayText() = DB::Exception: Cannot convert NULL value to non-Nullable type: while converting source column c to destination column c: while executing 'FUNCTION CAST(c :: 2, UInt8 :: 5) -> CAST(c, UInt8) UInt8 : 4' (version 21.2.3.15 (official build))`
There's no clearly-good solution to this problem;
one of the suggestions is to add the setting to the view schema, e.g.:
```(sql)
SET join_use_nulls = 0;
create or replace view
some_test_view
as
select *
from
(
select
arrayJoin([1, 2]) as a,
arrayJoin([11, 12]) as b
) as t1
full join
(
select
arrayJoin([2, 3]) as a,
arrayJoin([22, 23]) as c
) as t2
using a
order by a
settings join_use_nulls = 0 -- prevent the join behavior inside the view from changing
```
which could be done implicitly by CH to improve the user experience.
Side note: `โฆ settings join_use_nulls = โฆ` seems to be poorly documented, only appearing in a few examples without any explanation.
| https://github.com/ClickHouse/ClickHouse/issues/20551 | https://github.com/ClickHouse/ClickHouse/pull/24095 | 4a250dc14e41b071eaab1580eebfdb1bd9d4a619 | 930a2aa0b7b6d4181d04596d9b82c950fd687903 | "2021-02-16T09:10:51Z" | c++ | "2021-06-25T13:44:28Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,549 | ["src/Functions/if.cpp", "tests/queries/0_stateless/00735_long_conditional.reference", "tests/queries/0_stateless/00735_long_conditional.sql", "tests/queries/0_stateless/01913_if_int_decimal.reference", "tests/queries/0_stateless/01913_if_int_decimal.sql"] | Full join, subqueries and decimal: Incompatible types of arguments corresponding to two conditional branches | Reproduction steps:
```
CREATE TABLE table_left
(
`date` Date,
`uid` String
)
ENGINE = MergeTree()
ORDER BY (date, uid)
CREATE TABLE table_right
(
`date` Date,
`value` Decimal(18, 10)
)
ENGINE = MergeTree()
ORDER BY date
INSERT INTO table_left values(toDate('2019-10-01'), 'hello');
INSERT INTO table_right values (toDate('2019-10-01'), 1), (toDate('2029-10-01'), 2);
SET join_use_nulls = 1;
SELECT ifNull(subquery_right.alias_value, 0)
FROM table_left
FULL OUTER JOIN
(
SELECT
date,
value AS alias_value
FROM table_right
) AS subquery_right
ON table_left.date = subquery_right.date
Received exception from server (version 21.3.1):
Code: 43. DB::Exception: Received from localhost:9000. DB::Exception: Incompatible types of arguments corresponding to two conditional branches: while executing 'FUNCTION ifNull(alias_value :: 0, 0 :: 1) -> ifNull(alias_value, 0) Decimal(18, 10) : 2'.
``` | https://github.com/ClickHouse/ClickHouse/issues/20549 | https://github.com/ClickHouse/ClickHouse/pull/25283 | 7aacca94e35151e78b4b927840a6f58b622cf144 | fffd69b023a00c5ae01761264306d414c3a15b18 | "2021-02-16T08:06:48Z" | c++ | "2021-06-17T06:17:42Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,514 | ["src/Functions/FunctionsConversion.h", "tests/queries/0_stateless/01761_cast_to_enum_nullable.reference", "tests/queries/0_stateless/01761_cast_to_enum_nullable.sql"] | Uninitialized memory read in CAST | https://clickhouse-test-reports.s3.yandex.net/20492/c5b96a522e29b38eae3f6c2d945540dd234e3c34/fuzzer_msan/server.log
```
for i in {1..100}; do clickhouse-client --query "SELECT toUInt8(assumeNotNull(cast(cast(NULL, 'Nullable(String)'), 'Nullable(Enum8(\'Hello\' = 1))')))"; done
160
224
128
192
64
64
32
160
128
192
128
224
128
160
0
96
64
32
192
224
64
96
224
96
128
192
192
128
...
``` | https://github.com/ClickHouse/ClickHouse/issues/20514 | https://github.com/ClickHouse/ClickHouse/pull/22026 | c19045da25b917dcd863ba9eab82fcc3dacaab9a | 150a2df9df49442efe2d8839d1df829ebbe98e19 | "2021-02-15T12:42:27Z" | c++ | "2021-03-23T20:51:19Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,512 | ["src/Interpreters/ExecuteScalarSubqueriesVisitor.cpp", "src/Interpreters/ExpressionAnalyzer.cpp", "src/Processors/Executors/PullingAsyncPipelineExecutor.cpp", "src/Processors/Formats/LazyOutputFormat.cpp", "src/Processors/Formats/LazyOutputFormat.h", "tests/performance/subqueries.xml", "tests/queries/0_stateless/00205_scalar_subqueries.sql"] | Multiple scalar subqueries can execute with less number of threads than max_threads in 21.2+ |
**How to reproduce**
clickhouse server 21.1.4.46
```
CREATE TABLE table_case (number UInt32) ENGINE=Memory();
INSERT INTO table_case SELECT * FROM numbers(100000000);
set max_threads=1;
SELECT
multiIf(
(
SELECT count(*)
FROM table_case
WHERE (number % 20) = 2
) > 4094370,
(
SELECT avg(number)
FROM table_case
WHERE (number % 20) = 2
),
(
SELECT avg(rand())
FROM table_case
WHERE (number % 20) = 2
)) AS bucket1,
multiIf(
(
SELECT count(*)
FROM table_case
WHERE (number % 20) = 7
) > 5000000,
(
SELECT avg(number)
FROM table_case
WHERE (number % 20) = 7
),
(
SELECT avg(rand())
FROM table_case
WHERE (number % 20) = 7
)) AS bucket2,
multiIf(
(
SELECT count(*)
FROM table_case
WHERE (number % 10) = 3
) > 13000000,
(
SELECT avg(number)
FROM table_case
WHERE (number % 10) = 3
),
(
SELECT avg(rand())
FROM table_case
WHERE (number % 10) = 3
)) AS bucket3,
multiIf(
(
SELECT count(*)
FROM table_case
WHERE (number % 10) = 3
) > 23000000,
(
SELECT avg(number)
FROM table_case
WHERE (number % 10) = 3
),
(
SELECT avg(rand())
FROM table_case
WHERE (number % 10) = 3
)) AS bucket4,
multiIf(
(
SELECT count(*)
FROM table_case
WHERE (number % 17) = 4
) > 15000000,
(
SELECT avg(number)
FROM table_case
WHERE (number % 17) = 4
),
(
SELECT avg(rand())
FROM table_case
WHERE (number % 17) = 4
)) AS bucket5
Query id: c03edf92-53d1-48f6-b4f6-3153599d07ae
โโโbucket1โโฌโโโโโโโโโโโbucket2โโฌโโโโโโโโโโโโbucket3โโฌโโโโโโโโโโโโbucket4โโฌโโโโโโโโโโbucket5โโ
โ 49999992 โ 2147267165.746676 โ 2147653473.0356455 โ 2147653473.0356455 โ 2146430096.56865 โ
โโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ
1 rows in set. Elapsed: 7.707 sec.
set max_threads=16;
โโโbucket1โโฌโโโโโโโโโโโbucket2โโฌโโโโโโโโโโโbucket3โโฌโโโโโโโโโโโbucket4โโฌโโโโโโโโโโโbucket5โโ
โ 49999992 โ 2147628607.640714 โ 2146571628.422384 โ 2146571628.422384 โ 2147553185.879362 โ
โโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
1 rows in set. Elapsed: 1.165 sec.
```
clickhouse-server 21.2.3.15
```
set max_threads=1;
โโโbucket1โโฌโโโโโโโโโโbucket2โโฌโโโโโโโโโbucket3โโฌโโโโโโโโโbucket4โโฌโโโโโโโโโโโโbucket5โโ
โ 49999992 โ 2147530694.57038 โ 2148494441.6794 โ 2148494441.6794 โ 2146861224.9913669 โ
โโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโ
1 rows in set. Elapsed: 7.824 sec.
set max_threads=16;
โโโbucket1โโฌโโโโโโโโโโโโbucket2โโฌโโโโโโโโโโโโbucket3โโฌโโโโโโโโโโโโbucket4โโฌโโโโโโโโโโโโbucket5โโ
โ 49999992 โ 2145953907.4246264 โ 2147932668.7410493 โ 2147932668.7410493 โ 2147690139.9780807 โ
โโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโ
1 rows in set. Elapsed: 7.726 sec.
```
| https://github.com/ClickHouse/ClickHouse/issues/20512 | https://github.com/ClickHouse/ClickHouse/pull/20550 | 976dbe8077f9076387528e2f40b6174f6d8a8b90 | c98e6bb1add039789b3472fdabccd10c83f82b52 | "2021-02-15T11:32:35Z" | c++ | "2021-03-01T12:49:38Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,497 | ["src/Interpreters/IdentifierSemantic.cpp", "src/Interpreters/PredicateExpressionsOptimizer.cpp", "src/Interpreters/PredicateExpressionsOptimizer.h", "src/Interpreters/PredicateRewriteVisitor.cpp", "src/Interpreters/PredicateRewriteVisitor.h", "tests/queries/0_stateless/00597_push_down_predicate.reference", "tests/queries/0_stateless/00597_push_down_predicate.sql"] | Incorrect 'where' filtration after full join | **Describe the bug**
Strange behavior with 'where' condition after join. Some rows are discarded by mistake.
**How to reproduce**
* Which ClickHouse server version to use
Latest version in Arcadia.
* `CREATE TABLE` statements for all tables involved
```sql
create table t0 (a Int64) engine = MergeTree() primary key a;
create table t1 (a Int64) engine = MergeTree() primary key a;
```
* Sample data for all these tables
```sql
insert into t0 values (1), (2);
insert into t1 values (1), (3);
```
* Queries to run that lead to unexpected result
```sql
select multiIf(a != 0 and t1.a != 0, 'both', a != 0 and t1.a = 0, 'first', a = 0 and t1.a != 0, 'second', 'error') as type from (select t0.a, t1.a from t0 full join t1 using a) where type = 'first';
select multiIf(a != 0 and t1.a != 0, 'both', a != 0 and t1.a = 0, 'first', a = 0 and t1.a != 0, 'second', 'error') as type from (select t0.a, t1.a from t0 full join t1 using a) where type in ('both', 'first', 'second');
```
**Expected behavior**
Result should contain 1 row in first query and 3 in second one.
**Additional context**
First two queries and the last one return correct results. Others do not. The queries differ only in 'where' condition.
```sql
di.man.yp-c.yandex.net :) select multiIf(a != 0 and t1.a != 0, 'both', a != 0 and t1.a = 0, 'first', a = 0 and t1.a != 0, 'second', 'error') as type from (select t0.a, t1.a from t0 full join t1 using a)
SELECT multiIf((a != 0) AND (t1.a != 0), 'both', (a != 0) AND (t1.a = 0), 'first', (a = 0) AND (t1.a != 0), 'second', 'error') AS type
FROM
(
SELECT
t0.a,
t1.a
FROM t0
FULL OUTER JOIN t1 USING (a)
)
Query id: 52e62625-d357-4fa4-babe-805332ab1dfd
โโtypeโโโ
โ both โ
โ first โ
โโโโโโโโโ
โโtypeโโโโ
โ second โ
โโโโโโโโโโ
3 rows in set. Elapsed: 0.019 sec.
di.man.yp-c.yandex.net :) select multiIf(a != 0 and t1.a != 0, 'both', a != 0 and t1.a = 0, 'first', a = 0 and t1.a != 0, 'second', 'error') as type from (select t0.a, t1.a from t0 full join t1 using a) where type = 'both'
SELECT multiIf((a != 0) AND (t1.a != 0), 'both', (a != 0) AND (t1.a = 0), 'first', (a = 0) AND (t1.a != 0), 'second', 'error') AS type
FROM
(
SELECT
t0.a,
t1.a
FROM t0
FULL OUTER JOIN t1 USING (a)
)
WHERE type = 'both'
Query id: 4ac91465-c66b-4aed-89cd-c6fbea58ff57
โโtypeโโ
โ both โ
โโโโโโโโ
1 rows in set. Elapsed: 0.028 sec.
di.man.yp-c.yandex.net :) select multiIf(a != 0 and t1.a != 0, 'both', a != 0 and t1.a = 0, 'first', a = 0 and t1.a != 0, 'second', 'error') as type from (select t0.a, t1.a from t0 full join t1 using a) where type = 'first'
SELECT multiIf((a != 0) AND (t1.a != 0), 'both', (a != 0) AND (t1.a = 0), 'first', (a = 0) AND (t1.a != 0), 'second', 'error') AS type
FROM
(
SELECT
t0.a,
t1.a
FROM t0
FULL OUTER JOIN t1 USING (a)
)
WHERE type = 'first'
Query id: 5e90a617-d996-4fde-ace2-9a43e5c96906
Ok.
0 rows in set. Elapsed: 0.028 sec.
di.man.yp-c.yandex.net :) select multiIf(a != 0 and t1.a != 0, 'both', a != 0 and t1.a = 0, 'first', a = 0 and t1.a != 0, 'second', 'error') as type from (select t0.a, t1.a from t0 full join t1 using a) where type = 'second'
SELECT multiIf((a != 0) AND (t1.a != 0), 'both', (a != 0) AND (t1.a = 0), 'first', (a = 0) AND (t1.a != 0), 'second', 'error') AS type
FROM
(
SELECT
t0.a,
t1.a
FROM t0
FULL OUTER JOIN t1 USING (a)
)
WHERE type = 'second'
Query id: a673bf99-0cfe-4782-912f-3132b150fd83
Ok.
0 rows in set. Elapsed: 0.027 sec.
di.man.yp-c.yandex.net :) select multiIf(a != 0 and t1.a != 0, 'both', a != 0 and t1.a = 0, 'first', a = 0 and t1.a != 0, 'second', 'error') as type from (select t0.a, t1.a from t0 full join t1 using a) where type in ('both', 'first', 'second')
SELECT multiIf((a != 0) AND (t1.a != 0), 'both', (a != 0) AND (t1.a = 0), 'first', (a = 0) AND (t1.a != 0), 'second', 'error') AS type
FROM
(
SELECT
t0.a,
t1.a
FROM t0
FULL OUTER JOIN t1 USING (a)
)
WHERE type IN ('both', 'first', 'second')
Query id: 8cc4b758-6b0d-41b3-8dc9-3932c46c00ce
โโtypeโโโ
โ both โ
โ first โ
โโโโโโโโโ
2 rows in set. Elapsed: 0.028 sec.
di.man.yp-c.yandex.net :) select multiIf(a != 0 and t1.a != 0, 'both', a != 0 and t1.a = 0, 'first', a = 0 and t1.a != 0, 'second', 'error') as type from (select t0.a, t1.a from t0 full join t1 using a) where type not in ('both', 'first')
SELECT multiIf((a != 0) AND (t1.a != 0), 'both', (a != 0) AND (t1.a = 0), 'first', (a = 0) AND (t1.a != 0), 'second', 'error') AS type
FROM
(
SELECT
t0.a,
t1.a
FROM t0
FULL OUTER JOIN t1 USING (a)
)
WHERE type NOT IN ('both', 'first')
Query id: e8f174d1-f2e4-424b-9ad0-2fa233ceb0b0
โโtypeโโโโ
โ second โ
โโโโโโโโโโ
1 rows in set. Elapsed: 0.034 sec.
``` | https://github.com/ClickHouse/ClickHouse/issues/20497 | https://github.com/ClickHouse/ClickHouse/pull/20622 | 3b799c5d7da8d6b3b69612f2f09172a1c64965a5 | 9b40f384e9bd4d8951d07e91cfea2f7240b0a9dc | "2021-02-15T07:45:47Z" | c++ | "2021-04-02T08:48:29Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,494 | ["base/common/DateLUTImpl.h", "tests/queries/0_stateless/01702_toDateTime_from_string_clamping.reference", "tests/queries/0_stateless/01702_toDateTime_from_string_clamping.sql"] | DateTime64: out of bound array access, garbage results. | ```
milovidov-desktop :) SELECT toString(toDateTime('-922337203.6854775808', 1))
SELECT toString(toDateTime('-922337203.6854775808', 1))
Query id: 3d51ba80-4993-4f64-b6ef-da0c0f1bdf43
โโtoString(toDateTime('-922337203.6854775808', 1))โโ
โ 2106-02-07 :rE:๏ฟฝ.6 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
``` | https://github.com/ClickHouse/ClickHouse/issues/20494 | https://github.com/ClickHouse/ClickHouse/pull/21023 | 0afbddd665ee12be64eb5698e887148e8f10d9c1 | c8da611fcd5c454431b49a407df36fa4ff745b9b | "2021-02-15T04:53:00Z" | c++ | "2021-02-22T10:10:06Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,480 | ["src/AggregateFunctions/ReservoirSamplerDeterministic.h", "tests/queries/0_stateless/00273_quantiles.reference", "tests/queries/0_stateless/01533_quantile_deterministic_assert.reference", "tests/queries/0_stateless/01913_quantile_deterministic.reference", "tests/queries/0_stateless/01913_quantile_deterministic.sh"] | quantileDeterministic and friends are not deterministic | **Describe the bug**
I've found that quantileDeterministic and relevant functions are not deterministic
On 21.2.3 release:
```sql
SELECT medianDeterministic(oid, oid) FROM ztf.dr4_meta
โโmedianDeterministic(oid, oid)โโ
โ 686709400040570 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SELECT medianDeterministic(oid, oid) FROM ztf.dr4_meta
โโmedianDeterministic(oid, oid)โโ
โ 686315850035097 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SELECT medianDeterministic(oid, oid) FROM ztf.dr4_meta
โโmedianDeterministic(oid, oid)โโ
โ 686316400060683 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
**Does it reproduce on recent release?**
Yes
**How to reproduce**
* Which ClickHouse server version to use: 21.2.3
* `CREATE TABLE` statements for all tables involved
```sql
CREATE TABLE dr4_meta
(
`oid` UInt64 CODEC(Delta(8), LZ4),
`nobs` UInt16 CODEC(T64, LZ4),
`ngoodobs` UInt16 CODEC(T64, LZ4),
`filter` UInt8 CODEC(T64, LZ4),
`fieldid` UInt16 CODEC(T64, LZ4),
`rcid` UInt8,
`ra` Float64,
`dec` Float64,
`h3index10` UInt64,
`durgood` Float64,
`mingoodmag` Float32,
`maxgoodmag` Float32,
`meangoodmag` Float32
)
ENGINE = MergeTree()
ORDER BY oid
```
* Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/master/programs/obfuscator/Obfuscator.cpp#L42-L80) if necessary
[100GB tar](https://drive.google.com/file/d/1lRqzJx650MrTuY8SGfMTO9E_5U8xldL-/view?usp=sharing) of dr4_meta table
**Additional context**
20.6.4.1 works fine and always return `686316400060683`, while current version returns this or some other values. If `max_threads=1` is applied current version always returns `686709400040570` | https://github.com/ClickHouse/ClickHouse/issues/20480 | https://github.com/ClickHouse/ClickHouse/pull/25313 | 5de9f6cdca5f48e82b3c704ae0c16657cf20d32a | 0e16ddd7d9d4c90e404148fda9273616a7f144eb | "2021-02-14T17:37:29Z" | c++ | "2021-06-16T22:24:52Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,469 | ["src/Functions/FunctionsCodingIP.h", "src/Functions/FunctionsConversion.h", "tests/queries/0_stateless/02234_cast_to_ip_address.reference", "tests/queries/0_stateless/02234_cast_to_ip_address.sql"] | Function to convert IPv6 to appropriate IPv4/6 string? | Following on from #19518, it would be nice to have a reverse function which operates on an ipv6 address and returns it in ipv4 or ipv6 notation depending on type. So basically `replaceOne(IPv6NumToString(ip), '::ffff:', '')`. This should then allow the `IPv6` type to work pretty much the same as the postgres `inet` type I think? | https://github.com/ClickHouse/ClickHouse/issues/20469 | https://github.com/ClickHouse/ClickHouse/pull/49759 | 9a75faad77f6b699b99defa53727deab5cd6a898 | 71678f64b184b3325820ab1f3882cbc5755cb196 | "2021-02-13T20:20:40Z" | c++ | "2023-06-24T21:33:15Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,460 | ["src/Functions/transform.cpp", "tests/queries/0_stateless/01704_transform_with_float_key.reference", "tests/queries/0_stateless/01704_transform_with_float_key.sql"] | Function 'transform' does not work properly for floating point keys. | https://clickhouse-test-reports.s3.yandex.net/19673/e7de5f34b1b3ae5d6d4e5d96ba0cd7c45acfb329/fuzzer_ubsan/server.log
**Describe the bug**
```
milovidov-desktop :) SELECT transform(number / 2, [0.5, 1.5], ['Hello', 'World'], '-') FROM numbers(10)
SELECT transform(number / 2, [0.5, 1.5], ['Hello', 'World'], '-')
FROM numbers(10)
Query id: f8c2646e-e234-41ae-85ef-7a452d4a2545
โโtransform(divide(number, 2), [0.5, 1.5], ['Hello', 'World'], '-')โโ
โ - โ
โ - โ
โ - โ
โ - โ
โ - โ
โ - โ
โ - โ
โ - โ
โ - โ
โ - โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
10 rows in set. Elapsed: 0.003 sec.
milovidov-desktop :) SELECT transform(number / 2, [1, 2], ['Hello', 'World'], '-') FROM numbers(10)
SELECT transform(number / 2, [1, 2], ['Hello', 'World'], '-')
FROM numbers(10)
Query id: 18b64dcf-983e-4653-a62b-5501e18314fd
โโtransform(divide(number, 2), [1, 2], ['Hello', 'World'], '-')โโ
โ - โ
โ - โ
โ Hello โ
โ Hello โ
โ World โ
โ World โ
โ - โ
โ - โ
โ - โ
โ - โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
``` | https://github.com/ClickHouse/ClickHouse/issues/20460 | https://github.com/ClickHouse/ClickHouse/pull/20479 | 20a7ccf5b1a51f88ba0cb86d8881fd01964c1ecd | 125bf1d0d9b38a96a26ba9184a97eba27e2c7e6d | "2021-02-13T01:01:20Z" | c++ | "2021-02-21T14:37:20Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,457 | ["src/Interpreters/ExecuteScalarSubqueriesVisitor.cpp", "src/Interpreters/ExpressionAnalyzer.cpp", "src/Processors/Executors/PullingAsyncPipelineExecutor.cpp", "src/Processors/Formats/LazyOutputFormat.cpp", "src/Processors/Formats/LazyOutputFormat.h", "tests/performance/subqueries.xml", "tests/queries/0_stateless/00205_scalar_subqueries.sql"] | where .. in (select ) by index does not work anymore in some cases that worked before | ```sql
drop table if exists t ;
drop table if exists temp ;
CREATE TABLE t
(
game String,
round String,
casino Int32)
ENGINE = MergeTree() ORDER BY (casino, game, round);
CREATE TABLE temp
(
game String,
round String,
casino Int32)
ENGINE = MergeTree() ORDER BY (casino, game, round);
insert into t(casino, game, round)
select number%103, toString(cityHash64(number%999)), toString(number) from numbers(3, 50000000);
insert into temp(casino, game, round)
select number%103, toString(cityHash64(number%999)), toString(number) from numbers(5000);
Q1: SELECT count(*)
FROM temp WHERE (casino, game, round) NOT IN
( SELECT casino, game, round
FROM t
WHERE (casino, game, round) IN
(
SELECT casino, game, round
FROM temp
)
)
21.3.1.5944 Elapsed: 4.464 sec. Processed 5.00 thousand rows, 225.89 KB (1.12 thousand rows/s., 50.60 KB/s.)
20.8.11.17 Elapsed: 0.611 sec. Processed 5.00 thousand rows, 225.89 KB (8.18 thousand rows/s., 369.73 KB/s.)
18.14.19. Elapsed: 0.341 sec. Processed 5.00 thousand rows, 225.89 KB (14.66 thousand rows/s., 662.46 KB/s.)
``` | https://github.com/ClickHouse/ClickHouse/issues/20457 | https://github.com/ClickHouse/ClickHouse/pull/20550 | 976dbe8077f9076387528e2f40b6174f6d8a8b90 | c98e6bb1add039789b3472fdabccd10c83f82b52 | "2021-02-13T00:05:28Z" | c++ | "2021-03-01T12:49:38Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,381 | ["src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp", "src/Storages/MergeTree/MergeTreeDataSelectExecutor.h", "tests/queries/0_stateless/01508_partition_pruning.reference", "tests/queries/0_stateless/01508_partition_pruning_long.queries", "tests/queries/0_stateless/01508_partition_pruning_long.reference", "tests/queries/0_stateless/01508_partition_pruning_long.sh", "tests/queries/skip_list.json"] | Noisy logging from (SelectExecutor): Not using primary index on part XXXX | Listing all parts in log have no sense.
Should be either silenced, either combined into a single line. | https://github.com/ClickHouse/ClickHouse/issues/20381 | https://github.com/ClickHouse/ClickHouse/pull/20466 | 6359d21dbf70863841c908092024556e65e096a5 | 9db6f4a452e8e1d44dfa27d1716e6c3683501be4 | "2021-02-12T12:48:26Z" | c++ | "2021-02-14T01:30:31Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,366 | ["src/Interpreters/TableJoin.cpp", "tests/queries/0_stateless/01710_join_use_nulls.reference", "tests/queries/0_stateless/01710_join_use_nulls.sql"] | Logical error: 'Arguments of 'minus' have incorrect data types: '1' of type 'UInt8', '1' of type 'UInt8''. | ```
2021.02.11 23:27:54.667622 [ 92 ] {4f54a30b-1b30-453b-a1c3-482b0394d8d2} <Debug> executeQuery: (from [::1]:59602, using production parser) SELECT 1 - 1 FROM X RIGHT JOIN Y ON (X.id + 1) = Y.id SETTINGS join_use_nulls = 1
2021.02.11 23:27:54.673130 [ 92 ] {4f54a30b-1b30-453b-a1c3-482b0394d8d2} <Trace> ContextAccess (default): Access granted: SELECT(id) ON default.Y
2021.02.11 23:27:54.673532 [ 92 ] {4f54a30b-1b30-453b-a1c3-482b0394d8d2} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2021.02.11 23:27:54.674310 [ 92 ] {4f54a30b-1b30-453b-a1c3-482b0394d8d2} <Debug> HashJoin: Right sample block: Y.id Int32 Int32(size = 0)
2021.02.11 23:27:54.675143 [ 92 ] {4f54a30b-1b30-453b-a1c3-482b0394d8d2} <Fatal> : Logical error: 'Arguments of 'minus' have incorrect data types: '1' of type 'UInt8', '1' of type 'UInt8''.
2021.02.11 23:27:54.676530 [ 174 ] {} <Fatal> BaseDaemon: ########################################
2021.02.11 23:27:54.676918 [ 174 ] {} <Fatal> BaseDaemon: (version 21.3.1.5991, build id: 3F6B5C6A080DC28C56ECEA3269A442D8D2067C24) (from thread 92) (query_id: 4f54a30b-1b30-453b-a1c3-482b0394d8d2) Received signal Aborted (6)
2021.02.11 23:27:54.677180 [ 174 ] {} <Fatal> BaseDaemon:
2021.02.11 23:27:54.677511 [ 174 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f0bb64a618b 0x7f0bb6485859 0x10cdaa56 0x10cdab13 0x13dc4061 0x1428808c 0x142875b3 0x130f8368 0x130f714e 0x1317b5a3 0x1317b940 0x1317b4f5 0x1317c65b 0x19913c10 0x19914752 0x1a118726 0x1a11f720 0x1a11ba91 0x1a118a87 0x1a11c3a9 0x1a118af3 0x1a0fadb9 0x1a0edb73 0x1a0f3bc2 0x1a0f70d9 0x19e64ddf 0x19e614a3 0x19e5dfd3 0x19e5cd8c 0x1a14531c 0x1a142e66 0x1a142771 0x19de8bf7 0x19de7375 0x1a35df0d 0x1a35c7ba 0x1ac90e72 0x1ac9d278 0x1e51a40c 0x1e51ac10 0x1e657d83 0x1e654c0d 0x1e653a98 0x7f0bb665b609 0x7f0bb6582293
2021.02.11 23:27:54.677983 [ 174 ] {} <Fatal> BaseDaemon: 4. gsignal @ 0x4618b in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.02.11 23:27:54.678267 [ 174 ] {} <Fatal> BaseDaemon: 5. abort @ 0x25859 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.02.11 23:27:54.678842 [ 174 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:50: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x10cdaa56 in /workspace/clickhouse
2021.02.11 23:27:54.679384 [ 174 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:57: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x10cdab13 in /workspace/clickhouse
2021.02.11 23:27:54.694883 [ 174 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Common/Exception.h:38: DB::Exception::Exception<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, 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> >, 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> > >(int, 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> >&&, 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> >&&, 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> >&&) @ 0x13dc4061 in /workspace/clickhouse
2021.02.11 23:27:54.706892 [ 174 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Functions/FunctionBinaryArithmetic.h:1296: DB::FunctionBinaryArithmetic<DB::MinusImpl, DB::NameMinus, true, true>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x1428808c in /workspace/clickhouse
2021.02.11 23:27:54.718838 [ 174 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Functions/FunctionBinaryArithmetic.h:0: DB::FunctionBinaryArithmeticWithConstants<DB::MinusImpl, DB::NameMinus, true, true>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x142875b3 in /workspace/clickhouse
2021.02.11 23:27:54.727671 [ 174 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Functions/IFunctionImpl.h:203: 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 @ 0x130f8368 in /workspace/clickhouse
2021.02.11 23:27:54.736830 [ 174 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/Functions/IFunctionAdaptors.h:158: DB::DefaultExecutable::executeDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x130f714e in /workspace/clickhouse
2021.02.11 23:27:54.744748 [ 174 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:291: DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1317b5a3 in /workspace/clickhouse
2021.02.11 23:27:54.752780 [ 174 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:273: DB::ExecutableFunctionAdaptor::defaultImplementationForNulls(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1317b940 in /workspace/clickhouse
2021.02.11 23:27:54.760406 [ 174 ] {} <Fatal> BaseDaemon: 15. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:286: DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1317b4f5 in /workspace/clickhouse
2021.02.11 23:27:54.768203 [ 174 ] {} <Fatal> BaseDaemon: 16. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:448: DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1317c65b in /workspace/clickhouse
2021.02.11 23:27:54.809645 [ 174 ] {} <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:237: DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node*, std::__1::allocator<DB::ActionsDAG::Node*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, bool) @ 0x19913c10 in /workspace/clickhouse
2021.02.11 23:27:54.851147 [ 174 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:191: DB::ActionsDAG::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> >, DB::Context const&, bool) @ 0x19914752 in /workspace/clickhouse
2021.02.11 23:27:54.896728 [ 174 ] {} <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:501: 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> >) @ 0x1a118726 in /workspace/clickhouse
2021.02.11 23:27:54.939753 [ 174 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.h:155: 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> >) @ 0x1a11f720 in /workspace/clickhouse
2021.02.11 23:27:54.982863 [ 174 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:971: DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x1a11ba91 in /workspace/clickhouse
2021.02.11 23:27:55.025840 [ 174 ] {} <Fatal> BaseDaemon: 22. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:546: DB::ActionsMatcher::visit(std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x1a118a87 in /workspace/clickhouse
2021.02.11 23:27:55.068468 [ 174 ] {} <Fatal> BaseDaemon: 23. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:655: DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x1a11c3a9 in /workspace/clickhouse
2021.02.11 23:27:55.111519 [ 174 ] {} <Fatal> BaseDaemon: 24. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:550: DB::ActionsMatcher::visit(std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x1a118af3 in /workspace/clickhouse
2021.02.11 23:27:55.155074 [ 174 ] {} <Fatal> BaseDaemon: 25. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:34: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0x1a0fadb9 in /workspace/clickhouse
2021.02.11 23:27:55.197631 [ 174 ] {} <Fatal> BaseDaemon: 26. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:410: DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) @ 0x1a0edb73 in /workspace/clickhouse
2021.02.11 23:27:55.240217 [ 174 ] {} <Fatal> BaseDaemon: 27. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1108: DB::SelectQueryExpressionAnalyzer::appendSelect(DB::ExpressionActionsChain&, bool) @ 0x1a0f3bc2 in /workspace/clickhouse
2021.02.11 23:27:55.282819 [ 174 ] {} <Fatal> BaseDaemon: 28. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1492: DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterInfo> const&, DB::Block const&) @ 0x1a0f70d9 in /workspace/clickhouse
2021.02.11 23:27:55.324875 [ 174 ] {} <Fatal> BaseDaemon: 29. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:571: DB::InterpreterSelectQuery::getSampleBlockImpl() @ 0x19e64ddf in /workspace/clickhouse
2021.02.11 23:27:55.367149 [ 174 ] {} <Fatal> BaseDaemon: 30. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:465: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> 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&)::$_2::operator()(bool) const @ 0x19e614a3 in /workspace/clickhouse
2021.02.11 23:27:55.410502 [ 174 ] {} <Fatal> BaseDaemon: 31. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:468: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> 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&) @ 0x19e5dfd3 in /workspace/clickhouse
2021.02.11 23:27:55.455998 [ 174 ] {} <Fatal> BaseDaemon: 32. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:153: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, 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&) @ 0x19e5cd8c in /workspace/clickhouse
2021.02.11 23:27:55.501751 [ 174 ] {} <Fatal> BaseDaemon: 33. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068: std::__1::__unique_if<DB::InterpreterSelectQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectQuery, std::__1::shared_ptr<DB::IAST> const&, DB::Context&, DB::SelectQueryOptions&, 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::IAST> const&, DB::Context&, DB::SelectQueryOptions&, 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&) @ 0x1a14531c in /workspace/clickhouse
2021.02.11 23:27:55.545011 [ 174 ] {} <Fatal> BaseDaemon: 34. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:327: 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&) @ 0x1a142e66 in /workspace/clickhouse
2021.02.11 23:27:55.588329 [ 174 ] {} <Fatal> BaseDaemon: 35. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:249: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, 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&) @ 0x1a142771 in /workspace/clickhouse
2021.02.11 23:27:55.630135 [ 174 ] {} <Fatal> BaseDaemon: 36. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068: std::__1::__unique_if<DB::InterpreterSelectWithUnionQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectWithUnionQuery, std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&>(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&) @ 0x19de8bf7 in /workspace/clickhouse
2021.02.11 23:27:55.671825 [ 174 ] {} <Fatal> BaseDaemon: 37. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterFactory.cpp:110: DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&) @ 0x19de7375 in /workspace/clickhouse
2021.02.11 23:27:55.717561 [ 174 ] {} <Fatal> BaseDaemon: 38. ./obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:516: DB::executeQueryImpl(char const*, char const*, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) @ 0x1a35df0d in /workspace/clickhouse
2021.02.11 23:27:55.763996 [ 174 ] {} <Fatal> BaseDaemon: 39. ./obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:904: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0x1a35c7ba in /workspace/clickhouse
2021.02.11 23:27:55.816826 [ 174 ] {} <Fatal> BaseDaemon: 40. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:289: DB::TCPHandler::runImpl() @ 0x1ac90e72 in /workspace/clickhouse
2021.02.11 23:27:55.869950 [ 174 ] {} <Fatal> BaseDaemon: 41. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1492: DB::TCPHandler::run() @ 0x1ac9d278 in /workspace/clickhouse
2021.02.11 23:27:55.935125 [ 174 ] {} <Fatal> BaseDaemon: 42. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:43: Poco::Net::TCPServerConnection::start() @ 0x1e51a40c in /workspace/clickhouse
2021.02.11 23:27:55.995995 [ 174 ] {} <Fatal> BaseDaemon: 43. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:113: Poco::Net::TCPServerDispatcher::run() @ 0x1e51ac10 in /workspace/clickhouse
2021.02.11 23:27:56.059815 [ 174 ] {} <Fatal> BaseDaemon: 44. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:199: Poco::PooledThread::run() @ 0x1e657d83 in /workspace/clickhouse
2021.02.11 23:27:56.121349 [ 174 ] {} <Fatal> BaseDaemon: 45. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x1e654c0d in /workspace/clickhouse
2021.02.11 23:27:56.182788 [ 174 ] {} <Fatal> BaseDaemon: 46. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345: Poco::ThreadImpl::runnableEntry(void*) @ 0x1e653a98 in /workspace/clickhouse
2021.02.11 23:27:56.183321 [ 174 ] {} <Fatal> BaseDaemon: 47. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
2021.02.11 23:27:56.183756 [ 174 ] {} <Fatal> BaseDaemon: 48. __clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.02.11 23:27:57.183450 [ 174 ] {} <Fatal> BaseDaemon: Calculated checksum of the binary: 617B96683A882188FFA91AFB657970F2. There is no information about the reference checksum.
2021.02.11 23:28:06.267961 [ 82 ] {} <Fatal> Application: Child process was terminated by signal 6.
```
https://clickhouse-test-reports.s3.yandex.net/20344/f6cfcd4da9da90394bcdce3bb7100ed90a2c3804/fuzzer_debug/report.html#fail1 | https://github.com/ClickHouse/ClickHouse/issues/20366 | https://github.com/ClickHouse/ClickHouse/pull/20461 | 37807e1a18a3bef186b97eb845faa943fa98f537 | 8be8746643d11ddf11c52709262424b626989bf1 | "2021-02-12T09:45:29Z" | c++ | "2021-02-14T20:28:50Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,340 | ["src/IO/HTTPCommon.cpp"] | Irrelevant exception messages in clickhouse-server.log | After a replica fails to fetch a part from a host, the exception comes up every time the replica wants to download anything else from that host.
The exception seems to be just an annoying message, fetching requests are able to complete successfully.
I found this while investigating the behaviour of 'optimize_on_insert' which created a good amount of empty parts in my environment, and these parts were immediately deleted by the empty parts cleaner.
```
Host1
-- Insert an empty part
2021.02.10 20:07:02.656343 [ 13601 ] {f596ba73-bc01-4323-8f38-6e3590644100} <Debug> db.table1 (Replicated OutputStream): Wrote block with 0 rows
2021.02.10 20:07:02.681045 [ 13601 ] {f596ba73-bc01-4323-8f38-6e3590644100} <Trace> db.table1: Renaming temporary part tmp_insert_202102_34590_34590_0 to 202102_54133_54133_0.
-- Drop the empty part
2021.02.10 20:07:03.042327 [ 13614 ] {} <Trace> db.table1: Will try to insert a log entry to DROP_RANGE for part: 202102_54133_54133_0
2021.02.10 20:07:03.083379 [ 13603 ] {} <Debug> db.table1: There is no part 202102_54133_54133_0 in ZooKeeper, it was only in filesystem
-- Replica wants to download the part, but it's already deleted
2021.02.10 20:07:03.125134 [ 9274 ] {} <Trace> InterserverIOHTTPHandler-factory: HTTP Request for InterserverIOHTTPHandler-factory. Method: POST, Address: [::ffff:10.246.48.2]:51842, User-Agent: (none), Content Type: , Transfer Encoding: identity, X-Forwarded-For: (none)
2021.02.10 20:07:03.125188 [ 9274 ] {} <Trace> InterserverIOHTTPHandler: Request URI: /?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2Ftable1%2Freplicas%2Fhost1&part=202102_54133_54133_0&client_protocol_version=5&compress=false
2021.02.10 20:07:03.125198 [ 9274 ] {} <Trace> db.table1 (Replicated PartsService): Sending part 202102_54133_54133_0
2021.02.10 20:07:03.125257 [ 13609 ] {} <Warning> db.table1 (ReplicatedMergeTreePartCheckThread): Checking part 202102_54133_54133_0
2021.02.10 20:07:03.125288 [ 9274 ] {} <Error> InterserverIOHTTPHandler: Code: 232, e.displayText() = DB::Exception: No part 202102_54133_54133_0 in table, Stack trace (when copying this message, always include the lines below):
2021.02.10 20:07:03.125718 [ 13609 ] {} <Warning> db.table1 (ReplicatedMergeTreePartCheckThread): Checking if anyone has a part covering 202102_54133_54133_0.
2021.02.10 20:07:03.126727 [ 13609 ] {} <Error> db.table1 (ReplicatedMergeTreePartCheckThread): No replica has part covering 202102_54133_54133_0 and a merge is impossible: we didn't find smaller parts with either the same min block or the same max block.
2021.02.10 20:07:03.126733 [ 13609 ] {} <Error> db.table1 (ReplicatedMergeTreePartCheckThread): Missing part 202102_54133_54133_0 is not in our queue.
Host2
-- Replica wants to download the part, but it's already deleted
2021.02.10 20:07:03.052819 [ 25538 ] {} <Debug> db.table1: Fetching part 202102_54133_54133_0 from /clickhouse/tables/table1/replicas/host1
2021.02.10 20:07:03.085504 [ 25538 ] {} <Trace> ReadWriteBufferFromHTTP: Sending request to http://host1:9009/?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2Ftable1%2Freplicas%2Fhost1&part=202102_54133_54133_0&client_protocol_version=5&compress=false
2021.02.10 20:07:03.136022 [ 25538 ] {} <Error> db.table1: auto DB::StorageReplicatedMergeTree::processQueueEntry(ReplicatedMergeTreeQueue::SelectedEntryPtr)::(anonymous class)::operator()(DB::StorageReplicatedMergeTree::LogEntryPtr &) const: Code: 86, e.displayText() = DB::Exception: Received error from remote server /?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2Ftable1%2Freplicas%2Fhost1&part=202102_54133_54133_0&client_protocol_version=5&compress=false. HTTP status code: 500 Internal Server Error, body: Code: 232, e.displayText() = DB::Exception: No part 202102_54133_54133_0 in table, Stack trace (when copying this message, always include the lines below):
-- The next request to download a part from a different table reports the same exception (the table and part name in the exception are completely different)
2021.02.10 20:07:03.195136 [ 25517 ] {} <Debug> db.table2: Fetching part 202102_54658_54707_10 from /clickhouse/tables/table2/replicas/host1
2021.02.10 20:07:03.220531 [ 25517 ] {} <Trace> HTTPCommon: Failed communicating with host1 with error 'Received error from remote server /?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2Ftable1%2Freplicas%2Fhost1&part=202102_54133_54133_0&client_protocol_version=5&compress=false. HTTP status code: 500 Internal Server Error, body: Code: 232, e.displayText() = DB::Exception: No part 202102_54133_54133_0 in table, Stack trace (when copying this message, always include the lines below):
-- However the request completes successfully
2021.02.10 20:07:03.220552 [ 25517 ] {} <Trace> ReadWriteBufferFromHTTP: Sending request to http://host1:9009/?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2Ftable2%2Freplicas%2Fhost1&part=202102_54658_54707_10&client_protocol_version=5&compress=false
2021.02.10 20:07:03.372064 [ 25517 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 944.95 GiB.
2021.02.10 20:07:03.373431 [ 25517 ] {} <Trace> db.table2: Renaming temporary part tmp_fetch_202102_54658_54707_10 to 202102_54658_54707_10.
2021.02.10 20:07:03.512730 [ 25517 ] {} <Debug> db.table2: Fetched part 202102_54658_54707_10 from /clickhouse/tables/table2/replicas/host1
-- Next day, still the same irrelevant exception on the second replica
2021.02.11 15:35:03.095160 [ 25575 ] {} <Debug> db.table3: Fetching part all_180775_181336_123 from /clickhouse/tables/table3/replicas/host1
2021.02.11 15:35:03.127568 [ 25575 ] {} <Trace> HTTPCommon: Failed communicating with host1 with error 'Received error from remote server /?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2Ftable1%2Freplicas%2Fhost1&part=202102_54133_54133_0&client_protocol_version=5&compress=false. HTTP status code: 500 Internal Server Error, body: Code: 232, e.displayText() = DB::Exception: No part 202102_54133_54133_0 in table, Stack trace (when copying this message, always include the lines below):
```
The messages disappears after a restart of the replica.
| https://github.com/ClickHouse/ClickHouse/issues/20340 | https://github.com/ClickHouse/ClickHouse/pull/39222 | 8fb70abe3e54cbbfa935825fa88cf4e8caf99537 | 22bc89690d3b3681362c5c3615f285293a2bcc2e | "2021-02-11T17:17:16Z" | c++ | "2022-07-30T23:24:05Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,309 | ["src/Interpreters/HashJoin.cpp", "src/Interpreters/TableJoin.cpp", "src/Interpreters/TableJoin.h", "src/Storages/StorageJoin.cpp", "tests/queries/0_stateless/00118_storage_join.reference", "tests/queries/0_stateless/00118_storage_join.sql", "tests/queries/0_stateless/00119_storage_join.sql"] | StorageJoin and with equals column names | If name of key column equals in both tables in Storage Join `JOIN ON` trows an error:
```
:) CREATE TABLE t1 (x String) ENGINE = TinyLog;
:) CREATE TABLE t2 (x String) ENGINE = Join(ALL, INNER, x);
:) select * from t1 join t2 USING(x);
Ok.
0 rows in set. Elapsed: 0.036 sec.
:) select * from t1 join t2 ON (t1.x == t2.x);
0 rows in set. Elapsed: 0.026 sec.
Received exception from server (version 21.3.1):
Code: 8. DB::Exception: Received from localhost:9000. DB::Exception: Cannot find column `t2.x` in source stream.
```
If secondary column name match we tables cannot be joined with `USING` too:
```
:) CREATE TABLE t1 (x String, y String) ENGINE = TinyLog;
:) CREATE TABLE t2 (x String, y String) ENGINE = Join(ALL, INNER, x);
:) select * from t1 join t2 USING(x);
0 rows in set. Elapsed: 0.027 sec.
Received exception from server (version 21.3.1):
Code: 8. DB::Exception: Received from localhost:9000. DB::Exception: Cannot find column `t2.y` in source stream.
``` | https://github.com/ClickHouse/ClickHouse/issues/20309 | https://github.com/ClickHouse/ClickHouse/pull/23769 | c7bd3b8674db4971383779f37ca9084a7cbfe63b | f51ecf8a72ee9389d70685e57b43152ff9499685 | "2021-02-11T07:05:02Z" | c++ | "2021-06-01T11:42:49Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,304 | ["src/Storages/MergeTree/MergeTreeBlockOutputStream.cpp", "src/Storages/MergeTree/MergeTreeDataWriter.cpp", "src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp", "tests/integration/test_optimize_on_insert/__init__.py", "tests/integration/test_optimize_on_insert/test.py", "tests/queries/0_stateless/01560_optimize_on_insert.reference", "tests/queries/0_stateless/01560_optimize_on_insert.sql", "tests/queries/0_stateless/01560_optimize_on_insert_zookeeper.reference", "tests/queries/0_stateless/01560_optimize_on_insert_zookeeper.sql", "tests/queries/skip_list.json"] | optimize_on_insert creates empty parts | It would be great if `optimize_on_insert` was smart enough to discard empty blocks
```
create table empty (num Int8) engine=Memory;
CREATE MATERIALIZED VIEW empty_mv
(
`num` Int8
)
ENGINE = SummingMergeTree
ORDER BY tuple() AS
SELECT num
FROM empty;
-- First insert
set optimize_on_insert=1;
insert into empty values (0);
-- 20 minutes break
set optimize_on_insert=0;
insert into empty values (0);
-- Created parts
SELECT
event_type,
event_time,
table,
part_name,
rows
FROM system.part_log
PREWHERE (event_date = today()) AND (table LIKE '%empty%')
ORDER BY event_time ASC
FORMAT PrettyCompactMonoBlock
โโevent_typeโโฌโโโโโโโโโโevent_timeโโฌโtableโโโโโโโโโโโโฌโpart_nameโโฌโrowsโโ
โ NewPart โ 2021-02-10 21:27:40 โ .inner.empty_mv โ all_1_1_0 โ 0 โ
โ RemovePart โ 2021-02-10 21:27:42 โ .inner.empty_mv โ all_1_1_0 โ 0 โ
โ NewPart โ 2021-02-10 21:46:42 โ .inner.empty_mv โ all_2_2_0 โ 1 โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโ
``` | https://github.com/ClickHouse/ClickHouse/issues/20304 | https://github.com/ClickHouse/ClickHouse/pull/20387 | 1b2ed51ff5e4a3dc45567d4967108f43f680c884 | 8fd3fbc5b3e9f18831228f660b88997766996db3 | "2021-02-10T21:53:36Z" | c++ | "2021-03-16T07:20:34Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,283 | ["src/Functions/FunctionBinaryArithmetic.h", "tests/queries/0_stateless/01711_decimal_multiplication.reference", "tests/queries/0_stateless/01711_decimal_multiplication.sql"] | wrong toDecimalX minus result | I've been studying basic usage and I found wrong minus result on DecimalXX type.
**Example Query**
`
select toDecimal64(4,4) - toDecimal32(2,2)
`
**Expected output**
2.0000
**Actual output**
3.9800
Is there anything wrong or maybe my misunderstanding of toDecimal ?

**How to reproduce**
1. OS: macOS Catalina 10.15.5
2. server: clickhouse-server, built from source, version 21.3.1.1
3. client: clickhouse-client, built from source, version 21.3.1.1
| https://github.com/ClickHouse/ClickHouse/issues/20283 | https://github.com/ClickHouse/ClickHouse/pull/20339 | e141367bcfa72a6b25de78dbc7f038d7285bf820 | 9aadbde86c7c8c216cbd14b6a2eae54c568905f2 | "2021-02-10T13:18:58Z" | c++ | "2021-02-12T09:32:58Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,259 | ["src/Storages/MergeTree/MergeTreeDataPartWriterWide.cpp", "tests/queries/0_stateless/01712_no_adaptive_granularity_vertical_merge.reference", "tests/queries/0_stateless/01712_no_adaptive_granularity_vertical_merge.sql"] | 21.2 DB::Exception: Incomplete granules are not allowed while blocks are granules size | I ran an optimize on 21.2, and the merge kept failing.
```
2021.02.09 14:38:06.519295 [ 14569 ] {} <Trace> db.table: Executing log entry to merge parts all_0_91343_4396, all_91344_91581_59, all_91582_91582_0, all_91583_91583_0, all_91584_91584_0 to all_0_91584_4397
2021.02.09 14:38:06.519361 [ 14569 ] {} <Debug> DiskLocal: Reserving 93.94 MiB on disk `default`, having unreserved 445.19 GiB.
2021.02.09 14:38:06.519377 [ 14569 ] {} <Debug> db.table (MergerMutator): Merging 5 parts: from all_0_91343_4396 to all_91584_91584_0 into Wide
2021.02.09 14:38:06.519408 [ 14569 ] {} <Debug> db.table (MergerMutator): Selected MergeAlgorithm: Vertical
2021.02.09 14:38:06.519506 [ 14569 ] {} <Trace> MergeTreeSequentialSource: Reading 178 marks from part all_0_91343_4396, total 1452977 rows starting from the beginning of the part, column ap_key
2021.02.09 14:38:06.519573 [ 14569 ] {} <Trace> MergeTreeSequentialSource: Reading 1 marks from part all_91344_91581_59, total 1654 rows starting from the beginning of the part, column ap_key
2021.02.09 14:38:06.519644 [ 14569 ] {} <Trace> MergeTreeSequentialSource: Reading 1 marks from part all_91582_91582_0, total 6 rows starting from the beginning of the part, column ap_key
2021.02.09 14:38:06.519705 [ 14569 ] {} <Trace> MergeTreeSequentialSource: Reading 1 marks from part all_91583_91583_0, total 6 rows starting from the beginning of the part, column ap_key
2021.02.09 14:38:06.519787 [ 14569 ] {} <Trace> MergeTreeSequentialSource: Reading 1 marks from part all_91584_91584_0, total 10 rows starting from the beginning of the part, column ap_key
2021.02.09 14:38:06.521671 [ 14569 ] {} <Debug> MemoryTracker: Peak memory usage: 4.07 MiB.
2021.02.09 14:38:06.521756 [ 14569 ] {} <Error> db.table: auto DB::StorageReplicatedMergeTree::processQueueEntry(ReplicatedMergeTreeQueue::SelectedEntryPtr)::(anonymous class)::operator()(DB::StorageReplicatedMergeTree::LogEntryPtr &) const: Code: 49, e.displayText() = DB::Exception: Incomplete granules are not allowed while blocks are granules size. Mark number 0 (rows 8192), rows written in last mark 0, rows to write in last mark from block 8180 (from row 0), total marks currently 1, Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception<unsigned long&, unsigned long, unsigned long&, unsigned long&, unsigned long&, unsigned long>(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&, unsigned long&&, unsigned long&, unsigned long&, unsigned long&, unsigned long&&) @ 0xf3b8fd5 in /usr/bin/clickhouse
1. DB::MergeTreeDataPartWriterWide::shiftCurrentMark(std::__1::vector<DB::Granule, std::__1::allocator<DB::Granule> > const&) @ 0xf3b8ecd in /usr/bin/clickhouse
2. DB::MergeTreeDataPartWriterWide::write(DB::Block const&, DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const*) @ 0xf3b997f in /usr/bin/clickhouse
3. DB::MergeTreeDataMergerMutator::mergePartsToTemporaryPart(DB::FutureMergedMutatedPart const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, DB::BackgroundProcessListEntry<DB::MergeListElement, DB::MergeInfo>&, std::__1::shared_ptr<DB::RWLockImpl::LockHolderImpl>&, long, DB::Context const&, std::__1::unique_ptr<DB::IReservation, std::__1::default_delete<DB::IReservation> > const&, bool, 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&) @ 0xf373c39 in /usr/bin/clickhouse
4. DB::StorageReplicatedMergeTree::tryExecuteMerge(DB::ReplicatedMergeTreeLogEntry const&) @ 0xf155cd8 in /usr/bin/clickhouse
5. DB::StorageReplicatedMergeTree::executeLogEntry(DB::ReplicatedMergeTreeLogEntry&) @ 0xf14abc3 in /usr/bin/clickhouse
6. ? @ 0xf1bac7f in /usr/bin/clickhouse
7. DB::ReplicatedMergeTreeQueue::processEntry(std::__1::function<std::__1::shared_ptr<zkutil::ZooKeeper> ()>, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&, std::__1::function<bool (std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&)>) @ 0xf4c8428 in /usr/bin/clickhouse
8. DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>) @ 0xf17446d in /usr/bin/clickhouse
9. ? @ 0xf2cb076 in /usr/bin/clickhouse
10. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x8513fb8 in /usr/bin/clickhouse
11. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(void&&, void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()&&...)::'lambda'()::operator()() @ 0x8515f6f in /usr/bin/clickhouse
12. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x851158f in /usr/bin/clickhouse
13. ? @ 0x8515023 in /usr/bin/clickhouse
14. start_thread @ 0x74a4 in /lib/x86_64-linux-gnu/libpthread-2.24.so
15. __clone @ 0xe8d0f in /lib/x86_64-linux-gnu/libc-2.24.so
(version 21.2.2.8 (official build))
```
I stopped merges for this table, but the postponer kept generating the same exception:
```
2021.02.09 15:29:12.019727 [ 14586 ] {} <Error> auto DB::IBackgroundJobExecutor::jobExecutingTask()::(anonymous class)::operator()() const: Code: 49, e.displayText() = DB::Exception: Incomplete granules are not allowed while blocks are granules size. Mark number 0 (rows 8192), rows written in last mark 0, rows to write in last mark from block 2540 (from row 0), total marks currently 1, Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception<unsigned long&, unsigned long, unsigned long&, unsigned long&, unsigned long&, unsigned long>(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&, unsigned long&&, unsigned long&, unsigned long&, unsigned long&, unsigned long&&) @ 0xf3b8fd5 in /usr/bin/clickhouse
1. DB::MergeTreeDataPartWriterWide::shiftCurrentMark(std::__1::vector<DB::Granule, std::__1::allocator<DB::Granule> > const&) @ 0xf3b8ecd in /usr/bin/clickhouse
2. DB::MergeTreeDataPartWriterWide::write(DB::Block const&, DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const*) @ 0xf3b997f in /usr/bin/clickhouse
3. DB::MergeTreeDataMergerMutator::mergePartsToTemporaryPart(DB::FutureMergedMutatedPart const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, DB::BackgroundProcessListEntry<DB::MergeListElement, DB::MergeInfo>&, std::__1::shared_ptr<DB::RWLockImpl::LockHolderImpl>&, long, DB::Context const&, std::__1::unique_ptr<DB::IReservation, std::__1::default_delete<DB::IReservation> > const&, bool, 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&) @ 0xf373c39 in /usr/bin/clickhouse
4. DB::StorageMergeTree::mergeSelectedParts(std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, 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&, DB::StorageMergeTree::MergeMutateSelectedEntry&, std::__1::shared_ptr<DB::RWLockImpl::LockHolderImpl>&) @ 0xf10f108 in /usr/bin/clickhouse
5. ? @ 0xf12168c in /usr/bin/clickhouse
6. ? @ 0xf2cb076 in /usr/bin/clickhouse
7. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x8513fb8 in /usr/bin/clickhouse
8. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(void&&, void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()&&...)::'lambda'()::operator()() @ 0x8515f6f in /usr/bin/clickhouse
9. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x851158f in /usr/bin/clickhouse
10. ? @ 0x8515023 in /usr/bin/clickhouse
11. start_thread @ 0x74a4 in /lib/x86_64-linux-gnu/libpthread-2.24.so
12. __clone @ 0xe8d0f in /lib/x86_64-linux-gnu/libc-2.24.so
(version 21.2.2.8 (official build))
```
After a downgrade to 20.12 the merge completed successfully. | https://github.com/ClickHouse/ClickHouse/issues/20259 | https://github.com/ClickHouse/ClickHouse/pull/20279 | c2bb2c29024bac86be4c34ffbece61031c120e0a | 121c5c96053ca07cdc9eca1f9458022400df3e22 | "2021-02-09T18:11:15Z" | c++ | "2021-02-11T07:57:07Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,253 | ["docs/en/operations/external-authenticators/ldap.md", "programs/server/config.xml", "src/Access/ExternalAuthenticators.cpp", "src/Access/ExternalAuthenticators.h", "src/Access/LDAPAccessStorage.cpp", "src/Access/LDAPAccessStorage.h", "src/Access/LDAPClient.cpp", "src/Access/LDAPClient.h", "tests/testflows/ldap/role_mapping/tests/user_dn_detection.py", "tests/testflows/regression.py"] | Use service account for LDAP | **Use case**
In some organisations are using AD with hierarchical structure (nested organisation unit) and DN follow this structure. As result we can not use permanent build_dn for users with different OU.
**Describe the solution you'd like**
Solution can be look like:
1) bind as service account
2) set dn for user_name by some filter string to user_dn
3) bind as user_dn with password
3) use user_dn with filter for group/roles fetching
This approach is implemented in Metabase.
| https://github.com/ClickHouse/ClickHouse/issues/20253 | https://github.com/ClickHouse/ClickHouse/pull/22228 | ce48ad2434a5256bca5514f882dce1905d40f019 | ce1c947f25abcc53777d2e09c051101a8865f178 | "2021-02-09T17:23:28Z" | c++ | "2021-05-19T07:34:47Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,244 | ["src/DataTypes/Serializations/SerializationNullable.cpp", "tests/queries/0_stateless/01786_nullable_string_tsv_at_eof.reference", "tests/queries/0_stateless/01786_nullable_string_tsv_at_eof.sh"] | "Unexpected end of stream" with text formats without new line at the end | *Update by @alexey-milovidov: to fix the issue, set `input_format_null_as_default` to 0 as it was in older versions.*
---
Clickhouse reports this when external dictionary not ends with "\n" and last column is empty:
```
root@clickhouse1:~# cat ~/passwd
metrika:x:1000:1000::/home/metrika:/bin/bash
clickhouse:x:106:108:Clickhouse server,,,:/nonexistent:
```
remove "\n" at the end of file, and then run query from documentation
```
# cat ~/passwd | sed 's/:/\t/g' | clickhouse-client --query="SELECT shell, count() AS c FROM passwd GROUP BY shell ORDER BY c DESC" --external --file=- --name=passwd --structure='login String, unused String, uid UInt16, gid UInt16, comment String, home String, shell String'
Code: 33, e.displayText() = DB::ParsingException: Unexpected end of stream, while parsing value of Nullable type: (at row 2)
: Buffer has gone, cannot extract information about what has been parsed., Stack trace (when copying this message, always include the lines below):
0. DB::ParsingException::ParsingException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x84dad27 in /usr/bin/clickhouse
1. bool DB::DataTypeNullable::deserializeTextEscaped<bool>(DB::IColumn&, DB::ReadBuffer&, DB::FormatSettings const&, std::__1::shared_ptr<DB::IDataType const> const&) @ 0xe74d65f in /usr/bin/clickhouse
2. DB::TabSeparatedRowInputFormat::readRow(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, DB::RowReadExtension&) @ 0xf71dae9 in /usr/bin/clickhouse
3. DB::IRowInputFormat::generate() @ 0xf6904e8 in /usr/bin/clickhouse
4. DB::ISource::tryGenerate() @ 0xf61e8f5 in /usr/bin/clickhouse
5. DB::ISource::work() @ 0xf61e60a in /usr/bin/clickhouse
6. DB::ParallelParsingInputFormat::InternalParser::getChunk() @ 0xf6e6bee in /usr/bin/clickhouse
7. DB::ParallelParsingInputFormat::parserThreadFunction(std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) @ 0xf6e624e in /usr/bin/clickhouse
8. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x8513fb8 in /usr/bin/clickhouse
9. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(void&&, void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()&&...)::'lambda'()::operator()() @ 0x8515f6f in /usr/bin/clickhouse
10. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x851158f in /usr/bin/clickhouse
11. ? @ 0x8515023 in /usr/bin/clickhouse
12. start_thread @ 0x76ba in /lib/x86_64-linux-gnu/libpthread-2.23.so
13. clone @ 0x10741d in /lib/x86_64-linux-gnu/libc-2.23.so
(version 21.2.2.8 (official build))
Code: 33, e.displayText() = DB::ParsingException: Unexpected end of stream, while parsing value of Nullable type: (at row 2)
: Buffer has gone, cannot extract information about what has been parsed., Stack trace (when copying this message, always include the lines below):
0. DB::ParsingException::ParsingException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x84dad27 in /usr/bin/clickhouse
1. bool DB::DataTypeNullable::deserializeTextEscaped<bool>(DB::IColumn&, DB::ReadBuffer&, DB::FormatSettings const&, std::__1::shared_ptr<DB::IDataType const> const&) @ 0xe74d65f in /usr/bin/clickhouse
2. DB::TabSeparatedRowInputFormat::readRow(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, DB::RowReadExtension&) @ 0xf71dae9 in /usr/bin/clickhouse
3. DB::IRowInputFormat::generate() @ 0xf6904e8 in /usr/bin/clickhouse
4. DB::ISource::tryGenerate() @ 0xf61e8f5 in /usr/bin/clickhouse
5. DB::ISource::work() @ 0xf61e60a in /usr/bin/clickhouse
6. DB::ParallelParsingInputFormat::InternalParser::getChunk() @ 0xf6e6bee in /usr/bin/clickhouse
7. DB::ParallelParsingInputFormat::parserThreadFunction(std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) @ 0xf6e624e in /usr/bin/clickhouse
8. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x8513fb8 in /usr/bin/clickhouse
9. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(void&&, void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()&&...)::'lambda'()::operator()() @ 0x8515f6f in /usr/bin/clickhouse
10. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x851158f in /usr/bin/clickhouse
11. ? @ 0x8515023 in /usr/bin/clickhouse
12. start_thread @ 0x76ba in /lib/x86_64-linux-gnu/libpthread-2.23.so
13. clone @ 0x10741d in /lib/x86_64-linux-gnu/libc-2.23.so
(version 21.2.2.8 (official build))
Code: 33. DB::ParsingException: Unexpected end of stream, while parsing value of Nullable type: (at row 2)
: Buffer has gone, cannot extract information about what has been parsed.: While executing SourceFromInputStream
```
| https://github.com/ClickHouse/ClickHouse/issues/20244 | https://github.com/ClickHouse/ClickHouse/pull/22527 | 687d1e9b548c281006bfdf4551a2d5754a14c8e5 | 143f4b59a00747415931b9eef64f51b17740914b | "2021-02-09T13:21:11Z" | c++ | "2021-04-03T09:51:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,242 | ["src/Processors/DelayedPortsProcessor.cpp"] | Logical error: Pipeline stuck | https://clickhouse-test-reports.s3.yandex.net/16193/5e0cbfe9720a56faad57d4c73a3abbea638d7ca8/fuzzer_debug/report.html#fail1
```
:) set joined_subquery_requires_alias=0
:) set any_join_distinct_right_table_keys=1
:) SELECT a FROM (SELECT 0 AS a) ANY FULL OUTER JOIN (SELECT 2 AS a, NULL AS b) USING (a) WHERE (b = -2) = 1025
SELECT a
FROM
(
SELECT 0 AS a
)
ANY FULL OUTER JOIN
(
SELECT
2 AS a,
NULL AS b
) USING (a)
WHERE (b = -2) = 1025
Query id: 293e7e06-d31c-4a7e-af78-5577ee6043ef
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.301098 [ 15692 ] {293e7e06-d31c-4a7e-af78-5577ee6043ef} <Fatal> : Logical error: 'Pipeline stuck. Current state:
digraph
{
rankdir="LR";
{ node [shape = box]
n139693730399768[label="SourceFromSingleChunk(1 jobs, execution time: 0 sec., preparation time: 0.000008069 sec.) (PortFull)"];
n139693730472344[label="ExpressionTransform(1 jobs, execution time: 0 sec., preparation time: 0.000022163 sec.) (PortFull)"];
n139693730402328[label="SourceFromSingleChunk(2 jobs, execution time: 0 sec., preparation time: 0.000013782 sec.) (Finished)"];
n139693730472664[label="JoiningTransform(1 jobs, execution time: 0 sec., preparation time: 0.000011344 sec.) (PortFull)"];
n139693730472984[label="JoiningTransform(1 jobs, execution time: 0 sec., preparation time: 0.000011328 sec.) (Finished)"];
n139693729984920[label="SourceFromInputStream(1 jobs, execution time: 0 sec., preparation time: 0.000003341 sec.) (Finished)"];
n139693730174520[label="DelayedPorts(0 jobs, execution time: 0 sec., preparation time: 0.000007431 sec.) (Finished)"];
n139693730473304[label="Resize(0 jobs, execution time: 0 sec., preparation time: 0.000036154 sec.) (Finished)"];
n139693730366808[label="FilterTransform(0 jobs, execution time: 0 sec., preparation time: 0.000005212 sec.) (Finished)"];
n139693730368600[label="FilterTransform(0 jobs, execution time: 0 sec., preparation time: 0.000004699 sec.) (Finished)"];
n139693730369048[label="FilterTransform(0 jobs, execution time: 0 sec., preparation time: 0.000006876 sec.) (Finished)"];
n139693730473624[label="ExpressionTransform(0 jobs, execution time: 0 sec., preparation time: 0.00000702 sec.) (Finished)"];
n139693730473944[label="ExpressionTransform(0 jobs, execution time: 0 sec., preparation time: 0.000006159 sec.) (Finished)"];
n139693730474264[label="ExpressionTransform(0 jobs, execution time: 0 sec., preparation time: 0.000006023 sec.) (Finished)"];
n139693730401304[label="SourceFromSingleChunk(2 jobs, execution time: 0 sec., preparation time: 0.000027631 sec.) (Finished)"];
n139693730474904[label="ExpressionTransform(1 jobs, execution time: 0 sec., preparation time: 0.000016417 sec.) (Finished)"];
n139693730297112[label="CreatingSetsTransform(2 jobs, execution time: 0 sec., preparation time: 0.000018637 sec.) (Finished)"];
n139693730174072[label="DelayedPorts(0 jobs, execution time: 0 sec., preparation time: 0.000020356 sec.) (Finished)"];
n139693730474584[label="ExpressionTransform(0 jobs, execution time: 0 sec., preparation time: 0.000006359 sec.) (Finished)"];
n139693730475224[label="ExpressionTransform(0 jobs, execution time: 0 sec., preparation time: 0.000006292 sec.) (Finished)"];
n139693730475544[label="ExpressionTransform(0 jobs, execution time: 0 sec., preparation time: 0.000005804 sec.) (Finished)"];
n139693730471704[label="Resize(0 jobs, execution time: 0 sec., preparation time: 0.000032733 sec.) (Finished)"];
n139693730367704[label="LimitsCheckingTransform(0 jobs, execution time: 0 sec., preparation time: 0.000008458 sec.) (Finished)"];
n139693730365912[label="LimitsCheckingTransform(0 jobs, execution time: 0 sec., preparation time: 0.000005878 sec.) (Finished)"];
n139693730174296[label="NullSource(1 jobs, execution time: 0 sec., preparation time: 0.000004108 sec.) (Finished)"];
n139693730489880[label="LazyOutputFormat(1 jobs, execution time: 0 sec., preparation time: 0.000014797 sec.) (Finished)"];
}
n139693730399768 -> n139693730472344;
n139693730472344 -> n139693730472664;
n139693730402328 -> n139693730472984;
n139693730472664 -> n139693730174520;
n139693730472984 -> n139693730369048;
n139693729984920 -> n139693730174520;
n139693730174520 -> n139693730473304;
n139693730174520 -> n139693730473304;
n139693730473304 -> n139693730366808;
n139693730473304 -> n139693730368600;
n139693730366808 -> n139693730473624;
n139693730368600 -> n139693730473944;
n139693730369048 -> n139693730474264;
n139693730473624 -> n139693730174072;
n139693730473944 -> n139693730174072;
n139693730474264 -> n139693730475544;
n139693730401304 -> n139693730474904;
n139693730474904 -> n139693730297112;
n139693730297112 -> n139693730174072;
n139693730174072 -> n139693730474584;
n139693730174072 -> n139693730475224;
n139693730474584 -> n139693730471704;
n139693730475224 -> n139693730471704;
n139693730475544 -> n139693730365912;
n139693730471704 -> n139693730367704;
n139693730367704 -> n139693730489880;
n139693730365912 -> n139693730489880;
n139693730174296 -> n139693730489880;
}
'.
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.303373 [ 15727 ] <Fatal> BaseDaemon: ########################################
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.303770 [ 15727 ] <Fatal> BaseDaemon: (version 21.3.1.1, build id: 978B4959D61159DF4B0294F201F36881D789CC29) (from thread 15692) (query_id: 293e7e06-d31c-4a7e-af78-5577ee6043ef) Received signal Aborted (6)
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.304054 [ 15727 ] <Fatal> BaseDaemon:
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.304356 [ 15727 ] <Fatal> BaseDaemon: Stack trace: 0x7f0dd158e18b 0x7f0dd156d859 0x86c2686 0x86c2743 0x11f16086 0x11f15391 0x11f2c970 0x11f2c8a6 0x11f2c82d 0x11f2c7f1 0x11f2c732 0x11f2c63c 0x11f2c56d 0x11f2c53d 0x11f2c515 0x11f2c4f0 0x86fe4f9 0x86fd815 0x873e03e 0x8745464 0x87453ed 0x8745345 0x8744d12 0x7f0dd1743609 0x7f0dd166a103
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.304870 [ 15727 ] <Fatal> BaseDaemon: 4. /build/glibc-YYA7BZ/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51: __GI_raise @ 0x4618b in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.305205 [ 15727 ] <Fatal> BaseDaemon: 5. /build/glibc-YYA7BZ/glibc-2.31/stdlib/abort.c:81: __GI_abort @ 0x25859 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.305774 [ 15727 ] <Fatal> BaseDaemon: 6. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Common/Exception.cpp:50: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x86c2686 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.306322 [ 15727 ] <Fatal> BaseDaemon: 7. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Common/Exception.cpp:57: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x86c2743 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.361183 [ 15727 ] <Fatal> BaseDaemon: 8. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Processors/Executors/PipelineExecutor.cpp:461: DB::PipelineExecutor::finalizeExecution() @ 0x11f16086 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.412905 [ 15727 ] <Fatal> BaseDaemon: 9. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Processors/Executors/PipelineExecutor.cpp:416: DB::PipelineExecutor::execute(unsigned long) @ 0x11f15391 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.464001 [ 15727 ] <Fatal> BaseDaemon: 10. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:79: DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) @ 0x11f2c970 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.516198 [ 15727 ] <Fatal> BaseDaemon: 11. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:102: DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const @ 0x11f2c8a6 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.568085 [ 15727 ] <Fatal> BaseDaemon: 12. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/type_traits:3682: decltype(std::__1::forward<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&) @ 0x11f2c82d in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.619592 [ 15727 ] <Fatal> BaseDaemon: 13. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/tuple:1415: 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<>) @ 0x11f2c7f1 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.670825 [ 15727 ] <Fatal> BaseDaemon: 14. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/tuple:1424: 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<>&) @ 0x11f2c732 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.722027 [ 15727 ] <Fatal> BaseDaemon: 15. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Common/ThreadPool.h:178: ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()::operator()() @ 0x11f2c63c in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.773216 [ 15727 ] <Fatal> BaseDaemon: 16. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<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&&) @ 0x11f2c56d in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.825010 [ 15727 ] <Fatal> BaseDaemon: 17. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/__functional_base:349: void std::__1::__invoke_void_return_wrapper<void>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<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&&...) @ 0x11f2c53d in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.877192 [ 15727 ] <Fatal> BaseDaemon: 18. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/functional:1608: std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>::operator()() @ 0x11f2c515 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.929448 [ 15727 ] <Fatal> BaseDaemon: 19. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/functional:2089: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x11f2c4f0 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.930293 [ 15727 ] <Fatal> BaseDaemon: 20. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/functional:2221: std::__1::__function::__policy_func<void ()>::operator()() const @ 0x86fe4f9 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.931261 [ 15727 ] <Fatal> BaseDaemon: 21. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/functional:2560: std::__1::function<void ()>::operator()() const @ 0x86fd815 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.932236 [ 15727 ] <Fatal> BaseDaemon: 22. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Common/ThreadPool.cpp:247: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x873e03e in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.933582 [ 15727 ] <Fatal> BaseDaemon: 23. /home/avtokmakov/ch/ClickHouse/build_debug/../src/Common/ThreadPool.cpp:124: void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()::operator()() const @ 0x8745464 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.935088 [ 15727 ] <Fatal> BaseDaemon: 24. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<void>(fp)(std::__1::forward<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(fp0)...)) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(void&&, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()&&...) @ 0x87453ed in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.936210 [ 15727 ] <Fatal> BaseDaemon: 25. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/thread:281: 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>)::'lambda1'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>&, std::__1::__tuple_indices<>) @ 0x8745345 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.937593 [ 15727 ] <Fatal> BaseDaemon: 26. /home/avtokmakov/ch/ClickHouse/build_debug/../contrib/libcxx/include/thread:291: 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>)::'lambda1'()> >(void*) @ 0x8744d12 in /home/avtokmakov/ch/ClickHouse/build_debug/programs/clickhouse
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.938261 [ 15727 ] <Fatal> BaseDaemon: 27. start_thread @ 0x9609 in /lib/x86_64-linux-gnu/libpthread-2.31.so
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:53.939147 [ 15727 ] <Fatal> BaseDaemon: 28. /build/glibc-YYA7BZ/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97: __clone @ 0x122103 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
[avtokmakov-dev.sas.yp-c.yandex.net] 2021.02.09 14:54:56.063432 [ 15727 ] <Fatal> BaseDaemon: Calculated checksum of the binary: 343AB058AFFB230B19EE37B5D4E5175E. There is no information about the reference checksum.
``` | https://github.com/ClickHouse/ClickHouse/issues/20242 | https://github.com/ClickHouse/ClickHouse/pull/20251 | 1fdc59b453ab851269b3d32bc18c764d1d2cd2d2 | 253c72afc4a144182577094703d0457e89500045 | "2021-02-09T11:56:24Z" | c++ | "2021-02-10T09:28:28Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,221 | ["contrib/libunwind"] | on aarch64 Huawei server build v21.3.1.5944-testing run the clickhouse got core file | **build step:**
step 1.
-------------
export CC=/usr/local/bin/gcc;export CXX=/usr/local/bin/g++;rm -rf build;mkdir -p build && cd build;cmake .. -DCMAKE_INSTALL_PREFIX=/opt/clickhouse
step 2.
-------------
changed๏ผ
vim /data/ClickHouse/base/glibc-compatibility/musl/eventfd.c
int eventfd(/*unsigned*/ int count, int flags)
{
int r = __syscall(SYS_eventfd2, count, flags);
#ifdef SYS_eventfd
if (r==-ENOSYS && !flags) r = __syscall(SYS_eventfd, count);
#endif
return __syscall_ret(r);
}
step 3
-------------
changed๏ผ
vim contrib/jemalloc-cmake/include_linux_aarch64/jemalloc/internal/jemalloc_internal_defs.h
//#define JEMALLOC_PURGE_MADVISE_FREE
#define JEMALLOC_PURGE_MADVISE_DONTNEED
#define JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS
step 4
-------------
./bin/clickhouse-server --config-file=etc/clickhouse-server/config.xml
step 5
--------------
Processing configuration file 'etc/clickhouse-server/config.xml'.
Logging trace to /var/log/clickhouse-server/clickhouse-server.log
Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log
Logging trace to console
2021.02.09 13:14:42.117937 [ 117172 ] {} <Information> SentryWriter: Sending crash reports is disabled
2021.02.09 13:14:42.120918 [ 117172 ] {} <Trace> Pipe: Pipe capacity is 1.00 MiB
2021.02.09 13:14:42.214731 [ 117172 ] {} <Information> : Starting ClickHouse 21.3.1.1 with revision 54448, build id: 96BC388501F70EA5A53B98F28B6B4A97F94F9380, PID 117172
2021.02.09 13:14:42.214860 [ 117172 ] {} <Information> Application: starting up
2021.02.09 13:14:42.449073 [ 117172 ] {} <Warning> Application: Calculated checksum of the binary: 24083C5588FACF0D276F95CDC4AADED9. There is no information about the reference checksum.
2021.02.09 13:14:42.450483 [ 117172 ] {} <Trace> Application: Will do mlock to prevent executable memory from being paged out. It may take a few seconds.
2021.02.09 13:14:42.452271 [ 117172 ] {} <Trace> Application: The memory map of clickhouse executable has been mlock'ed, total 121.06 MiB
2021.02.09 13:14:42.453179 [ 117172 ] {} <Information> StatusFile: Status file /var/lib/clickhouse/status already exists - unclean restart. Contents:
PID: 115442
Started at: 2021-02-09 11:46:20
Revision: 54448
2021.02.09 13:14:42.453256 [ 117172 ] {} <Debug> Application: rlimit on number of file descriptors is 65535
2021.02.09 13:14:42.453274 [ 117172 ] {} <Debug> Application: Initializing DateLUT.
2021.02.09 13:14:42.453289 [ 117172 ] {} <Trace> Application: Initialized DateLUT with time zone 'Asia/Shanghai'.
2021.02.09 13:14:42.453321 [ 117172 ] {} <Debug> Application: Setting up /var/lib/clickhouse/tmp/ to store temporary data in it
2021.02.09 13:14:42.453581 [ 117172 ] {} <Debug> Application: Configuration parameter 'interserver_http_host' doesn't exist or exists and empty. Will use 'node1' as replica host.
2021.02.09 13:14:42.453730 [ 117172 ] {} <Information> SensitiveDataMaskerConfigRead: 1 query masking rules loaded.
2021.02.09 13:14:42.454817 [ 117172 ] {} <Debug> ConfigReloader: Loading config 'etc/clickhouse-server/users.xml'
Processing configuration file 'etc/clickhouse-server/users.xml'.
Saved preprocessed configuration to '/var/lib/clickhouse/preprocessed_configs/users.xml'.
2021.02.09 13:14:42.455469 [ 117172 ] {} <Debug> ConfigReloader: Loaded config 'etc/clickhouse-server/users.xml', performing update on configuration
2021.02.09 13:14:42.456070 [ 117172 ] {} <Debug> ConfigReloader: Loaded config 'etc/clickhouse-server/users.xml', performed update on configuration
2021.02.09 13:14:42.456671 [ 117172 ] {} <Debug> Access(user directories): Added users.xml access storage 'users.xml', path: etc/clickhouse-server/users.xml
2021.02.09 13:14:42.458964 [ 117172 ] {} <Debug> Access(user directories): Added local directory access storage 'local directory', path: /var/lib/clickhouse/access/
2021.02.09 13:14:42.459323 [ 117172 ] {} <Information> Application: Loading metadata from /var/lib/clickhouse/
2021.02.09 13:14:42.497132 [ 117172 ] {} <Information> DatabaseOrdinary (system): Total 3 tables and 0 dictionaries.
2021.02.09 13:14:42.502960 [ 117179 ] {} <Debug> system.metric_log_0: Loading data parts
2021.02.09 13:14:42.503034 [ 117180 ] {} <Debug> system.crash_log: Loading data parts
2021.02.09 13:14:42.503443 [ 117180 ] {} <Debug> system.crash_log: Loaded data parts (0 items)
2021.02.09 13:14:42.503950 [ 117178 ] {} <Debug> system.metric_log: Loading data parts
2021.02.09 13:14:42.504017 [ 117178 ] {} <Debug> system.metric_log: Loaded data parts (0 items)
2021.02.09 13:14:42.525825 [ 117179 ] {} <Debug> system.metric_log_0: Loaded data parts (3 items)
2021.02.09 13:14:42.526041 [ 117172 ] {} <Information> DatabaseOrdinary (system): Starting up tables.
2021.02.09 13:14:42.526146 [ 117180 ] {} <Information> BackgroundSchedulePool/BgSchPool: Create BackgroundSchedulePool with 16 threads
2021.02.09 13:14:42.526718 [ 117185 ] {} <Debug> system.metric_log_0 (MergerMutator): Selected 3 parts from 202009_1_21_4 to 202009_23_23_0
2021.02.09 13:14:42.526814 [ 117185 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 51.72 GiB.
2021.02.09 13:14:42.527006 [ 117191 ] {} <Debug> system.metric_log_0 (MergerMutator): Merging 3 parts: from 202009_1_21_4 to 202009_23_23_0 into Wide
2021.02.09 13:14:42.527380 [ 117191 ] {} <Debug> system.metric_log_0 (MergerMutator): Selected MergeAlgorithm: Horizontal
2021.02.09 13:14:42.528500 [ 117191 ] {} <Trace> MergeTreeSequentialSource: Reading 2 marks from part 202009_1_21_4, total 158 rows starting from the beginning of the part
2021.02.09 13:14:42.531598 [ 117172 ] {} <Information> DatabaseOrdinary (default): Total 0 tables and 0 dictionaries.
2021.02.09 13:14:42.531634 [ 117172 ] {} <Information> DatabaseOrdinary (default): Starting up tables.
2021.02.09 13:14:42.531691 [ 117172 ] {} <Information> DatabaseCatalog: Found 0 partially dropped tables. Will load them and retry removal.
2021.02.09 13:14:42.531713 [ 117172 ] {} <Debug> Application: Loaded metadata.
2021.02.09 13:14:42.531766 [ 117172 ] {} <Trace> Pipe: Pipe capacity is 1.00 MiB
2021.02.09 13:14:42.531946 [ 117172 ] {} <Information> Application: Listening for http://[::1]:8123
2021.02.09 13:14:42.531999 [ 117172 ] {} <Information> Application: Listening for connections with native protocol (tcp): [::1]:9000
2021.02.09 13:14:42.532052 [ 117172 ] {} <Information> Application: Listening for replica communication (interserver): http://[::1]:9009
2021.02.09 13:14:42.532284 [ 117173 ] {} <Trace> BaseDaemon: Received signal 6
2021.02.09 13:14:42.532477 [ 117205 ] {} <Fatal> BaseDaemon: ########################################
2021.02.09 13:14:42.532578 [ 117205 ] {} <Fatal> BaseDaemon: (version 21.3.1.1, build id: 96BC388501F70EA5A53B98F28B6B4A97F94F9380) (from thread 117172) (no query) Received signal Aborted (6)
2021.02.09 13:14:42.532609 [ 117205 ] {} <Fatal> BaseDaemon:
2021.02.09 13:14:42.532643 [ 117205 ] {} <Fatal> BaseDaemon: Stack trace: 0x6c69680 0x6dbde8c
2021.02.09 13:14:42.532805 [ 117205 ] {} <Fatal> BaseDaemon: 0. /data/ClickHouse/src/Common/StackTrace.cpp:296: StackTrace::StackTrace(ucontext const&) @ 0x6c69680 in /opt/clickhouse/bin/clickhouse
2021.02.09 13:14:42.532996 [ 117205 ] {} <Fatal> BaseDaemon: 1. /data/ClickHouse/src/Common/CurrentThread.h:81: signalHandler(int, siginfo_t*, void*) @ 0x6dbde8c in /opt/clickhouse/bin/clickhouse
2021.02.09 13:14:42.786541 [ 117205 ] {} <Fatal> BaseDaemon: Calculated checksum of the binary: 24083C5588FACF0D276F95CDC4AADED9. There is no information about the reference checksum.
2021.02.09 13:14:42.786835 [ 117205 ] {} <Information> SentryWriter: Not sending crash report
2021.02.09 13:14:43.044972 [ 117191 ] {} <Trace> MergeTreeSequentialSource: Reading 2 marks from part 202009_22_22_0, total 8 rows starting from the beginning of the part
2021.02.09 13:14:43.329063 [ 117191 ] {} <Trace> MergeTreeSequentialSource: Reading 2 marks from part 202009_23_23_0, total 2 rows starting from the beginning of the part
2021.02.09 13:14:43.528296 [ 117200 ] {} <Trace> SystemLog (system.crash_log): Flushing system log, 1 entries to flush
2021.02.09 13:14:43.528435 [ 117200 ] {} <Debug> SystemLog (system.crash_log): Will use existing table system.crash_log for CrashLog
2021.02.09 13:14:43.528757 [ 117200 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 51.71 GiB.
2021.02.09 13:14:43.555121 [ 117200 ] {} <Trace> system.crash_log: Renaming temporary part tmp_insert_all_1_1_0 to all_1_1_0.
2021.02.09 13:14:43.555228 [ 117200 ] {} <Trace> SystemLog (system.crash_log): Flushed system log
2021.02.09 13:14:43.901227 [ 117191 ] {} <Debug> system.metric_log_0 (MergerMutator): Merge sorted 168 rows, containing 211 columns (211 merged, 0 gathered) in 1.374237361 sec., 122.24962351318288 rows/sec., 200.33 KiB/sec.
2021.02.09 13:14:43.910145 [ 117191 ] {} <Trace> system.metric_log_0: Renaming temporary part tmp_merge_202009_1_23_5 to 202009_1_23_5.
2021.02.09 13:14:43.910539 [ 117191 ] {} <Trace> system.metric_log_0 (MergerMutator): Merged 3 parts: from 202009_1_21_4 to 202009_23_23_0
2021.02.09 13:14:43.910573 [ 117191 ] {} <Debug> MemoryTracker: Peak memory usage: 435.25 MiB.
2021.02.09 13:14:50.028101 [ 117202 ] {} <Trace> SystemLog (system.trace_log): Flushing system log, 109 entries to flush
2021.02.09 13:14:50.028162 [ 117198 ] {} <Trace> SystemLog (system.metric_log): Flushing system log, 8 entries to flush
2021.02.09 13:14:50.028186 [ 117202 ] {} <Debug> SystemLog (system.trace_log): Creating new table system.trace_log for TraceLog
2021.02.09 13:14:50.028837 [ 117198 ] {} <Debug> SystemLog (system.metric_log): Will use existing table system.metric_log for MetricLog
2021.02.09 13:14:50.032415 [ 117198 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 51.71 GiB.
2021.02.09 13:14:50.032859 [ 117202 ] {} <Debug> system.trace_log: Loading data parts
2021.02.09 13:14:50.032938 [ 117202 ] {} <Debug> system.trace_log: Loaded data parts (0 items)
2021.02.09 13:14:50.036256 [ 117198 ] {} <Trace> system.metric_log: Renaming temporary part tmp_insert_202102_1_1_0 to 202102_1_1_0.
2021.02.09 13:14:50.036899 [ 117202 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 51.71 GiB.
2021.02.09 13:14:50.036954 [ 117198 ] {} <Trace> SystemLog (system.metric_log): Flushed system log
2021.02.09 13:14:50.037376 [ 117202 ] {} <Trace> system.trace_log: Renaming temporary part tmp_insert_202102_1_1_0 to 202102_1_1_0.
2021.02.09 13:14:50.037461 [ 117202 ] {} <Trace> SystemLog (system.trace_log): Flushed system log
step 6
--------------
gdb ./bin/clickhouse-server core.117172
(gdb) bt
#0 0x0000ffffbe5a50e8 in raise () from /lib64/libc.so.6
#1 0x0000ffffbe5a6760 in abort () from /lib64/libc.so.6
#2 0x0000000006dc37a0 in terminate_handler () at /data/ClickHouse/base/daemon/BaseDaemon.cpp:407
#3 0x000000000e532c1c in std::__terminate (func=<optimized out>) at /data/ClickHouse/contrib/libcxxabi/src/cxa_handlers.cpp:59
#4 0x000000000e5324fc in __cxxabiv1::__cxa_rethrow () at /data/ClickHouse/contrib/libcxxabi/src/cxa_exception.cpp:616
#5 0x0000000006c558dc in DB::getCurrentExceptionMessage (with_stacktrace=with_stacktrace@entry=true, check_embedded_stacktrace=check_embedded_stacktrace@entry=false,
with_extra_info=with_extra_info@entry=true) at /data/ClickHouse/src/Common/Exception.cpp:272
#6 0x0000000006dc341c in terminate_handler () at /data/ClickHouse/base/daemon/BaseDaemon.cpp:414
#7 0x000000000e532c1c in std::__terminate (func=<optimized out>) at /data/ClickHouse/contrib/libcxxabi/src/cxa_handlers.cpp:59
#8 0x000000000e53233c in failed_throw (exception_header=0xffff20740700) at /data/ClickHouse/contrib/libcxxabi/src/cxa_exception.cpp:152
#9 __cxxabiv1::__cxa_throw (thrown_object=thrown_object@entry=0xffff20740780, tinfo=0x52d3440 <typeinfo for Poco::Net::SSLException>,
dest=0xd0af670 <Poco::Net::SSLException::~SSLException()>) at /data/ClickHouse/contrib/libcxxabi/src/cxa_exception.cpp:283
#10 0x000000000d0b2544 in Poco::Net::SSLManager::initDefaultContext (this=this@entry=0xffff206f5780, server=server@entry=true) at /data/ClickHouse/contrib/libcxx/include/__string:372
#11 0x000000000d0b2d44 in Poco::Net::SSLManager::defaultServerContext (this=0xffff206f5780) at /data/ClickHouse/contrib/poco/NetSSL_OpenSSL/src/SSLManager.cpp:130
#12 0x000000000c6597ac in DB::MySQLHandlerFactory::MySQLHandlerFactory (this=0xffff20437140, server_=...) at /data/ClickHouse/src/Server/MySQLHandlerFactory.cpp:30
#13 0x0000000006cb37f0 in operator() (__closure=0xffff20437000, port=<optimized out>) at /data/ClickHouse/programs/server/Server.cpp:1181
#14 0x0000000006cac590 in operator() (__args#0=<synthetic pointer>, this=0xffffffffd410) at /data/ClickHouse/programs/server/Server.cpp:293
#15 operator() (__arg#0=9004, this=0xffffffffd410) at /data/ClickHouse/contrib/libcxx/include/functional:2560
#16 DB::Server::createServer(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, bool, std::__1::function<void (unsigned short)>&&) const (this=this@entry=0xffffffffed28, listen_host=..., port_name=port_name@entry=0x2f461f8 "mysql_port", listen_try=listen_try@entry=true,
func=func@entry=<unknown type in /opt/clickhouse/bin/clickhouse, CU 0x7cf41e, DIE 0xa9ab2b>) at /data/ClickHouse/programs/server/Server.cpp:293
#17 0x0000000006cbd748 in DB::Server::main (this=0xffffffffed28) at /data/ClickHouse/contrib/libcxx/include/new:214
#18 0x000000000d118358 in Poco::Util::Application::run (this=0xffffffffed28) at /data/ClickHouse/contrib/poco/Util/src/Application.cpp:334
#19 0x0000000006caedc8 in mainEntryClickHouseServer (argc=1, argv=0xffff20356760) at /data/ClickHouse/programs/server/Server.cpp:129
#20 0x0000000006c506d4 in main (argc_=<optimized out>, argv_=<optimized out>) at /data/ClickHouse/programs/main.cpp:368
| https://github.com/ClickHouse/ClickHouse/issues/20221 | https://github.com/ClickHouse/ClickHouse/pull/25854 | 956b1f588dbf5e406bf61e8a9b4e329d35af8b70 | 011ed015fa49c8e1a37f6f103c28def5e637a23f | "2021-02-09T05:26:41Z" | c++ | "2021-06-30T13:18:59Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,214 | ["programs/install/Install.cpp"] | '/etc/init.d/clickhouse-server restart' cannot restart CH | The 'restart' option of the init script cannot restart CH if it was not able to shutdown in `shutdown_wait_unfinished` seconds.
```
# sudo /etc/init.d/clickhouse-server restart
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 14388.
The process with pid = 14388 is running.
Sent terminate signal to process with pid 14388.
Waiting for server to stop
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 14388.
The process with pid = 14388 is running.
Waiting for server to stop
...
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 14388.
Waiting for server to stop
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 14388.
Waiting for server to stop
...
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 14388.
Will terminate forcefully.
Code: 425, e.displayText() = DB::ErrnoException: Cannot send kill signal, errno: 3, strerror: No such process (version 21.1.3.32 (official build))
```
The log:
```
2021.02.08 18:57:23.999226 [ 14388 ] {} <Information> Application: Closed connections. But 3 remain. Tip: To increase wait time add to config: <shutdown_wait_unfinished>60</shutdown_wait_unfinished>
2021.02.08 18:57:24.016684 [ 14388 ] {} <Information> Application: Will shutdown forcefully.
2021.02.08 18:58:28.478835 [ 23658 ] {} <Information> Application: Will watch for the process with pid 23659
2021.02.08 18:58:28.478962 [ 23659 ] {} <Information> Application: Forked a child process to watch
2021.02.08 18:58:28.479067 [ 23659 ] {} <Information> StatusFile: Status file /var/run/clickhouse-server/clickhouse-server.pid already exists - unclean restart. Contents: 14388
2021.02.08 18:58:28.479147 [ 23659 ] {} <Information> SentryWriter: Sending crash reports is disabled
2021.02.08 18:58:28.479183 [ 23659 ] {} <Trace> Pipe: Pipe capacity is 1.00 MiB
2021.02.08 18:58:28.532977 [ 23659 ] {} <Information> : Starting ClickHouse 21.1.3.32 with revision 54445, build id: 63BC1671E8C217170F9B6C6346099FD1F76E784F, PID 23659
2021.02.08 18:58:28.533059 [ 23659 ] {} <Information> Application: starting up
```
| https://github.com/ClickHouse/ClickHouse/issues/20214 | https://github.com/ClickHouse/ClickHouse/pull/23552 | 025d40ade6827579158002421c8da26a2fdcedc2 | 601108fb1c2864665191a5a9d949f817e36e97a6 | "2021-02-08T19:07:42Z" | c++ | "2021-04-24T23:42:31Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,203 | ["src/Storages/MergeTree/BackgroundJobsExecutor.cpp", "src/Storages/MergeTree/BackgroundJobsExecutor.h", "src/Storages/MergeTree/MergeTreeData.cpp", "src/Storages/StorageMergeTree.cpp", "src/Storages/StorageReplicatedMergeTree.cpp", "src/Storages/tests/gtest_background_executor.cpp", "tests/queries/0_stateless/01715_background_checker_blather_zookeeper.reference", "tests/queries/0_stateless/01715_background_checker_blather_zookeeper.sql", "tests/queries/skip_list.json"] | ReplicatedMergeTreePartCheckThread spam in log | After update to version 20.12.4.5, Clickhouse started spamming to log messages
```
2021.02.08 10:42:16.976140 [ 40737 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Found parts with the same min block and with the same max block as the missing part 20180521_267052_277907_5309. Hoping that it will eventually appear as a result of a merge.
2021.02.08 10:42:16.976225 [ 40806 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking part 20180521_267052_277903_5305
2021.02.08 10:42:16.977196 [ 40806 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking if anyone has a part 20180521_267052_277903_5305 or covering part.
2021.02.08 10:42:16.980575 [ 40806 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Found parts with the same min block and with the same max block as the missing part 20180521_267052_277903_5305. Hoping that it will eventually appear as a result of a merge.
2021.02.08 10:42:16.980663 [ 40878 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking part 20180521_267052_277905_5307
2021.02.08 10:42:16.981219 [ 40878 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking if anyone has a part 20180521_267052_277905_5307 or covering part.
2021.02.08 10:42:16.984490 [ 40878 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Found parts with the same min block and with the same max block as the missing part 20180521_267052_277905_5307. Hoping that it will eventually appear as a result of a merge.
2021.02.08 10:42:16.984565 [ 40890 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking part 20180521_267052_277904_5306
2021.02.08 10:42:16.985117 [ 40890 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking if anyone has a part 20180521_267052_277904_5306 or covering part.
2021.02.08 10:42:16.988831 [ 40890 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Found parts with the same min block and with the same max block as the missing part 20180521_267052_277904_5306. Hoping that it will eventually appear as a result of a merge.
2021.02.08 10:42:16.988913 [ 40884 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking part 20180521_267052_277906_5308
2021.02.08 10:42:16.989523 [ 40884 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking if anyone has a part 20180521_267052_277906_5308 or covering part.
2021.02.08 10:42:16.992210 [ 40884 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Found parts with the same min block and with the same max block as the missing part 20180521_267052_277906_5308. Hoping that it will eventually appear as a result of a merge.
2021.02.08 10:42:16.992319 [ 40806 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking part 20180521_267052_277907_5309
2021.02.08 10:42:16.993439 [ 40806 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking if anyone has a part 20180521_267052_277907_5309 or covering part.
2021.02.08 10:42:16.996080 [ 40806 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Found parts with the same min block and with the same max block as the missing part 20180521_267052_277907_5309. Hoping that it will eventually appear as a result of a merge.
2021.02.08 10:42:16.996177 [ 40730 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking part 20180521_267052_277905_5307
2021.02.08 10:42:16.997928 [ 40730 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking if anyone has a part 20180521_267052_277905_5307 or covering part.
2021.02.08 10:42:17.001236 [ 40730 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Found parts with the same min block and with the same max block as the missing part 20180521_267052_277905_5307. Hoping that it will eventually appear as a result of a merge.
2021.02.08 10:42:17.001429 [ 40785 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking part 20180521_267052_277903_5305
2021.02.08 10:42:17.002155 [ 40785 ] {} <Warning> base.table (ReplicatedMergeTreePartCheckThread): Checking if anyone has a part 20180521_267052_277903_5305 or covering part.
```
These messages have appeared before, but not in such numbers. After update log grows by 1GB in hours.
Can we solve problem that causes them?
Also we have huge network traffic on that CH nodes after update
https://imgur.com/sdt8DuJ
we try update to 21.2.2.8 but nothing changes | https://github.com/ClickHouse/ClickHouse/issues/20203 | https://github.com/ClickHouse/ClickHouse/pull/20335 | ebe79cfd8eb3ed6d6dd226874976d848be3ad196 | a2bb586170a4e80a979fa3910aa9423889c03472 | "2021-02-08T11:04:36Z" | c++ | "2021-02-12T07:06:04Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,195 | ["src/Interpreters/ExecuteScalarSubqueriesVisitor.cpp", "src/Interpreters/InterpreterSelectQuery.cpp", "src/Interpreters/SelectQueryOptions.h", "tests/queries/0_stateless/01711_cte_subquery_fix.reference", "tests/queries/0_stateless/01711_cte_subquery_fix.sql"] | Regression in the query parsing: 21.1.2 -> 21.2.2 | **Describe the issue**
The following query worked in 21.1.2, but doesn't work in 21.2.2
```sql
INSERT INTO ztf.dr4_source_obs_02 SELECT
match.oid1 AS sid,
obs.oid AS oid,
obs.filter AS filter,
obs.fieldid AS fieldid,
obs.rcid AS rcid,
coord.ra AS ra,
coord.dec AS dec,
obs.mjd AS mjd,
obs.mag AS mag,
obs.magerr AS magerr,
obs.clrcoeff AS clrcoeff
FROM ztf.dr4_obs AS obs
INNER JOIN
(
SELECT
oid1,
oid2
FROM ztf.dr4_xmatch_02
WHERE (oid1 <= oid2) AND (oid1 NOT IN
(
SELECT oid2
FROM ztf.dr4_xmatch_02
WHERE oid1 < oid2 AND (oid2 >= -inf) AND (oid2 < 639110200101898)
)
) AND (oid1 >= -inf) AND (oid1 < 639110200101898)
) AS match ON match.oid2 = obs.oid
INNER JOIN (
WITH
(pi() / 180.0) AS deg_to_rad,
(180.0 / pi()) AS rad_to_deg
SELECT
oid1,
rad_to_deg * atan2(avg(sin(deg_to_rad * ra2)), avg(cos(deg_to_rad * ra2))) AS ra,
rad_to_deg * atan2(avg(sin(deg_to_rad * dec2)), avg(cos(deg_to_rad * dec2))) AS dec
FROM ztf.dr4_xmatch_02
WHERE (oid1 <= oid2) AND (oid1 NOT IN
(
SELECT oid2
FROM ztf.dr4_xmatch_02
WHERE oid1 < oid2 AND (oid2 >= -inf) AND (oid2 < 639110200101898)
)
) AND (oid1 >= -inf) AND (oid1 < 639110200101898)
GROUP BY oid1
) AS coord ON match.oid1 = coord.oid1
WHERE (obs.catflags = 0) AND (obs.magerr > 0)
```
(Yes, I know, that it is suboptimal to make these identical sub-sub-queries)
**Error message and/or stacktrace**
```
Different expressions with the same alias _subquery4:
(WITH pi() / 180. AS deg_to_rad, 180. / pi() AS rad_to_deg SELECT oid2 FROM ztf.dr4_xmatch_02 WHERE (oid1 < oid2) AND (oid2 >= -inf) AND (oid2 < 639110200101898)) AS _subquery4
and
(WITH pi() / 180. AS deg_to_rad, 180. / pi() AS rad_to_deg SELECT oid2 FROM ztf.dr4_xmatch_02 WHERE (oid1 < oid2) AND (oid2 >= -inf) AND (oid2 < 639110200101898)) AS _subquery4
: While processing (WITH pi() / 180. AS deg_to_rad, 180. / pi() AS rad_to_deg SELECT oid2 FROM ztf.dr4_xmatch_02 WHERE (oid1 < oid2) AND (oid2 >= -inf) AND (oid2 < 639110200101898)) AS _subquery4. Stack trace:
0. DB::QueryAliasesMatcher<DB::QueryAliasesWithSubqueries>::visitOther(std::__1::shared_ptr<DB::IAST> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<DB::IAST>, 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, std::__1::shared_ptr<DB::IAST> > > >&) @ 0xedb9fe0 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
1. DB::QueryAliasesMatcher<DB::QueryAliasesWithSubqueries>::visit(DB::ASTSubquery const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<DB::IAST>, 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, std::__1::shared_ptr<DB::IAST> > > >&) @ 0xedb9270 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
2. DB::InDepthNodeVisitor<DB::QueryAliasesMatcher<DB::QueryAliasesWithSubqueries>, false, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0xedba1fb in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
3. DB::InDepthNodeVisitor<DB::QueryAliasesMatcher<DB::QueryAliasesWithSubqueries>, false, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0xedba17b in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
4. DB::InDepthNodeVisitor<DB::QueryAliasesMatcher<DB::QueryAliasesWithSubqueries>, false, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0xedba17b in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
5. DB::InDepthNodeVisitor<DB::QueryAliasesMatcher<DB::QueryAliasesWithSubqueries>, false, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0xedba17b in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
6. DB::InDepthNodeVisitor<DB::QueryAliasesMatcher<DB::QueryAliasesWithSubqueries>, false, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0xedba17b in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
7. DB::InDepthNodeVisitor<DB::QueryAliasesMatcher<DB::QueryAliasesWithSubqueries>, false, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0xedba17b in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
8. DB::TreeRewriter::normalize(std::__1::shared_ptr<DB::IAST>&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<DB::IAST>, 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, std::__1::shared_ptr<DB::IAST> > > >&, DB::Settings const&) @ 0xee81633 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
9. 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 @ 0xee7c416 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
10. ? @ 0xeb9ec7e in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
11. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> 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&) @ 0xeb9bb42 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
12. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, 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&) @ 0xeb99b4d in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
13. 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&) @ 0xed46025 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
14. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, 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&) @ 0xed446e0 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
15. DB::InterpreterSelectWithUnionQuery::getSampleBlock(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&) @ 0xed46bd1 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
16. ? @ 0xeee19be in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
17. DB::getDatabaseAndTablesWithColumns(std::__1::vector<DB::ASTTableExpression const*, std::__1::allocator<DB::ASTTableExpression const*> > const&, DB::Context const&) @ 0xeee27eb in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
18. DB::JoinedTables::resolveTables() @ 0xed7b2f4 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
19. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> 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&) @ 0xeb9a928 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
20. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, 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&) @ 0xeb99b4d in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
21. 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&) @ 0xed46025 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
22. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, 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&) @ 0xed446e0 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
23. DB::InterpreterInsertQuery::execute() @ 0xeb7a3ec in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
24. ? @ 0xeed0ea2 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
25. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0xeecf7fc in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
26. DB::TCPHandler::runImpl() @ 0xf5ca265 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
27. DB::TCPHandler::run() @ 0xf5d9ee9 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
28. Poco::Net::TCPServerConnection::start() @ 0x11b76baf in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
29. Poco::Net::TCPServerDispatcher::run() @ 0x11b785c1 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
30. Poco::PooledThread::run() @ 0x11caf669 in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
31. Poco::ThreadImpl::runnableEntry(void*) @ 0x11cab4ca in /projects/caps/uiucsn/ztf_dr/clickhouse/bin/clickhouse
```
* `CREATE TABLE` statements for all tables involved
```sql
CREATE TABLE ztf.dr4_source_obs_02
(
`sid` UInt64 CODEC(Delta(8), LZ4),
`oid` UInt64 CODEC(Delta(8), LZ4),
`filter` UInt8 CODEC(T64, LZ4),
`fieldid` UInt16 CODEC(T64, LZ4),
`rcid` UInt8 CODEC(Delta(1), LZ4),
`ra` Float64 CODEC(Gorilla),
`dec` Float64 CODEC(Gorilla),
`h3index10` UInt64 MATERIALIZED geoToH3(ra, dec, 10) CODEC(Delta(8), LZ4),
`mjd` Float64,
`mag` Float32,
`magerr` Float32,
`clrcoeff` Float32
)
ENGINE = MergeTree
PARTITION BY intDiv(oid, 1000000000000)
PRIMARY KEY h3index10
ORDER BY (h3index10, sid, mjd)
```
```sql
CREATE TABLE ztf.dr4_obs
(
`oid` UInt64 CODEC(Delta(8), LZ4),
`nobs` UInt16 CODEC(T64, LZ4),
`filter` UInt8 CODEC(T64, LZ4),
`fieldid` UInt16 CODEC(T64, LZ4),
`rcid` UInt8 CODEC(Delta(1), LZ4),
`ra` Float64 CODEC(Gorilla),
`dec` Float64 CODEC(Gorilla),
`h3index10` UInt64 MATERIALIZED geoToH3(ra, dec, 10) CODEC(Delta(8), LZ4),
`mjd` Float64,
`mag` Float32,
`magerr` Float32,
`clrcoeff` Float32,
`catflags` UInt16 CODEC(T64, LZ4)
)
ENGINE = MergeTree
PARTITION BY fieldid
PRIMARY KEY h3index10
ORDER BY (h3index10, oid, mjd)
```
```sql
CREATE TABLE ztf.dr4_xmatch_02
(
`oid1` UInt64,
`oid2` UInt64,
`ra2` Float64,
`dec2` Float64
)
ENGINE = MergeTree
ORDER BY oid2
``` | https://github.com/ClickHouse/ClickHouse/issues/20195 | https://github.com/ClickHouse/ClickHouse/pull/20211 | 21b1a3fc6d5b96663df87d3f08c5190f51e67d1e | 4ff3a28a9f8981c169ddf237725f1f62a6d75ab5 | "2021-02-08T04:47:37Z" | c++ | "2021-02-09T23:12:05Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,096 | ["src/Parsers/ParserDataType.cpp", "tests/queries/0_stateless/01691_parser_data_type_exponential.reference", "tests/queries/0_stateless/01691_parser_data_type_exponential.sh"] | The following query is executing slowly. | See the attachment.
[query.txt](https://github.com/ClickHouse/ClickHouse/files/5928271/query.txt)
| https://github.com/ClickHouse/ClickHouse/issues/20096 | https://github.com/ClickHouse/ClickHouse/pull/20132 | 011109c82a9ad5b083ac448a320519e1ac04b5b8 | dee8f1fbf238dedc4fed32c05927b986877c3d7c | "2021-02-04T20:17:26Z" | c++ | "2021-02-06T05:42:40Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,092 | ["src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp", "src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.h", "tests/queries/0_stateless/01702_rewrite_avg_for_algebraic_optimization.reference", "tests/queries/0_stateless/01702_rewrite_avg_for_algebraic_optimization.sql"] | Perform algebraic optimizations of arithmetic expressions inside aggregate functions. | Some aggregate functions are commutative with some arithmetic expressions.
```
avg(x + const) = avg(x) + const
```
This is applicable for aggregate functions: `sum`, `avg`, `min`, `max` and operations: `+`, `-`, `*`, `/` (but not for `intDiv` and `modulo`).
In case of integer overflow it either works correctly (for `sum`) or we may assume that integer overflow is implementation specific behaviour and apply optimization under this assumption.
**Possible implementation**
AST rewrite with InDepthNodeVisitor.
Should not rewrite if expression has alias. | https://github.com/ClickHouse/ClickHouse/issues/20092 | https://github.com/ClickHouse/ClickHouse/pull/20183 | 39c73cb448babc12020ef45d12517c3d9cf2a08d | faf28eeff3502aa402de35e40397b034c0e77706 | "2021-02-04T18:39:08Z" | c++ | "2021-02-09T13:36:13Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,052 | ["src/DataTypes/NumberTraits.h", "src/Functions/tests/gtest_number_traits.cpp", "tests/queries/0_stateless/01700_mod_negative_type_promotion.reference", "tests/queries/0_stateless/01700_mod_negative_type_promotion.sql"] | Incorrect modulo(a, b), a % b behavior for Int fields | ClickHouse server version 20.8.9 revision 54438
Let's imagine some simple table structure:
```
CREATE TABLE users (
`user_id` Int32
)
```
Modulo operator on **Int32** field with **150** argument returns negative result. This could have happened due to wrong type casting - result should be casted to **Int16** or **UInt8** instead of **Int8**.
```
SELECT
user_id % 150,
441746 % 150,
toTypeName(user_id % 150),
toTypeName(441746 % 150)
FROM users
WHERE user_id = 441746
LIMIT 1
```
```
โโmodulo(user_id, 150)โโฌโmodulo(441746, 150)โโฌโtoTypeName(modulo(user_id, 150))โโฌโtoTypeName(modulo(441746, 150))โโ
โ -110 โ 146 โ Int8 โ UInt8 โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
``` | https://github.com/ClickHouse/ClickHouse/issues/20052 | https://github.com/ClickHouse/ClickHouse/pull/20067 | 0db2aa3c2e8aa39eb814b8c8a22e904cb8528025 | 34151eea2c6b1492c8914680b65efbcfd72f0776 | "2021-02-03T21:38:34Z" | c++ | "2021-02-05T06:31:46Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,046 | ["src/Functions/FunctionHelpers.cpp", "tests/queries/0_stateless/01710_join_use_nulls.reference", "tests/queries/0_stateless/01710_join_use_nulls.sql"] | Segfault in RIGHT and FULL JOIN | https://clickhouse-test-reports.s3.yandex.net/20029/02da869d10e04f0031a2a28e4128a4730e555325/fuzzer_tsan/server.log
There were a few similar reports. | https://github.com/ClickHouse/ClickHouse/issues/20046 | https://github.com/ClickHouse/ClickHouse/pull/20344 | 9aadbde86c7c8c216cbd14b6a2eae54c568905f2 | a94e223ceea9265b697768382893b1839d899c0b | "2021-02-03T18:02:39Z" | c++ | "2021-02-12T09:48:53Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 20,009 | ["src/Interpreters/TreeOptimizer.cpp", "tests/queries/0_stateless/02147_order_by_optimizations.reference", "tests/queries/0_stateless/02147_order_by_optimizations.sql"] | Issue with optimize_read_in_order on Merge table | This is an issue similar to https://github.com/ClickHouse/ClickHouse/issues/7617 but with slight difference.
I am seeing optimize_read_in_order working in MergeTree table but not honored by Merge table on top of it, the issue can be reproduced on ClickHouse server version 20.12.4 revision 54442 through the following commands:
**Table Setup:**
_create table mt( A Int64, B Int64, V Int64) Engine=MergeTree order by (A,-B)_
_create table m as mt ENGINE = Merge(default, 'mt')_
_insert into mt select 111, number, number from numbers(10000000)_
**Queries:**
Selecting on the MergeTree table honors optimize_read_in_order and only processes 400K rows:
```
select * from mt where A = 111 order by A,-B limit 3 settings max_threads=1,optimize_read_in_order=1;
โโโโAโโฌโโโโโโโBโโฌโโโโโโโVโโ
โ 111 โ 9999999 โ 9999999 โ
โ 111 โ 9999998 โ 9999998 โ
โ 111 โ 9999997 โ 9999997 โ
โโโโโโโดโโโโโโโโโโดโโโโโโโโโโ
3 rows in set. Elapsed: 0.048 sec. Processed 409.60 thousand rows, 9.83 MB (8.46 million rows/s., 203.06 MB/s.)
```
Selecting on the Merge table does not honor optimize_read_in_order and processes all 10M rows:
```
โโโโAโโฌโโโโโโโBโโฌโโโโโโโVโโ
โ 111 โ 9999999 โ 9999999 โ
โ 111 โ 9999999 โ 9999999 โ
โ 111 โ 9999998 โ 9999998 โ
โโโโโโโดโโโโโโโโโโดโโโโโโโโโโ
select * from m where A = 111 order by A,-B limit 3 settings max_threads=1,optimize_read_in_order=1;
3 rows in set. Elapsed: 0.424 sec. Processed 10.00 million rows, 240.00 MB (23.56 million rows/s., 565.48 MB/s.)
```
| https://github.com/ClickHouse/ClickHouse/issues/20009 | https://github.com/ClickHouse/ClickHouse/pull/32670 | 6879f03cb6f35613761eb272a2f90a2f96c3a900 | dadaeabda7a775d81590f8a41bdbf9a9e22c8075 | "2021-02-02T18:16:43Z" | c++ | "2021-12-13T21:42:48Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,913 | ["src/Functions/CMakeLists.txt", "tests/queries/0_stateless/01700_point_in_polygon_ubsan.reference", "tests/queries/0_stateless/01700_point_in_polygon_ubsan.sql"] | Signed overflow in PointInPolygon (boost/geometry/arithmetic/determinant.hpp:44) | https://clickhouse-test-reports.s3.yandex.net/19790/84d3d6e7280907a22f6a2ce86b9bf3040b4871f1/fuzzer_ubsan/report.html#fail1
```
SELECT pointInPolygon((0, 0), [[(0, 0), (10, 10), (256, -9223372036854775808)]])
../contrib/boost/boost/geometry/arithmetic/determinant.hpp:44:23: runtime error: signed integer overflow: 256 * 9223372036854775616 cannot be represented in type 'long long'
#0 0x15dec916 in boost::geometry::detail::calculate_determinant<long long, long long, long long>::apply(long long const&, long long const&, long long const&, long long const&) (/workspace/clickhouse+0x15dec916)
#1 0x15dec1fa in void boost::geometry::strategy::intersection::cartesian_segments<void>::cramers_rule<long long, long long, long long>(long long const&, long long const&, long long const&, long long const&, long long const&, long long const&, long long&, long long&) (/workspace/clickhouse+0x15dec1fa)
#2 0x15deb96d in boost::geometry::policies::relate::segments_tupled<boost::geometry::policies::relate::segments_intersection_points<boost::geometry::segment_intersection_points<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> > >, boost::geometry::policies::relate::segments_direction>::return_type boost::geometry::strategy::intersection::cartesian_segments<void>::apply<boost::geometry::model::referring_segment<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const>, boost::geometry::model::referring_segment<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const>, boost::geometry::policies::relate::segments_tupled<boost::geometry::policies::relate::segments_intersection_points<boost::geometry::segment_intersection_points<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> > >, boost::geometry::policies::relate::segments_direction>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >(boost::geometry::model::referring_segment<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const> const&, boost::geometry::model::referring_segment<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const> const&, boost::geometry::policies::relate::segments_tupled<boost::geometry::policies::relate::segments_intersection_points<boost::geometry::segment_intersection_points<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> > >, boost::geometry::policies::relate::segments_direction> const&, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> const&, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> const&, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> const&, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> const&, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> const&) (/workspace/clickhouse+0x15deb96d)
#3 0x15de9ee7 in boost::geometry::detail::overlay::intersection_info<boost::geometry::detail::get_turns::unique_sub_range_from_section<true, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::ever_circling_iterator<std::__1::__wrap_iter<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const*> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> >, boost::geometry::detail::get_turns::unique_sub_range_from_section<true, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::ever_circling_iterator<std::__1::__wrap_iter<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const*> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> >, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> >::intersection_info(boost::geometry::detail::get_turns::unique_sub_range_from_section<true, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::ever_circling_iterator<std::__1::__wrap_iter<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const*> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> > const&, boost::geometry::detail::get_turns::unique_sub_range_from_section<true, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::ever_circling_iterator<std::__1::__wrap_iter<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const*> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> > const&, boost::geometry::strategy::intersection::cartesian_segments<void> const&, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> const&) (/workspace/clickhouse+0x15de9ee7)
#4 0x15de9ada in std::__1::back_insert_iterator<std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > > > boost::geometry::detail::overlay::get_turn_info<boost::geometry::detail::overlay::assign_null_policy>::apply<boost::geometry::detail::get_turns::unique_sub_range_from_section<true, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::ever_circling_iterator<std::__1::__wrap_iter<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const*> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> >, boost::geometry::detail::get_turns::unique_sub_range_from_section<true, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::ever_circling_iterator<std::__1::__wrap_iter<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const*> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> >, boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double>, std::__1::back_insert_iterator<std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > > > >(boost::geometry::detail::get_turns::unique_sub_range_from_section<true, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::ever_circling_iterator<std::__1::__wrap_iter<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const*> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> > const&, boost::geometry::detail::get_turns::unique_sub_range_from_section<true, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::ever_circling_iterator<std::__1::__wrap_iter<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> const*> >, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> > const&, boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > const&, boost::geometry::strategy::intersection::cartesian_segments<void> const&, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> const&, std::__1::back_insert_iterator<std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > > >) (/workspace/clickhouse+0x15de9ada)
#5 0x15de921b in bool boost::geometry::detail::get_turns::get_turns_in_sections<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, false, false, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::detail::overlay::get_turn_info<boost::geometry::detail::overlay::assign_null_policy> >::apply<boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double>, std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >, boost::geometry::detail::overlay::stateless_predicate_based_interrupt_policy<boost::geometry::detail::is_valid::is_acceptable_turn<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::polygon_tag>, true> >(int, boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator> const&, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul> const&, int, boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator> const&, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul> const&, bool, bool, boost::geometry::strategy::intersection::cartesian_segments<void> const&, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> const&, std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >&, boost::geometry::detail::overlay::stateless_predicate_based_interrupt_policy<boost::geometry::detail::is_valid::is_acceptable_turn<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::polygon_tag>, true>&) (/workspace/clickhouse+0x15de921b)
#6 0x15de69ef in bool boost::geometry::detail::self_get_turn_points::self_section_visitor<false, boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >, boost::geometry::detail::overlay::get_turn_info<boost::geometry::detail::overlay::assign_null_policy>, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double>, boost::geometry::detail::overlay::stateless_predicate_based_interrupt_policy<boost::geometry::detail::is_valid::is_acceptable_turn<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::polygon_tag>, true> >::apply<boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul> >(boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul> const&, boost::geometry::section<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul> const&) (/workspace/clickhouse+0x15de69ef)
#7 0x15de6449 in bool boost::geometry::partition<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, boost::geometry::detail::partition::include_all_policy, boost::geometry::detail::partition::include_all_policy>::apply<boost::geometry::sections<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul>, boost::geometry::detail::self_get_turn_points::self_section_visitor<false, boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >, boost::geometry::detail::overlay::get_turn_info<boost::geometry::detail::overlay::assign_null_policy>, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double>, boost::geometry::detail::overlay::stateless_predicate_based_interrupt_policy<boost::geometry::detail::is_valid::is_acceptable_turn<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::polygon_tag>, true> >, boost::geometry::detail::section::get_section_box<boost::geometry::strategy::expand::cartesian_box>, boost::geometry::detail::section::overlaps_section_box<boost::geometry::strategy::disjoint::cartesian_box_box>, boost::geometry::detail::partition::visit_no_policy>(boost::geometry::sections<boost::geometry::model::box<boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian> >, 2ul> const&, boost::geometry::detail::self_get_turn_points::self_section_visitor<false, boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >, boost::geometry::detail::overlay::get_turn_info<boost::geometry::detail::overlay::assign_null_policy>, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double>, boost::geometry::detail::overlay::stateless_predicate_based_interrupt_policy<boost::geometry::detail::is_valid::is_acceptable_turn<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::polygon_tag>, true> >&, boost::geometry::detail::section::get_section_box<boost::geometry::strategy::expand::cartesian_box> const&, boost::geometry::detail::section::overlaps_section_box<boost::geometry::strategy::disjoint::cartesian_box_box> const&, unsigned long, boost::geometry::detail::partition::visit_no_policy) (/workspace/clickhouse+0x15de6449)
#8 0x15de47d0 in bool boost::geometry::detail::self_get_turn_points::get_turns<false, boost::geometry::detail::overlay::get_turn_info<boost::geometry::detail::overlay::assign_null_policy> >::apply<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::strategy::intersection::cartesian_segments<void>, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double>, std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >, boost::geometry::detail::overlay::stateless_predicate_based_interrupt_policy<boost::geometry::detail::is_valid::is_acceptable_turn<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::polygon_tag>, true> >(boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator> const&, boost::geometry::strategy::intersection::cartesian_segments<void> const&, boost::geometry::detail::robust_policy<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::model::point<long long, 2ul, boost::geometry::cs::cartesian>, double> const&, std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >&, boost::geometry::detail::overlay::stateless_predicate_based_interrupt_policy<boost::geometry::detail::is_valid::is_acceptable_turn<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::polygon_tag>, true>&, int, bool) (/workspace/clickhouse+0x15de47d0)
#9 0x15de0f00 in bool boost::geometry::detail::is_valid::has_valid_self_turns<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::detail::is_valid::is_acceptable_turn<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::polygon_tag> >::apply<std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >, boost::geometry::failing_reason_policy<true, true>, boost::geometry::strategy::intersection::cartesian_segments<void> >(boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator> const&, std::__1::deque<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> >, std::__1::allocator<boost::geometry::detail::overlay::turn_info<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long>, boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, boost::array<boost::geometry::detail::overlay::turn_operation<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, boost::geometry::segment_ratio<long long> >, 2ul> > > >&, boost::geometry::failing_reason_policy<true, true>&, boost::geometry::strategy::intersection::cartesian_segments<void> const&) (/workspace/clickhouse+0x15de0f00)
#10 0x15de0d3f in bool boost::geometry::detail::is_valid::is_valid_polygon<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, false>::apply<boost::geometry::failing_reason_policy<true, true>, boost::geometry::strategy::intersection::cartesian_segments<void> >(boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator> const&, boost::geometry::failing_reason_policy<true, true>&, boost::geometry::strategy::intersection::cartesian_segments<void> const&) (/workspace/clickhouse+0x15de0d3f)
#11 0x15de0775 in bool boost::geometry::is_valid<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>, boost::geometry::default_strategy>(boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, boost::geometry::default_strategy const&) (/workspace/clickhouse+0x15de0775)
#12 0x15ddb8c8 in DB::(anonymous namespace)::FunctionPointInPolygon<DB::PointInPolygonWithGrid<double> >::parseConstPolygon(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian>, false, true, std::__1::vector, std::__1::vector, std::__1::allocator, std::__1::allocator>&) const (/workspace/clickhouse+0x15ddb8c8)
#13 0x15dd672a in DB::(anonymous namespace)::FunctionPointInPolygon<DB::PointInPolygonWithGrid<double> >::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x15dd672a)
#14 0x11d8bc34 in 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 (/workspace/clickhouse+0x11d8bc34)
#15 0x11d91016 in DB::DefaultExecutable::executeDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x11d91016)
#16 0x12834f6a in DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12834f6a)
#17 0x12835f6d in DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12835f6d)
#18 0x19642b70 in DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node*, std::__1::allocator<DB::ActionsDAG::Node*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:211:35
#19 0x19642395 in DB::ActionsDAG::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> >, DB::Context const&) obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:165:12
#20 0x19dd85ce in 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> >) obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:501:51
#21 0x19de9ba2 in 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> >) obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.h:155:27
#22 0x19de0648 in DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:971:14
#23 0x19de5f8f in DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp
#24 0x19dbbed1 in DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:34:13
#25 0x19da9bff in DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:410:48
#26 0x19db203a in DB::SelectQueryExpressionAnalyzer::appendSelect(DB::ExpressionActionsChain&, bool) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1093:5
#27 0x19db6356 in DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterInfo> const&, DB::Block const&) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1477:24
#28 0x19b1d15d in DB::InterpreterSelectQuery::getSampleBlockImpl() obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:567:23
#29 0x19b1481b in DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> 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&)::$_2::operator()(bool) const obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:461:25
#30 0x19b0faa7 in DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> 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&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:464:5
#31 0x19b0d829 in DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, 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&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:154:7
#32 0x19e0e867 in std::__1::__unique_if<DB::InterpreterSelectQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectQuery, std::__1::shared_ptr<DB::IAST> const&, DB::Context&, DB::SelectQueryOptions&, 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::IAST> const&, DB::Context&, DB::SelectQueryOptions&, 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&) obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068:32
#33 0x19e0bd03 in 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&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:327:16
#34 0x19e0a07c in DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, 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&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:249:13
#35 0x19a9b0b5 in std::__1::__unique_if<DB::InterpreterSelectWithUnionQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectWithUnionQuery, std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&>(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&) obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068:32
#36 0x19a99c0a in DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterFactory.cpp:110:16
#37 0x1a044ec0 in DB::executeQueryImpl(char const*, char const*, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:519:28
#38 0x1a043d14 in DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:899:30
#39 0x1aa0eb0b in DB::TCPHandler::runImpl() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:260:24
#40 0x1aa2742c in DB::TCPHandler::run() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1417:9
#41 0x1b81bf1b in Poco::Net::TCPServerConnection::start() obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3
#42 0x1b81c372 in Poco::Net::TCPServerDispatcher::run() obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:112:19
#43 0x1b8fa5c9 in Poco::PooledThread::run() obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14
#44 0x1b8f83cb in Poco::ThreadImpl::runnableEntry(void*) obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27
#45 0x7f34845e3608 in start_thread /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
#46 0x7f348450a292 in clone /build/glibc-eX1tMB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
``` | https://github.com/ClickHouse/ClickHouse/issues/19913 | https://github.com/ClickHouse/ClickHouse/pull/20049 | c13759dd853c31e0e284cc3e237f7bdf85ed386b | 298a29ef529f6cc2239f72d530e83a1a1558e997 | "2021-02-01T10:14:10Z" | c++ | "2021-02-04T10:51:30Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,888 | ["src/Storages/Distributed/DirectoryMonitor.cpp", "src/Storages/Distributed/DistributedBlockOutputStream.cpp", "tests/integration/test_insert_distributed_async_send/test.py", "tests/queries/0_stateless/00967_insert_into_distributed_different_types.sql", "tests/queries/0_stateless/01457_create_as_table_function_structure.sql", "tests/queries/0_stateless/01683_dist_INSERT_block_structure_mismatch.reference", "tests/queries/0_stateless/01683_dist_INSERT_block_structure_mismatch.sql", "tests/queries/0_stateless/arcadia_skip_list.txt"] | Debug assertion found by fuzzing: block structure mismatch in RemoteBlockOutputStream. | https://clickhouse-test-reports.s3.yandex.net/19868/c39ee3f58c85de0f2a7b609377e2f138305dc745/fuzzer_debug/report.html#fail1 | https://github.com/ClickHouse/ClickHouse/issues/19888 | https://github.com/ClickHouse/ClickHouse/pull/19947 | dc2afc4795dfdecbe675caffd34ab346d21d79ee | 402c018d1e11e3937b6603af961926ec26f09ab0 | "2021-02-01T00:36:54Z" | c++ | "2021-02-03T18:27:45Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,877 | ["src/Interpreters/ActionsDAG.cpp", "src/Storages/MergeTree/MergeTreeRangeReader.cpp", "tests/queries/0_stateless/01671_merge_join_and_constants.reference", "tests/queries/0_stateless/01671_merge_join_and_constants.sql"] | Fuzzer: MSan report in LowCardinality + JOIN | **Describe the bug**
```
SELECT pow('0.0000000257', NULL), pow(pow(NULL, NULL), NULL) - NULL, (val + NULL) = (rval * 0), * FROM (SELECT (val + 256) = (NULL * NULL), toLowCardinality(toNullable(dummy)) AS val FROM system.one) AS s1 ANY LEFT JOIN (SELECT toLowCardinality(dummy) AS rval FROM system.one) AS s2 ON (val + 0) = (rval * 255)
```
https://clickhouse-test-reports.s3.yandex.net/19868/c39ee3f58c85de0f2a7b609377e2f138305dc745/fuzzer_msan/server.log | https://github.com/ClickHouse/ClickHouse/issues/19877 | https://github.com/ClickHouse/ClickHouse/pull/19991 | 85396fc82e8b82af0020aadb779fe0f0ae1d9054 | 420f2958e213539d2a7e7069d7eee6c207db5943 | "2021-01-31T11:07:06Z" | c++ | "2021-02-10T11:13:52Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,874 | ["programs/benchmark/Benchmark.cpp", "src/Interpreters/SystemLog.h", "tests/queries/0_stateless/01683_text_log_deadlock.reference", "tests/queries/0_stateless/01683_text_log_deadlock.sh"] | Deadlock is possible if system.text_log is enabled. | **Describe the bug**
```
| | | | | | | | | 5 0x000000000e3a5ec1 in DB::executeQueryImpl(char const*, char const*, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) ()
| | | | | | | | | | 2 0x000000000e3aadc6 in DB::logQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context const&, bool) ()
| | | | | | | | | | | 2 0x000000000887a195 in DB::OwnSplitChannel::log(Poco::Message const&) ()
| | | | | | | | | | | | 2 0x000000000887a7fa in DB::OwnSplitChannel::logSplit(Poco::Message const&) ()
| | | | | | | | | | | | | 2 0x000000000887acb6 in DB::SystemLog<DB::TextLogElement>::add(DB::TextLogElement const&) ()
| | | | | | | | | | | | | | 1 0x0000000011976246 in std::__1::mutex::lock() ()
| | | | | | | | | | | | | | | 1 0x00000000087495a1 in pthread_mutex_lock ()
| | | | | | | | | | | | | | | | 1 0x00007f074da790a3 in __GI___pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:80
| | | | | | | | | | | | | | | | | 1 __lll_lock_wait at lowlevellock.c:52
| | | | | | | | | | | | | 2 0x000000000887ae28 in DB::SystemLog<DB::TextLogElement>::add(DB::TextLogElement const&) ()
| | | | | | | | | | | | | | 1 0x000000000887c62c in void std::__1::vector<DB::TextLogElement, std::__1::allocator<DB::TextLogElement> >::__push_back_slow_path<DB::TextLogElement const&>(DB::TextLogElement const&) ()
| | | | | | | | | | | | | | | 1 0x00000000087156fb in operator new(unsigned long) ()
| | | | | | | | | | | | | | | | 1 0x0000000008727744 in MemoryTracker::alloc(long) ()
| | | | | | | | | | | | | | | | | 1 0x000000000872727c in MemoryTracker::logMemoryUsage(long) const ()
| | | | | | | | | | | | | | | | | | 1 0x000000000887a195 in DB::OwnSplitChannel::log(Poco::Message const&) ()
| | | | | | | | | | | | | | | | | | | 1 0x000000000887a7fa in DB::OwnSplitChannel::logSplit(Poco::Message const&) ()
| | | | | | | | | | | | | | | | | | | | 1 0x000000000887acb6 in DB::SystemLog<DB::TextLogElement>::add(DB::TextLogElement const&) ()
| | | | | | | | | | | | | | | | | | | | | 1 0x0000000011976246 in std::__1::mutex::lock() ()
| | | | | | | | | | | | | | | | | | | | | | 1 0x00000000087495a1 in pthread_mutex_lock ()
| | | | | | | | | | | | | | | | | | | | | | | 1 0x00007f074da790a3 in __GI___pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:80
| | | | | | | | | | | | | | | | | | | | | | | | 1 __lll_lock_wait at lowlevellock.c:52
```
**How to reproduce**
```
clickhouse-benchmark -i 1000000 -c16 --secure --query "SELECT 1"
``` | https://github.com/ClickHouse/ClickHouse/issues/19874 | https://github.com/ClickHouse/ClickHouse/pull/19875 | ec464cc06eb7dd9ca810acc23695bd40efc79fcf | 9161a5f5709eb1dde2c791cbd6c883df0e28dff4 | "2021-01-31T09:53:37Z" | c++ | "2021-02-01T12:42:16Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,869 | ["src/Functions/MatchImpl.h", "src/Functions/MultiMatchAllIndicesImpl.h", "src/Functions/MultiMatchAnyImpl.h", "src/Functions/Regexps.h"] | (negligible) demonstration of memory growth due to infinite regexp cache. | ClickHouse is using infinite cache for compiled regular expressions.
Hyperscan can use several megabytes per compiled regexp.
It makes infinite memory growth possible:
```
clickhouse-benchmark --query "SELECT multiFuzzyMatchAny('Hello, world', 5, ['(' || (SELECT toString(rand(1))) || '|' || (SELECT toString(rand(2))) || ')+(' || (SELECT toString(rand(3))) || '|' || (SELECT toString(rand(4))) || ')+(' || (SELECT toString(rand(5))) || ')+'])"
```
Possible solutions:
- simply drop cache if its size is 1000 entries;
- replace to LRU cache with 1000 entries.
| https://github.com/ClickHouse/ClickHouse/issues/19869 | https://github.com/ClickHouse/ClickHouse/pull/40264 | 2110d4334bc9a3425da13694b5cb284783da94bf | 7589c49bcaf1ee8db9ad73da043900c6615e11f4 | "2021-01-31T08:53:08Z" | c++ | "2022-08-17T08:58:29Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,856 | ["src/Core/Settings.h", "src/Interpreters/CrossToInnerJoinVisitor.cpp", "src/Interpreters/CrossToInnerJoinVisitor.h", "src/Interpreters/InterpreterSelectQuery.cpp", "tests/queries/0_stateless/00826_cross_to_inner_join.reference", "tests/queries/0_stateless/00826_cross_to_inner_join.sql"] | AND (cond OR cond) prevent CROSS JOIN to INNER JOIN rewrite | **Describe the bug**
It's possible to rewrite CROSS JOIN TO INNER JOIN in certain conditions, but clickhouse doesn't do that when we have ```AND (cond OR cond)``` in WHERE clause.
**Does it reproduce on recent release?**
Yes
**How to reproduce**
Clickhouse version 21.2
```
EXPLAIN SYNTAX
WITH tbl AS
(
SELECT *
FROM numbers(1000)
)
SELECT count(x.number)
FROM tbl AS x
, tbl AS z
WHERE x.number = z.number
Query id: ea50c6a4-618d-4f87-a089-01ef2ba956fe
โโexplainโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WITH tbl AS โ
โ ( โ
โ SELECT * โ
โ FROM numbers(1000) โ
โ ) โ
โ SELECT count(number) โ
โ FROM tbl AS x โ
โ ALL INNER JOIN tbl AS z ON number = z.number โ
โ WHERE number = z.number โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
EXPLAIN SYNTAX
WITH tbl AS
(
SELECT *
FROM numbers(1000)
)
SELECT count(x.number)
FROM tbl AS x
, tbl AS z
WHERE (x.number = z.number) AND ((x.number = 1) OR (x.number = 2))
Query id: 4f3f6e5a-f7fc-41c0-a2f2-675525e5d63e
โโexplainโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WITH tbl AS โ
โ ( โ
โ SELECT * โ
โ FROM numbers(1000) โ
โ ) โ
โ SELECT count(number) โ
โ FROM tbl AS x โ
โ CROSS JOIN tbl AS z โ
โ WHERE (number = z.number) AND ((number = 1) OR (number = 2)) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
EXPLAIN SYNTAX
WITH tbl AS
(
SELECT *
FROM numbers(1000)
)
SELECT count(x.number)
FROM tbl AS x
, tbl AS z
WHERE (x.number = z.number) AND 1
Query id: 3ba0c863-8432-441a-b04c-e06047436cbc
โโexplainโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WITH tbl AS โ
โ ( โ
โ SELECT * โ
โ FROM numbers(1000) โ
โ ) โ
โ SELECT count(number) โ
โ FROM tbl AS x โ
โ CROSS JOIN tbl AS z โ
โ WHERE (number = z.number) AND 1 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
| https://github.com/ClickHouse/ClickHouse/issues/19856 | https://github.com/ClickHouse/ClickHouse/pull/20392 | e9619634754143c9cc43eb5b1e46ca420590f77b | 33dce1296b0192bf459fe56366aa644910e134e0 | "2021-01-30T17:52:42Z" | c++ | "2021-03-10T06:53:55Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,820 | ["src/Columns/ColumnMap.cpp", "src/DataTypes/DataTypeTuple.cpp", "src/Interpreters/convertFieldToType.cpp", "src/Processors/Formats/Impl/ConstantExpressionTemplate.cpp", "src/Processors/Formats/Impl/ValuesBlockInputFormat.cpp", "src/Processors/Formats/Impl/ValuesBlockInputFormat.h", "tests/queries/0_stateless/01550_create_map_type.reference", "tests/queries/0_stateless/01550_create_map_type.sql", "tests/queries/0_stateless/01715_tuple_insert_null_as_default.reference", "tests/queries/0_stateless/01715_tuple_insert_null_as_default.sql"] | Error while trying to insert a tuple containing NULL into a tuple column of non-nullable types | ```
$ ~/arc/build/clickhouse/programs/clickhouse client
ClickHouse client version 21.2.1.1-arcadia.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.2.1 revision 54447.
max42-dev.sas.yp-c.yandex.net :) create table t(a Tuple(UInt8, UInt8)) engine = Log()
CREATE TABLE t
(
`a` Tuple(UInt8, UInt8)
)
ENGINE = Log
Query id: b49dbb5d-d2a9-4c99-b90e-00c60edf2103
Ok.
0 rows in set. Elapsed: 0.005 sec.
max42-dev.sas.yp-c.yandex.net :) insert into t values ((NULL, 42))
INSERT INTO t VALUES
Query id: 318d6f3e-f3bc-467c-85ff-62da908230dd
Logical error: 'Unexpected literal type inside Array: Nothing. It's a bug'.
Aborted (core dumped)
```
This is CH similar to one from Arcadia r7788360 (~fresh master version from GH).
(you don't have to strictly follow this form)
| https://github.com/ClickHouse/ClickHouse/issues/19820 | https://github.com/ClickHouse/ClickHouse/pull/20541 | 427e5f295cf0f88fc1ea0de2722f016d0998cfc7 | 7bbc4e013af6e008c53630fdeca7b6d61b4f9c8f | "2021-01-29T15:39:11Z" | c++ | "2021-02-24T09:00:48Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,795 | ["base/mysqlxx/Connection.cpp", "tests/integration/test_materialize_mysql_database/materialize_with_ddl.py", "tests/integration/test_materialize_mysql_database/test.py"] | exchange data(contains emoji) between ClickHouse and MySQL has exception | I follow official guide use mysql database engine to exchange data between ClickHouse and MySQL
`insert into mysql_database.testUser
select * from clickHouse_database.testUser`
But it throw a exception : Poco::Exception. Code: 1000, e.code() = 1366, e.displayText() = mysqlxx::BadQuery: Incorrect string value: '\xF0\x9F\xA6\x84\xE2\x98...' for column 'person_name' at row 1 (*****:3306) (version 20.8.4.11)
The column value in clickhouse is๏ผๅฐ้้ฉฌ-๐ฆโ๏ธ ,while remote mysql CHARSET is utf8mb4; It seems that the exception because of the emoji value. How can I fix this problem?
| https://github.com/ClickHouse/ClickHouse/issues/19795 | https://github.com/ClickHouse/ClickHouse/pull/19800 | d93dad0ec372ebdb58f8b4f906d187d17d750c38 | 889cebcff903f6cefb5a56a5b66bbda7fd4071c0 | "2021-01-29T06:03:33Z" | c++ | "2021-01-31T07:13:51Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,787 | ["src/Functions/array/arrayEnumerateExtended.h", "tests/queries/0_stateless/01677_array_enumerate_bug.reference", "tests/queries/0_stateless/01677_array_enumerate_bug.sql"] | Unusual arguments for function arrayEnumerateUniq may cause crash or infinite loop | **Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/19758/b9b573976e465670990c041ec303b59df1ee3919/fuzzer_asan/server.log
| https://github.com/ClickHouse/ClickHouse/issues/19787 | https://github.com/ClickHouse/ClickHouse/pull/19788 | 742b74075343ee7df4a92c41600b28b119280ebc | 0679d81c0d9fab9336d5128d204affcde89e66d0 | "2021-01-29T01:38:00Z" | c++ | "2021-01-29T11:58:38Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,769 | ["src/Functions/greatCircleDistance.cpp", "tests/queries/0_stateless/01044_great_circle_angle.reference", "tests/queries/0_stateless/01678_great_circle_angle.reference", "tests/queries/0_stateless/01678_great_circle_angle.sql"] | greatCircleAngle is very inaccurate | **Describe the bug**
`greatCircleAngle` function is very inaccurate for some arguments. Examples:
```
โโgreatCircleAngle(0, 45, 0.1, 45.1)โโ
โ 0.13063148 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
But must be 0.1224388
โโgreatCircleAngle(0, 45, 1, 45)โโ
โ 0.8408964 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Must be 0.7071023
โโgreatCircleAngle(0, 45, 1, 45.1)โโ
โ 0.84645635 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Must be 0.7135268
``` | https://github.com/ClickHouse/ClickHouse/issues/19769 | https://github.com/ClickHouse/ClickHouse/pull/19789 | d19feb724b5bde278120eee5377559db81c65034 | 276e9721667d6d7985224700ad6876b675d7c7c9 | "2021-01-28T12:44:43Z" | c++ | "2021-01-29T18:35:26Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,757 | ["src/Interpreters/Set.cpp", "tests/queries/0_stateless/01681_bloom_filter_nullable_column.reference", "tests/queries/0_stateless/01681_bloom_filter_nullable_column.sql"] | Bug in bloom filter index | **Describe the bug**
1. https://clickhouse-test-reports.s3.yandex.net/19736/68c542aec681bbf841f45fc879c1e97052449555/fuzzer_ubsan/server.log
2. https://clickhouse-test-reports.s3.yandex.net/19736/68c542aec681bbf841f45fc879c1e97052449555/fuzzer_asan/server.log
3. https://clickhouse-test-reports.s3.yandex.net/19736/68c542aec681bbf841f45fc879c1e97052449555/fuzzer_msan/server.log
4. https://clickhouse-test-reports.s3.yandex.net/19736/342326978f2bb2fe5c108c2801cdbabaf407fa68/fuzzer_debug/server.log
5. https://clickhouse-test-reports.s3.yandex.net/19736/342326978f2bb2fe5c108c2801cdbabaf407fa68/fuzzer_tsan/server.log
CC @zhang2014 | https://github.com/ClickHouse/ClickHouse/issues/19757 | https://github.com/ClickHouse/ClickHouse/pull/19884 | 9161a5f5709eb1dde2c791cbd6c883df0e28dff4 | f09158de0ce97bef8c7e357ba5da92b4c42ff0a6 | "2021-01-28T08:17:24Z" | c++ | "2021-02-01T12:42:56Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,756 | ["src/Columns/ColumnFixedString.cpp", "src/Columns/ColumnVector.cpp", "src/Columns/ColumnsCommon.cpp", "src/Common/memcmpSmall.h", "src/Storages/MergeTree/MergeTreeRangeReader.cpp", "tests/queries/0_stateless/01674_filter_by_uint8.reference", "tests/queries/0_stateless/01674_filter_by_uint8.sql"] | Suspected bug in ColumnArray::updatePermutation method | **Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/19702/c74631c650b42e4d107254a03bd82c2c2913039b/fuzzer_msan/server.log
Most likely introduced here: #11006 | https://github.com/ClickHouse/ClickHouse/issues/19756 | https://github.com/ClickHouse/ClickHouse/pull/19799 | 048938effeb65722efd03fa49afbf869e1831dd3 | d19feb724b5bde278120eee5377559db81c65034 | "2021-01-28T08:13:15Z" | c++ | "2021-01-29T18:34:42Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,755 | ["src/Interpreters/ExpressionAnalyzer.cpp", "tests/queries/0_stateless/01674_where_prewhere_array_crash.reference", "tests/queries/0_stateless/01674_where_prewhere_array_crash.sql"] | Segfault in Expression analyzer found with fuzzer | **Describe the bug**
The query:
```
SELECT
(current_database = currentDatabase()) AND (type = 0),
((current_database = currentDatabase()) AND (type = NULL)) AND (type = NULL) AND ((current_database = currentDatabase()) AND (type = 1048575)) AND (type = NULL) AND (event_date >= yesterday())
FROM system.query_log
ARRAY JOIN ProfileEvents
WHERE ProfileEvents AND (current_database = currentDatabase())
ORDER BY event_time DESC NULLS FIRST
LIMIT 0
```
crashes the server.
Most likely introduced here: #16618 | https://github.com/ClickHouse/ClickHouse/issues/19755 | https://github.com/ClickHouse/ClickHouse/pull/19763 | aeaa8d24390a06094c8a9ac69cada8178edbdfa4 | 8dbafc90ca7480187b32da77a28a5c238c4d1dcb | "2021-01-28T08:06:06Z" | c++ | "2021-01-28T17:19:04Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,719 | ["src/Formats/JSONEachRowUtils.cpp", "src/IO/ReadHelpers.cpp", "tests/queries/0_stateless/01701_parallel_parsing_infinite_segmentation.reference", "tests/queries/0_stateless/01701_parallel_parsing_infinite_segmentation.sh"] | Error on JSON import | **Describe the bug**
When importing a jsonlines file (gzip-compressed around 2GB), I always get an error message indicating some issues regarding memory allocation. The machine has 512GB RAM and most of it is not used, therefore, it could be related with the configuration or just simply a software bug. I am using the default config, but did not change it since a year (has something changed in the default values that could be relevant here?). Either way, I am not sure how to fix it. I am using the most recent version (Client & Server 21.1.2.15) and I can reproduce the error. However, due to copyright issues, I cannot share the original dataset.
I import the file as follows
```bash
zcat dataset.jsonl.gz|clickhouse-client --input_format_skip_unknown_fields=1 --input_format_allow_errors_num=1000 -q "INSERT INTO mydataset.mytable FORMAT JSONEachRow"
```
**Error message and/or stacktrace**
And after a while, I always receive the following error message:
```
Code: 49, e.displayText() = DB::Exception: Too large size (18446744071562077831) passed to allocator. It indicates an error., Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception<unsigned long&>(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&) @ 0x864dfc7 in /usr/bin/clickhouse
1. Allocator<false, false>::checkSize(unsigned long) @ 0x864dd7e in /usr/bin/clickhouse
2. Allocator<false, false>::realloc(void*, unsigned long, unsigned long, unsigned long) @ 0x865c784 in /usr/bin/clickhouse
3. DB::loadAtPosition(DB::ReadBuffer&, DB::Memory<Allocator<false, false> >&, char*&) @ 0x865bbfa in /usr/bin/clickhouse
4. DB::fileSegmentationEngineJSONEachRowImpl(DB::ReadBuffer&, DB::Memory<Allocator<false, false> >&, unsigned long) @ 0xf98a612 in /usr/bin/clickhouse
5. DB::ParallelParsingInputFormat::segmentatorThreadFunction(std::__1::shared_ptr<DB::ThreadGroupStatus>) @ 0xf9aed84 in /usr/bin/clickhouse
6. ThreadFromGlobalPool::ThreadFromGlobalPool<void (DB::ParallelParsingInputFormat::*)(std::__1::shared_ptr<DB::ThreadGroupStatus>), DB::ParallelParsingInputFormat*, std::__1::shared_ptr<DB::ThreadGroupStatus> >(void (DB::ParallelParsingInputFormat::*&&)(std::__1::shared_ptr<DB::ThreadGroupStatus>), DB::ParallelParsingInputFormat*&&, std::__1::shared_ptr<DB::ThreadGroupStatus>&&)::'lambda'()::operator()() @ 0xf8a9677 in /usr/bin/clickhouse
7. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x86415ed in /usr/bin/clickhouse
8. ? @ 0x86451a3 in /usr/bin/clickhouse
9. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
10. clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
(version 21.1.2.15 (official build))
Code: 49, e.displayText() = DB::Exception: Too large size (18446744071562077831) passed to allocator. It indicates an error., Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception<unsigned long&>(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&) @ 0x864dfc7 in /usr/bin/clickhouse
1. Allocator<false, false>::checkSize(unsigned long) @ 0x864dd7e in /usr/bin/clickhouse
2. Allocator<false, false>::realloc(void*, unsigned long, unsigned long, unsigned long) @ 0x865c784 in /usr/bin/clickhouse
3. DB::loadAtPosition(DB::ReadBuffer&, DB::Memory<Allocator<false, false> >&, char*&) @ 0x865bbfa in /usr/bin/clickhouse
4. DB::fileSegmentationEngineJSONEachRowImpl(DB::ReadBuffer&, DB::Memory<Allocator<false, false> >&, unsigned long) @ 0xf98a612 in /usr/bin/clickhouse
5. DB::ParallelParsingInputFormat::segmentatorThreadFunction(std::__1::shared_ptr<DB::ThreadGroupStatus>) @ 0xf9aed84 in /usr/bin/clickhouse
6. ThreadFromGlobalPool::ThreadFromGlobalPool<void (DB::ParallelParsingInputFormat::*)(std::__1::shared_ptr<DB::ThreadGroupStatus>), DB::ParallelParsingInputFormat*, std::__1::shared_ptr<DB::ThreadGroupStatus> >(void (DB::ParallelParsingInputFormat::*&&)(std::__1::shared_ptr<DB::ThreadGroupStatus>), DB::ParallelParsingInputFormat*&&, std::__1::shared_ptr<DB::ThreadGroupStatus>&&)::'lambda'()::operator()() @ 0xf8a9677 in /usr/bin/clickhouse
7. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x86415ed in /usr/bin/clickhouse
8. ? @ 0x86451a3 in /usr/bin/clickhouse
9. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
10. clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
(version 21.1.2.15 (official build))
Code: 49. DB::Exception: Too large size (18446744071562077831) passed to allocator. It indicates an error.: data for INSERT was parsed from stdin
```
| https://github.com/ClickHouse/ClickHouse/issues/19719 | https://github.com/ClickHouse/ClickHouse/pull/20286 | 9557bca4af244014b3b13ee3ee2785933eb9681a | a77b740a7cb020c34bce57eccf8dd786c970b16f | "2021-01-27T16:59:25Z" | c++ | "2021-02-15T09:40:09Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,703 | ["contrib/libunwind"] | arm64 is not supported | offical build on arm64,run failed
```bash
root@Kylin:/home# ./clickhouse server
Processing configuration file 'config.xml'.
There is no file 'config.xml', will use embedded config.
Logging trace to console
2021.01.27 18:15:35.011041 [ 39099 ] {} <Information> SentryWriter: Sending crash reports is disabled
2021.01.27 18:15:35.018411 [ 39099 ] {} <Trace> Pipe: Pipe capacity is 1.00 MiB
2021.01.27 18:15:35.124955 [ 39099 ] {} <Information> : Starting ClickHouse 21.1.1.5668 with revision 54445, build id: D1C6B8394C51E8623C170B65DAD284AEDFE76004, PID 39099
2021.01.27 18:15:35.125028 [ 39099 ] {} <Information> Application: starting up
2021.01.27 18:15:35.206564 [ 39099 ] {} <Warning> Application: Calculated checksum of the binary: 56FB1288A52E35C83094DB8E34A77B54. There is no information about the reference checksum.
2021.01.27 18:15:35.206763 [ 39099 ] {} <Trace> Application: Will do mlock to prevent executable memory from being paged out. It may take a few seconds.
2021.01.27 18:15:35.208207 [ 39099 ] {} <Trace> Application: The memory map of clickhouse executable has been mlock'ed, total 97.63 MiB
2021.01.27 18:15:35.208292 [ 39099 ] {} <Information> StatusFile: Status file ./status already exists - unclean restart. Contents:
PID: 38039
Started at: 2021-01-27 18:05:07
Revision: 54445
2021.01.27 18:15:35.208419 [ 39099 ] {} <Debug> Application: Set max number of file descriptors to 1048576 (was 1024).
2021.01.27 18:15:35.208442 [ 39099 ] {} <Debug> Application: Initializing DateLUT.
2021.01.27 18:15:35.208455 [ 39099 ] {} <Trace> Application: Initialized DateLUT with time zone 'PRC'.
2021.01.27 18:15:35.208474 [ 39099 ] {} <Debug> Application: Setting up ./tmp/ to store temporary data in it
2021.01.27 18:15:35.210303 [ 39099 ] {} <Debug> ConfigReloader: Loading config 'config.xml'
Processing configuration file 'config.xml'.
There is no file 'config.xml', will use embedded config.
Saved preprocessed configuration to './preprocessed_configs/config.xml'.
2021.01.27 18:15:35.210843 [ 39099 ] {} <Debug> ConfigReloader: Loaded config 'config.xml', performing update on configuration
2021.01.27 18:15:35.211785 [ 39099 ] {} <Debug> ConfigReloader: Loaded config 'config.xml', performed update on configuration
2021.01.27 18:15:35.212922 [ 39099 ] {} <Debug> Access(user directories): Added users.xml access storage 'users.xml', path: config.xml
2021.01.27 18:15:35.213042 [ 39099 ] {} <Information> Application: Setting max_server_memory_usage was set to 228.20 GiB (253.56 GiB available * 0.90 max_server_memory_usage_to_ram_ratio)
2021.01.27 18:15:35.213308 [ 39099 ] {} <Information> Application: Loading metadata from ./
2021.01.27 18:15:35.213739 [ 39099 ] {} <Information> DatabaseAtomic (system): Total 0 tables and 0 dictionaries.
2021.01.27 18:15:35.213764 [ 39099 ] {} <Information> DatabaseAtomic (system): Starting up tables.
2021.01.27 18:15:35.221502 [ 39099 ] {} <Information> DatabaseAtomic (default): Total 0 tables and 0 dictionaries.
2021.01.27 18:15:35.221533 [ 39099 ] {} <Information> DatabaseAtomic (default): Starting up tables.
2021.01.27 18:15:35.221593 [ 39099 ] {} <Information> DatabaseCatalog: Found 0 partially dropped tables. Will load them and retry removal.
2021.01.27 18:15:35.221615 [ 39099 ] {} <Information> BackgroundSchedulePool/BgSchPool: Create BackgroundSchedulePool with 16 threads
2021.01.27 18:15:35.222822 [ 39099 ] {} <Debug> Application: Loaded metadata.
2021.01.27 18:15:35.223020 [ 39099 ] {} <Information> Application: Listening for http://[::1]:8123
2021.01.27 18:15:35.223082 [ 39099 ] {} <Information> Application: Listening for connections with native protocol (tcp): [::1]:9000
2021.01.27 18:15:35.223570 [ 39100 ] {} <Trace> BaseDaemon: Received signal 6
2021.01.27 18:15:35.223806 [ 39122 ] {} <Fatal> BaseDaemon: ########################################
2021.01.27 18:15:35.223835 [ 39122 ] {} <Fatal> BaseDaemon: (version 21.1.1.5668 (official build), build id: D1C6B8394C51E8623C170B65DAD284AEDFE76004) (from thread 39099) (no query) Received signal Aborted (6)
2021.01.27 18:15:35.223870 [ 39122 ] {} <Fatal> BaseDaemon:
2021.01.27 18:15:35.223902 [ 39122 ] {} <Fatal> BaseDaemon: Stack trace: 0xffff82111568
2021.01.27 18:15:35.223980 [ 39122 ] {} <Fatal> BaseDaemon: 0. gsignal @ 0x31568 in /lib/aarch64-linux-gnu/libc-2.23.so
2021.01.27 18:15:35.302135 [ 39122 ] {} <Fatal> BaseDaemon: Calculated checksum of the binary: 56FB1288A52E35C83094DB8E34A77B54. There is no information about the reference checksum.
2021.01.27 18:15:35.302205 [ 39122 ] {} <Information> SentryWriter: Not sending crash report
ๅทฒๆพๅผ (ๆ ธๅฟๅทฒ่ฝฌๅจ)
```
```bash
root@Kylin:/home# execstack -q ./clickhouse
execstack: "./clickhouse"'s architecture is not supported
root@Kylin:/home#
```
syslog
```bash
Jan 27 18:05:07 Kylin kernel: [7359565.392765] capability: warning: `clickhouse' uses 32-bit capabilities (legacy support in use)
```
```bash
root@Kylin:~# uname -a
Linux Kylin 4.4.131-20190726.kylin.server-generic #kylin SMP Tue Jul 30 16:44:09 CST 2019 aarch64 aarch64 aarch64 GNU/Linux
root@Kylin:~#
``` | https://github.com/ClickHouse/ClickHouse/issues/19703 | https://github.com/ClickHouse/ClickHouse/pull/25854 | 956b1f588dbf5e406bf61e8a9b4e329d35af8b70 | 011ed015fa49c8e1a37f6f103c28def5e637a23f | "2021-01-27T10:43:56Z" | c++ | "2021-06-30T13:18:59Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,691 | ["docs/en/sql-reference/functions/type-conversion-functions.md", "src/Core/callOnTypeIndex.h", "src/Functions/registerFunctionsReinterpret.cpp", "src/Functions/reinterpretAs.cpp", "src/Functions/reinterpretAsFixedString.cpp", "src/Functions/reinterpretAsString.cpp", "src/Functions/ya.make", "tests/performance/reinterpret_as.xml", "tests/queries/0_stateless/01676_reinterpret_as.reference", "tests/queries/0_stateless/01676_reinterpret_as.sql"] | how to convert FixedString(16) to UInt256 in CH? | https://github.com/ClickHouse/ClickHouse/issues/19691 | https://github.com/ClickHouse/ClickHouse/pull/19858 | 1b47cf08a9a9997b89707069b2436858871823c3 | ba45cf32ab839ad02c1fd9a5438d04a4fc7c57d8 | "2021-01-27T08:26:36Z" | c++ | "2021-02-03T09:12:13Z" |
|
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,668 | ["src/AggregateFunctions/AggregateFunctionGroupBitmapData.h", "tests/queries/0_stateless/01671_aggregate_function_group_bitmap_data.reference", "tests/queries/0_stateless/01671_aggregate_function_group_bitmap_data.sql"] | Segfault FunctionBitmap | **Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/19523/9869132386989e10aa914a74844cb520191e5ab3/fuzzer_asan/report.html#fail1
```
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.280066 [ 52341 ] <Fatal> BaseDaemon: ########################################
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.280388 [ 52341 ] <Fatal> BaseDaemon: (version 21.2.1.1, build id: 848D638C25A24123F0A66BCF1C9FC471B1BE106F) (from thread 42759) (query_id: 28aaceff-509d-4188-887a-263570016992) Received signal Segmentation fault (11)
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.280570 [ 52341 ] <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.280750 [ 52341 ] <Fatal> BaseDaemon: Stack trace: 0x398e0bf7 0x13337cbe 0x13332ee6 0x1332cf07 0x12ae0fbd 0x12c5993f 0x12c5bab4 0x2cc99ee7 0x30ff763a 0x2f639557 0x30a8530f 0x30b9c729 0x30b95299 0x30b9e033 0x9005977 0x9013ff8 0x7f9d8eece6db 0x7f9d8ebf7a3f
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.285586 [ 52341 ] <Fatal> BaseDaemon: 4. ./obj-x86_64-linux-gnu/../contrib/croaring/include/roaring/roaring_array.h:79: roaring_bitmap_contains @ 0x398e0bf7 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.289096 [ 52341 ] <Fatal> BaseDaemon: 5. _ZN2DB25RoaringBitmapWithSmallSetIjLDu32EE9rb_andnotERKS1_ @ 0x13337cbe in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.292272 [ 52341 ] <Fatal> BaseDaemon: 6. COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::FunctionBitmap<DB::BitmapAndnotImpl, DB::NameBitmapAndnot>::executeBitmapData<unsigned int>(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, unsigned long) const @ 0x13332ee6 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.295477 [ 52341 ] <Fatal> BaseDaemon: 7. DB::FunctionBitmap<DB::BitmapAndnotImpl, DB::NameBitmapAndnot>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x1332cf07 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.298713 [ 52341 ] <Fatal> BaseDaemon: 8. DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x12ae0fbd in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.301973 [ 52341 ] <Fatal> BaseDaemon: 9. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12c5993f in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.305216 [ 52341 ] <Fatal> BaseDaemon: 10. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12c5bab4 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.307532 [ 52341 ] <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:0: DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const @ 0x2cc99ee7 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.310020 [ 52341 ] <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/Processors/Transforms/ExpressionTransform.cpp:27: DB::ExpressionTransform::transform(DB::Chunk&) @ 0x30ff763a in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.317386 [ 52341 ] <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3933: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x2f639557 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.319997 [ 52341 ] <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.cpp:99: DB::ISimpleTransform::work() @ 0x30a8530f in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.323256 [ 52341 ] <Fatal> BaseDaemon: 15. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:99: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, void ()> >(std::__1::__function::__policy_storage const*) @ 0x30b9c729 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.326217 [ 52341 ] <Fatal> BaseDaemon: 16. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:587: DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>*) @ 0x30b95299 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.329373 [ 52341 ] <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../base/common/../ext/scope_guard.h:97: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_4>(DB::PipelineExecutor::executeImpl(unsigned long)::$_4&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x30b9e033 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.329784 [ 52341 ] <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2210: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x9005977 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.330531 [ 52341 ] <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:1655: 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>)::'lambda1'()> >(void*) @ 0x9013ff8 in /home/qoega/memory-ch/output/binary/clickhouse
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.330674 [ 52341 ] <Fatal> BaseDaemon: 20. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:08.330959 [ 52341 ] <Fatal> BaseDaemon: 21. /build/glibc-2ORdQG/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97: __clone @ 0x121a3f in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
[qoega-qyp.sas.yp-c.yandex.net] 2021.01.26 19:09:10.177200 [ 52341 ] <Fatal> BaseDaemon: Calculated checksum of the binary: 73A029A06424D4E1E2081E2DE050B193. There is no information about the reference checksum.
```
**How to reproduce**
prepare
``` sql
CREATE TABLE bitmap_test
(
`pickup_date` Date,
`city_id` UInt32,
`uid` UInt32
)
ENGINE = Memory;
INSERT INTO bitmap_test SELECT
'2019-01-01',
1,
number
FROM numbers(1, 50);
INSERT INTO bitmap_test SELECT
'2019-01-02',
1,
number
FROM numbers(11, 60);
INSERT INTO bitmap_test SELECT
'2019-01-03',
2,
number
FROM numbers(1, 10);
```
crash
``` sql
SELECT
bitmapCardinality(day_today) AS today_users,
bitmapCardinality(day_before) AS before_users,
bitmapCardinality(bitmapOr(day_today, day_before)) AS ll_users,
bitmapCardinality(bitmapAnd(day_today, day_before)) AS old_users,
bitmapCardinality(bitmapAndnot(day_today, day_before)) AS new_users,
bitmapCardinality(bitmapXor(day_today, day_before)) AS diff_users
FROM
(
SELECT
city_id,
groupBitmapState(uid) AS day_today
FROM bitmap_test
WHERE pickup_date = '2019-01-02'
GROUP BY
uid,
city_id
) AS js1
ALL LEFT JOIN
(
SELECT
city_id,
groupBitmapState(uid) AS day_before
FROM bitmap_test
WHERE pickup_date = '2019-01-01'
GROUP BY city_id
) AS js2 USING (city_id)
``` | https://github.com/ClickHouse/ClickHouse/issues/19668 | https://github.com/ClickHouse/ClickHouse/pull/19713 | 5744a4cac20f8732b3d95f12ded1c84bfad1184a | fa419cead238a075c92227e3add58923464c4164 | "2021-01-26T16:14:23Z" | c++ | "2021-01-28T00:02:20Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,645 | ["src/Storages/tests/gtest_transform_query_for_external_database.cpp", "src/Storages/transformQueryForExternalDatabase.cpp", "tests/integration/test_mysql_database_engine/test.py"] | Why do join and filters get errors๏ผ | table A:

table B:

select
"T_8FB5CF"."id1" "__fcol_0",
"T_8FB5CF"."id2" "__fcol_1",
"T_8FB5CF"."id3" "__fcol_2",
"T_8FB5CF"."id4" "__fcol_3",
"T_8FB5CF"."id5" "__fcol_4",
"T_8FB5CF"."date" "__fcol_5",
"T_8FB5CF"."shuzhi" "__fcol_6",
"T_8FB5CF"."ๆฐๅผ2" "__fcol_7"
from "A1"."B" "T_8FB5CF"
left outer join "A1"."A" "T_8C7546"
on "T_8FB5CF"."id2" = "T_8C7546"."id2"
where (
"T_8C7546"."id2" = ''
or "T_8C7546"."id2" is null
)
limit 5000
ClickHouse exception, code: 47, host: 192.168.5.67, port: 8123; Code: 47, e.displayText() = DB::Exception: Missing columns: 'T_8C7546.id2' while processing query: '(T_8C7546.id2 = '') OR isNull(T_8C7546.id2)', required columns: 'T_8C7546.id2', source columns: 'ๆฐๅผ2' 'shuzhi' 'date' 'id5' 'id3' 'id2' 'id4' 'id1' (version 20.5.4.40) | https://github.com/ClickHouse/ClickHouse/issues/19645 | https://github.com/ClickHouse/ClickHouse/pull/21640 | aa3e8fc4f01a80ef93996d19fa17469a825f8c37 | 0171ab95fa922e79511f2be2b05ec6af662fbb37 | "2021-01-26T12:00:32Z" | c++ | "2021-03-29T13:14:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,570 | ["src/Storages/System/StorageSystemParts.cpp", "src/Storages/System/StorageSystemParts.h", "src/Storages/System/StorageSystemPartsBase.cpp", "src/Storages/System/StorageSystemPartsBase.h", "src/Storages/System/StorageSystemPartsColumns.cpp", "src/Storages/System/StorageSystemPartsColumns.h"] | system.parts (and other system tables): fill only requested columns | When user requested single column from the table we still calculating all of them. Calculation of some columns is quite expensive (need to do stat calls / read files etc). | https://github.com/ClickHouse/ClickHouse/issues/19570 | https://github.com/ClickHouse/ClickHouse/pull/21035 | 8e6fa404c4b6eb618d84411814432e59fc1d9a72 | fbe0a14a2ff1ecd4846f5c1a89c8b740be7c80e9 | "2021-01-25T12:04:40Z" | c++ | "2021-03-02T21:39:45Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,568 | ["src/Interpreters/DDLWorker.cpp", "tests/queries/0_stateless/01181_db_atomic_drop_on_cluster.reference", "tests/queries/0_stateless/01181_db_atomic_drop_on_cluster.sql", "tests/queries/0_stateless/arcadia_skip_list.txt"] | DROP TABLE default.test_repl ON CLUSTER 'default' SYNC failed for Atomic | **Describe the bug**
For DATABASE ENGINE Atomic (used by Default for all databases from 20.10)
when try to `DROP TALBE replicatedmergetree table ON CLUSTER ... SYNC`, query failed after `distributed_ddl_task_timeout` seconds
`decrease `database_atomic_delay_before_drop_table_sec=1` and setup `database_atomic_wait_for_drop_and_detach_synchronously=1` for default user profile didn't help
**How to reproduce**
just look to https://gist.github.com/Slach/a7f2946a108883f6b1d5585b1b5b6b0d
```
bash -x ./reproduce.sh
```
* Which ClickHouse server version to use
Latest official docker build
* Non-default settings, if any
```
<yandex>
<database_atomic_delay_before_drop_table_sec>1</database_atomic_delay_before_drop_table_sec>
<profile>
<default>
<database_atomic_wait_for_drop_and_detach_synchronously>1</database_atomic_wait_for_drop_and_detach_synchronously>
<distributed_ddl_task_timeout>20</distributed_ddl_task_timeout>
</default>
</profile>
</yandex>
```
**Expected behavior**
Successfull DROP TABLE on cluster
**Error message and/or stacktrace**
Code: 159. DB::Exception: Received from localhost:9000. DB::Exception: Watching task /clickhouse/task_queue/ddl/query-0000000001 is executing longer than distributed_ddl_task_timeout (=20) seconds. There are 2 unfinished hosts (0 of them are currently active), they are going to execute the query in background.
**Additional context**
table physically deleted, but Atomic engine doesn't return "finished" flag to Zookeeper `distributed_ddl` queue
```
docker-compose exec clickhouse-0-0-0 clickhouse-client -q "SELECT * FROM system.zookeeper WHERE path='/clickhouse/task_queue/ddl/query-0000000001/finished' FORMAT
Vertical"
```
returns empty result
| https://github.com/ClickHouse/ClickHouse/issues/19568 | https://github.com/ClickHouse/ClickHouse/pull/19572 | 463a48dfe3f273da372b1fd74ef48a9a4f7add19 | b8d6655131a76717589d83b3e2d6f3970db4f9b9 | "2021-01-25T11:18:10Z" | c++ | "2021-01-26T09:51:07Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,495 | ["src/Interpreters/MergeJoin.cpp", "src/Interpreters/SortedBlocksWriter.cpp", "tests/queries/0_stateless/01671_merge_join_and_constants.reference", "tests/queries/0_stateless/01671_merge_join_and_constants.sql"] | Block structure mismatch in Native stream | https://clickhouse-test-reports.s3.yandex.net/19475/02d28c1f9b9558ca5af267167a542819b9e1d061/fuzzer_debug/report.html#fail1 | https://github.com/ClickHouse/ClickHouse/issues/19495 | https://github.com/ClickHouse/ClickHouse/pull/19648 | bd81f43ecb33dfd160f54b97cebf533156d9565e | e3ac2639d29185b652777e474c376add8ff26296 | "2021-01-23T09:12:09Z" | c++ | "2021-01-27T09:49:27Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,478 | ["src/Interpreters/TreeRewriter.cpp"] | Part of exception message is misleading. | **Describe the issue**
```
SELECT xyz
Query id: 0c7d8017-4686-404c-9991-388d9a693e5f
0 rows in set. Elapsed: 0.003 sec.
Received exception from server (version 21.2.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Missing columns: 'xyz' while processing query: 'SELECT xyz', required columns: 'xyz', maybe you meant: .
```
The fragment `maybe you meant: .` should not be present. | https://github.com/ClickHouse/ClickHouse/issues/19478 | https://github.com/ClickHouse/ClickHouse/pull/19487 | 6c5302969b23d0868cd02e80499670b11cecb087 | 045a8e8a0cbf86cdb9677b7e8ab55b80cdd3c841 | "2021-01-23T00:37:11Z" | c++ | "2021-01-28T09:01:24Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,441 | ["base/common/DateLUTImpl.h", "tests/queries/0_stateless/01666_date_lut_buffer_overflow.reference", "tests/queries/0_stateless/01666_date_lut_buffer_overflow.sql"] | AddressSanitizer: heap-buffer-overflow on address in DateLUT | query, report https://gist.github.com/alesapin/c91d9ffd65471c4d8b595219a26a601a.
Full report
https://clickhouse-test-reports.s3.yandex.net/19412/cc2788af881c96701076b366259bc99525d926b1/fuzzer_asan/report.html#fail1 | https://github.com/ClickHouse/ClickHouse/issues/19441 | https://github.com/ClickHouse/ClickHouse/pull/19472 | 7f059e376559784097e8e308e902dc53be0fec7e | 9baac1204ef1918190e712b2612706bd13e1f00b | "2021-01-22T16:30:37Z" | c++ | "2021-01-23T09:05:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,428 | ["docs/en/engines/table-engines/integrations/s3.md", "docs/en/engines/table-engines/mergetree-family/mergetree.md", "src/Disks/S3/registerDiskS3.cpp", "src/IO/S3Common.cpp", "src/IO/S3Common.h", "src/Storages/StorageS3.cpp", "src/Storages/StorageS3Settings.cpp", "src/Storages/StorageS3Settings.h"] | S3 - Allow setting x-amz-server-side-encryption-customer-(key/md5) | **Use case**
With S3, you have to send the header `x-amz-server-side-encryption-customer-key` and `x-amz-server-side-encryption-customer-key-md5` if the resource is server side encrypted.
https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeysSSEUsingRESTAPI.html
https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
**Describe the solution you'd like**
Ability to set this in the query. | https://github.com/ClickHouse/ClickHouse/issues/19428 | https://github.com/ClickHouse/ClickHouse/pull/19748 | 655dbc5c0a1e25722a18c941edbf74a5851ee45d | a2997905223a612b38ca2783105a01bc7106dd0d | "2021-01-22T12:41:10Z" | c++ | "2021-02-15T12:23:14Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,413 | ["base/common/DateLUTImpl.h", "tests/queries/0_stateless/01666_date_lut_buffer_overflow.reference", "tests/queries/0_stateless/01666_date_lut_buffer_overflow.sql"] | MemorySanitizer: use-of-uninitialized-value in DateLUTImpl::addMonths | ```
SELECT (toDate(number % 1024) AS base) + toIntervalMonth(number) AS d, toDateTime(d) AS t, toQuarter(d) AS qd, toQuarter(t) AS qt, arrayJoin([65537, NULL, NULL, 255, NULL]), toStartOfQuarter(d) AS sqd, toStartOfQuarter(t) AS sqt, NULL, toRelativeQuarterNum(d) - toRelativeQuarterNum(base) AS qdiff_d, toRelativeQuarterNum(t) - toRelativeQuarterNum(base) AS qdiff_t FROM system.numbers LIMIT 1048577
==75==WARNING: MemorySanitizer: use-of-uninitialized-value
2021.01.22 00:10:30.189774 [ 124 ] {} <Debug> AsynchronousMetrics: MemoryTracking: was 5.85 GiB, peak 6.91 GiB, will set to 6.27 GiB (RSS), difference: 427.34 MiB
#0 0x2042935c in DateLUTImpl::addMonths(StrongTypedef<unsigned short, DayNumTag>, long) const (/workspace/clickhouse+0x2042935c)
#1 0x2042ab4d in void DB::Adder<DB::AddMonthsImpl>::vectorVector<DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>, DB::ColumnVector<long> >(DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>&, DB::ColumnVector<long> const&, DateLUTImpl const&, unsigned long) const (/workspace/clickhouse+0x2042ab4d)
#2 0x20427b0c in void DB::Adder<DB::AddMonthsImpl>::vectorVector<DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> >(DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>&, DB::IColumn const&, DateLUTImpl const&) const (/workspace/clickhouse+0x20427b0c)
#3 0x204242ee in DB::DateTimeAddIntervalImpl<DB::DataTypeDate, DB::DataTypeDate, DB::AddMonthsImpl>::execute(DB::AddMonthsImpl, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&) (/workspace/clickhouse+0x204242ee)
#4 0x20420ff9 in DB::FunctionDateOrDateTimeAddInterval<DB::AddMonthsImpl>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x20420ff9)
#5 0x1218de5c in DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x1218de5c)
#6 0x123067de in DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x123067de)
#7 0x12308953 in DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12308953)
#8 0x1232eaf3 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 (/workspace/clickhouse+0x1232eaf3)
#9 0x15a1d821 in DB::FunctionBinaryArithmetic<DB::PlusImpl, DB::NamePlus, true>::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 (/workspace/clickhouse+0x15a1d821)
#10 0x15a1a957 in DB::FunctionBinaryArithmetic<DB::PlusImpl, DB::NamePlus, true>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x15a1a957)
#11 0x1218de5c in DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x1218de5c)
#12 0x123067de in DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x123067de)
#13 0x12308953 in DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12308953)
#14 0x2c320796 in DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:333:56
#15 0x2c320796 in DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:449:13
#16 0x30664319 in DB::ExpressionTransform::transform(DB::Chunk&) obj-x86_64-linux-gnu/../src/Processors/Transforms/ExpressionTransform.cpp:25:17
2021.01.22 00:10:31.104031 [ 93 ] {} <Trace> SystemLog (system.query_thread_log): Flushing system log, 139 entries to flush
#17 0x2eca8656 in DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.h:42:9
2021.01.22 00:10:31.115189 [ 93 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 1.04 TiB.
#18 0x300f280e in DB::ISimpleTransform::work() obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.cpp:89:9
2021.01.22 00:10:31.127293 [ 93 ] {} <Trace> system.query_thread_log (507277e5-eb51-482d-ba7a-f4f50ab655e4): Renaming temporary part tmp_insert_202101_194_194_0 to 202101_194_194_0.
#19 0x30209c28 in DB::executeJob(DB::IProcessor*) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:79:20
#20 0x30209c28 in DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0::operator()() const obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:96:13
#21 0x30209c28 in decltype(std::__1::forward<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(fp)()) std::__1::__invoke<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676:1
#22 0x30209c28 in void std::__1::__invoke_void_return_wrapper<void>::__call<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&) obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:348:9
#23 0x30209c28 in std::__1::__function::__default_alloc_func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, void ()>::operator()() obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:1608:12
#24 0x30209c28 in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, void ()> >(std::__1::__function::__policy_storage const*) obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2089:16
#25 0x30202798 in std::__1::__function::__policy_func<void ()>::operator()() const obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2221:16
#26 0x30202798 in std::__1::function<void ()>::operator()() const obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2560:12
#27 0x30202798 in DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>*) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:580:17
#28 0x301fbfbb in DB::PipelineExecutor::executeSingleThread(unsigned long, unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:473:5
#29 0x301fbfbb in DB::PipelineExecutor::executeImpl(unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:807:9
#30 0x301fa389 in DB::PipelineExecutor::execute(unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:395:9
2021.01.22 00:10:31.128865 [ 93 ] {} <Trace> SystemLog (system.query_thread_log): Flushed system log
#31 0x30239707 in DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:79:24
#32 0x30239707 in DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const obj-x86_64-linux-gnu/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:101:13
#33 0x30239707 in decltype(std::__1::forward<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&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3682:1
#34 0x30239707 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<>) obj-x86_64-linux-gnu/../contrib/libcxx/include/tuple:1415:1
#35 0x30239707 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<>&) obj-x86_64-linux-gnu/../contrib/libcxx/include/tuple:1424:1
#36 0x30239707 in ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()::operator()() obj-x86_64-linux-gnu/../src/Common/ThreadPool.h:178:13
#37 0x30239707 in decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<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&&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676:1
#38 0x30239707 in void std::__1::__invoke_void_return_wrapper<void>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<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&&...) obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:348:9
#39 0x30239707 in std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>::operator()() obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:1608:12
#40 0x30239707 in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2089:16
#41 0x8e84ac6 in std::__1::__function::__policy_func<void ()>::operator()() const obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2221:16
#42 0x8e84ac6 in std::__1::function<void ()>::operator()() const obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2560:12
#43 0x8e84ac6 in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:247:17
#44 0x8e93147 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()::operator()() const obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:124:73
#45 0x8e93147 in decltype(std::__1::forward<void>(fp)(std::__1::forward<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(fp0)...)) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(void&&, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()&&...) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676:1
#46 0x8e93147 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>)::'lambda1'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>&, std::__1::__tuple_indices<>) obj-x86_64-linux-gnu/../contrib/libcxx/include/thread:280:5
#47 0x8e93147 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>)::'lambda1'()> >(void*) obj-x86_64-linux-gnu/../contrib/libcxx/include/thread:291:5
#48 0x7fc751149608 in start_thread /build/glibc-ZN95T4/glibc-2.31/nptl/pthread_create.c:477:8
2021.01.22 00:10:31.141948 [ 151 ] {} <Trace> system.text_log (b8497000-33d9-41b9-ac94-fb118fa3defc): Found 2 old parts to remove.
2021.01.22 00:10:31.142114 [ 151 ] {} <Debug> system.text_log (b8497000-33d9-41b9-ac94-fb118fa3defc): Removing part from filesystem 202101_92_142_33
2021.01.22 00:10:31.143288 [ 151 ] {} <Debug> system.text_log (b8497000-33d9-41b9-ac94-fb118fa3defc): Removing part from filesystem 202101_143_143_0
#49 0x7fc751070292 in clone /build/glibc-ZN95T4/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Uninitialized value was created by a heap allocation
#0 0x8d30f59 in operator new(unsigned long) (/workspace/clickhouse+0x8d30f59)
#1 0x3a3b8994 in std::__1::__unique_if<DateLUTImpl>::__unique_single std::__1::make_unique<DateLUTImpl, 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&) obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068:28
#2 0x3a3b8994 in DateLUT::getImplementation(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const obj-x86_64-linux-gnu/../base/common/DateLUT.cpp:155:22
#3 0x3a3b715c in DateLUT::DateLUT() obj-x86_64-linux-gnu/../base/common/DateLUT.cpp:145:25
#4 0x3a3b8f38 in DateLUT::getInstance() obj-x86_64-linux-gnu/../base/common/DateLUT.cpp:162:20
#5 0x9446001 in DateLUT::instance() obj-x86_64-linux-gnu/../base/daemon/../common/DateLUT.h:22:33
#6 0x9446001 in BaseDaemon::setupWatchdog() obj-x86_64-linux-gnu/../base/daemon/BaseDaemon.cpp:915:5
#7 0x9442fbc in BaseDaemon::initialize(Poco::Util::Application&) obj-x86_64-linux-gnu/../base/daemon/BaseDaemon.cpp:684:9
#8 0x8d3e8f2 in DB::Server::initialize(Poco::Util::Application&) obj-x86_64-linux-gnu/../programs/server/Server.cpp:330:17
#9 0x3a59a758 in Poco::Util::Application::run() obj-x86_64-linux-gnu/../contrib/poco/Util/src/Application.cpp:329:2
#10 0x8d3e6df in DB::Server::run() obj-x86_64-linux-gnu/../programs/server/Server.cpp:325:25
#11 0x3a5f8997 in Poco::Util::ServerApplication::run(int, char**) obj-x86_64-linux-gnu/../contrib/poco/Util/src/ServerApplication.cpp:611:9
#12 0x8d3a3ea in mainEntryClickHouseServer(int, char**) obj-x86_64-linux-gnu/../programs/server/Server.cpp:117:20
#13 0x8d34dd3 in main obj-x86_64-linux-gnu/../programs/main.cpp:368:12
#14 0x7fc750f750b2 in __libc_start_main /build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: MemorySanitizer: use-of-uninitialized-value (/workspace/clickhouse+0x2042935c) in DateLUTImpl::addMonths(StrongTypedef<unsigned short, DayNumTag>, long) const
Exiting
2021.01.22 00:10:31.207355 [ 76 ] {} <Trace> BaseDaemon: Received signal -3
2021.01.22 00:10:31.207778 [ 164 ] {} <Fatal> BaseDaemon: ########################################
2021.01.22 00:10:31.208191 [ 164 ] {} <Fatal> BaseDaemon: (version 21.2.1.5755, build id: F1A4445C24A6E92131892AF512612B8E9929650E) (from thread 160) (query_id: d407de76-cf24-4783-80c3-e7aeb1183911) Received signal Unknown signal (-3)
2021.01.22 00:10:31.208406 [ 164 ] {} <Fatal> BaseDaemon: Sanitizer trap.
2021.01.22 00:10:31.208650 [ 164 ] {} <Fatal> BaseDaemon: Stack trace: 0x8e335d9 0x944ebcc 0x8d20e76 0x8cb76c3 0x2042935d 0x2042ab4e 0x20427b0d 0x204242ef 0x20420ffa 0x1218de5d 0x123067df 0x12308954 0x1232eaf4 0x15a1d822 0x15a1a958 0x1218de5d 0x123067df 0x12308954 0x2c320797 0x3066431a 0x2eca8657 0x300f280f 0x30209c29 0x30202799 0x301fbfbc 0x301fa38a 0x30239708 0x8e84ac7 0x8e93148 0x7fc751149609 0x7fc751070293
2021.01.22 00:10:31.209174 [ 164 ] {} <Fatal> BaseDaemon: 0. ./obj-x86_64-linux-gnu/../src/Common/StackTrace.cpp:293: StackTrace::StackTrace() @ 0x8e335d9 in /workspace/clickhouse
2021.01.22 00:10:31.210266 [ 164 ] {} <Fatal> BaseDaemon: 1. ./obj-x86_64-linux-gnu/../src/Common/CurrentThread.h:81: sanitizerDeathCallback() @ 0x944ebcc in /workspace/clickhouse
2021.01.22 00:10:31.214559 [ 164 ] {} <Fatal> BaseDaemon: 2. __sanitizer::Die() @ 0x8d20e76 in /workspace/clickhouse
2021.01.22 00:10:31.218654 [ 164 ] {} <Fatal> BaseDaemon: 3. ? @ 0x8cb76c3 in /workspace/clickhouse
2021.01.22 00:10:31.222694 [ 164 ] {} <Fatal> BaseDaemon: 4. DateLUTImpl::addMonths(StrongTypedef<unsigned short, DayNumTag>, long) const @ 0x2042935d in /workspace/clickhouse
2021.01.22 00:10:31.226809 [ 164 ] {} <Fatal> BaseDaemon: 5. void DB::Adder<DB::AddMonthsImpl>::vectorVector<DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>, DB::ColumnVector<long> >(DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>&, DB::ColumnVector<long> const&, DateLUTImpl const&, unsigned long) const @ 0x2042ab4e in /workspace/clickhouse
2021.01.22 00:10:31.230890 [ 164 ] {} <Fatal> BaseDaemon: 6. void DB::Adder<DB::AddMonthsImpl>::vectorVector<DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> >(DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul>&, DB::IColumn const&, DateLUTImpl const&) const @ 0x20427b0d in /workspace/clickhouse
2021.01.22 00:10:31.234976 [ 164 ] {} <Fatal> BaseDaemon: 7. DB::DateTimeAddIntervalImpl<DB::DataTypeDate, DB::DataTypeDate, DB::AddMonthsImpl>::execute(DB::AddMonthsImpl, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&) @ 0x204242ef in /workspace/clickhouse
2021.01.22 00:10:31.239023 [ 164 ] {} <Fatal> BaseDaemon: 8. DB::FunctionDateOrDateTimeAddInterval<DB::AddMonthsImpl>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x20420ffa in /workspace/clickhouse
2021.01.22 00:10:31.243204 [ 164 ] {} <Fatal> BaseDaemon: 9. DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x1218de5d in /workspace/clickhouse
2021.01.22 00:10:31.247175 [ 164 ] {} <Fatal> BaseDaemon: 10. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x123067df in /workspace/clickhouse
2021.01.22 00:10:31.251310 [ 164 ] {} <Fatal> BaseDaemon: 11. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12308954 in /workspace/clickhouse
2021.01.22 00:10:31.255293 [ 164 ] {} <Fatal> BaseDaemon: 12. 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 @ 0x1232eaf4 in /workspace/clickhouse
2021.01.22 00:10:31.259321 [ 164 ] {} <Fatal> BaseDaemon: 13. DB::FunctionBinaryArithmetic<DB::PlusImpl, DB::NamePlus, true>::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 @ 0x15a1d822 in /workspace/clickhouse
2021.01.22 00:10:31.263314 [ 164 ] {} <Fatal> BaseDaemon: 14. DB::FunctionBinaryArithmetic<DB::PlusImpl, DB::NamePlus, true>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x15a1a958 in /workspace/clickhouse
2021.01.22 00:10:31.267300 [ 164 ] {} <Fatal> BaseDaemon: 15. DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x1218de5d in /workspace/clickhouse
2021.01.22 00:10:31.271164 [ 164 ] {} <Fatal> BaseDaemon: 16. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x123067df in /workspace/clickhouse
2021.01.22 00:10:31.275049 [ 164 ] {} <Fatal> BaseDaemon: 17. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12308954 in /workspace/clickhouse
2021.01.22 00:10:31.277791 [ 164 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:0: DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const @ 0x2c320797 in /workspace/clickhouse
2021.01.22 00:10:31.280690 [ 164 ] {} <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../src/Processors/Transforms/ExpressionTransform.cpp:27: DB::ExpressionTransform::transform(DB::Chunk&) @ 0x3066431a in /workspace/clickhouse
2021.01.22 00:10:31.289856 [ 164 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3933: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x2eca8657 in /workspace/clickhouse
2021.01.22 00:10:31.293343 [ 164 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.cpp:99: DB::ISimpleTransform::work() @ 0x300f280f in /workspace/clickhouse
2021.01.22 00:10:31.297418 [ 164 ] {} <Fatal> BaseDaemon: 22. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:99: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, void ()> >(std::__1::__function::__policy_storage const*) @ 0x30209c29 in /workspace/clickhouse
2021.01.22 00:10:31.301110 [ 164 ] {} <Fatal> BaseDaemon: 23. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:587: DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>*) @ 0x30202799 in /workspace/clickhouse
2021.01.22 00:10:31.304646 [ 164 ] {} <Fatal> BaseDaemon: 24. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:0: DB::PipelineExecutor::executeImpl(unsigned long) @ 0x301fbfbc in /workspace/clickhouse
2021.01.22 00:10:31.306845 [ 97 ] {} <Debug> DiskLocal: Reserving 1.80 MiB on disk `default`, having unreserved 1.04 TiB.
2021.01.22 00:10:31.308060 [ 164 ] {} <Fatal> BaseDaemon: 25. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:1627: DB::PipelineExecutor::execute(unsigned long) @ 0x301fa38a in /workspace/clickhouse
2021.01.22 00:10:31.311478 [ 164 ] {} <Fatal> BaseDaemon: 26. ./obj-x86_64-linux-gnu/../base/common/../ext/scope_guard.h:97: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x30239708 in /workspace/clickhouse
2021.01.22 00:10:31.311896 [ 164 ] {} <Fatal> BaseDaemon: 27. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2210: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x8e84ac7 in /workspace/clickhouse
2021.01.22 00:10:31.312884 [ 164 ] {} <Fatal> BaseDaemon: 28. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:1655: 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>)::'lambda1'()> >(void*) @ 0x8e93148 in /workspace/clickhouse
2021.01.22 00:10:31.313029 [ 164 ] {} <Fatal> BaseDaemon: 29. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
2021.01.22 00:10:31.313148 [ 164 ] {} <Fatal> BaseDaemon: 30. __clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
``` | https://github.com/ClickHouse/ClickHouse/issues/19413 | https://github.com/ClickHouse/ClickHouse/pull/19472 | 7f059e376559784097e8e308e902dc53be0fec7e | 9baac1204ef1918190e712b2612706bd13e1f00b | "2021-01-22T10:24:45Z" | c++ | "2021-01-23T09:05:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,395 | ["docker/test/fuzzer/query-fuzzer-tweaks-users.xml"] | A query may lead to OOM in Fuzz testing in CI environment if server is build with TSan | ```
2021.01.21 21:28:31.096590 [ 84 ] {6bc0adce-30a5-47ff-ba9d-33da61a057cb} <Debug> executeQuery: (from [::1]:59472, using production parser) SELECT groupArrayInsertAt(number, number) FROM (SELECT * FROM system.numbers LIMIT 1048575) GROUP BY number ORDER BY number DESC NULLS FIRST
2021.01.21 21:29:30.000676 [ 121 ] {} <Debug> MemoryTracker: Current memory usage (total): 82.85 GiB.
2021.01.21 21:30:30.000684 [ 121 ] {} <Debug> MemoryTracker: Current memory usage (total): 151.89 GiB.
2021.01.21 21:31:30.000581 [ 121 ] {} <Debug> MemoryTracker: Current memory usage (total): 221.06 GiB.
...
==75==FATAL: ThreadSanitizer: internal allocator is out of memory trying to allocate 0x90 bytes
==75==FATAL: ThreadSanitizer: internal allocator is out of memory trying to allocate 0xe8 bytes
==75==ERROR: ThreadSanitizer: allocator is out of memory trying to allocate 0x578 bytes
==75==ERROR: ThreadSanitizer failed to allocate 0x2000 (8192) bytes of InternalMmapVector (error code: 12)
==75==FATAL: ThreadSanitizer: internal allocator is out of memory trying to allocate 0xb8 bytes
```
https://clickhouse-test-reports.s3.yandex.net/19372/0a155ee2f150d1aaed2c223ea7ec7bb816132ce5/fuzzer_tsan/server.log | https://github.com/ClickHouse/ClickHouse/issues/19395 | https://github.com/ClickHouse/ClickHouse/pull/19396 | 49e1321df444bdc665a823002c20ab9543cc79ec | 819483fd9a92eb1265acc4f8fb0b00b351429f65 | "2021-01-22T00:12:09Z" | c++ | "2021-01-22T18:09:25Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,391 | ["docker/test/fasttest/run.sh", "src/Functions/FunctionsAES.h", "tests/queries/0_stateless/01663_aes_msan.reference", "tests/queries/0_stateless/01663_aes_msan.sql"] | MSan report in AES functions | **Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/19372/0a155ee2f150d1aaed2c223ea7ec7bb816132ce5/fuzzer_msan/server.log
**How to reproduce**
```
SELECT encrypt('aes-128-cbc', 'text', 'keykeykeykeykeyk', '')
``` | https://github.com/ClickHouse/ClickHouse/issues/19391 | https://github.com/ClickHouse/ClickHouse/pull/19397 | 7d2108d4e9d7864e962fa25a0232c37116823374 | feebf64cb173018039909fd800efbae273e1152f | "2021-01-21T23:29:14Z" | c++ | "2021-01-23T01:47:36Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,389 | ["cmake/autogenerated_versions.txt", "src/Core/Defines.h", "src/Interpreters/ClientInfo.cpp", "src/Interpreters/ClientInfo.h", "src/Interpreters/QueryLog.cpp", "src/Interpreters/QueryThreadLog.cpp", "src/Server/HTTPHandler.cpp", "src/Storages/System/StorageSystemProcesses.cpp", "tests/queries/0_stateless/01661_referer.reference", "tests/queries/0_stateless/01661_referer.sh"] | ClientInfo and query_log does not have http_referer field | **Use case**
ClickHouse as a web server becomes a viable scenario.
(At least in backoffice).
**Describe the solution you'd like**
Add this field.
**Additional context**
It's in question how to name it. The original HTTP specs has the famous typo in it and name it `referer`. While JavaScript has this typo fixed and name it `referrer`.
| https://github.com/ClickHouse/ClickHouse/issues/19389 | https://github.com/ClickHouse/ClickHouse/pull/19390 | 9818bd319a6f22b6c116359cd30459071ad9e511 | 6e1d660e361f053d9b466a603be54d28b238c337 | "2021-01-21T21:52:20Z" | c++ | "2021-01-22T14:25:09Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,382 | ["src/AggregateFunctions/AggregateFunctionSumMap.h", "tests/queries/0_stateless/00502_sum_map.reference", "tests/queries/0_stateless/00502_sum_map.sql"] | sumMap does not work for decimal values | **Describe the bug**
Performing `sumMap` function with decimal values does not sum properly. looks like an overflow.
**Does it reproduce on recent release?**
[The list of releases](https://github.com/ClickHouse/ClickHouse/blob/master/utils/list-versions/version_date.tsv)
Yes. tried on latest `21.1.2.15` as well as `20.12.4.5`
**How to reproduce**
```sql
CREATE TABLE sum_map(
statusMap Nested(
goal_id UInt16,
revenue Decimal32(5)
)
) ENGINE = Log;
INSERT INTO sum_map VALUES
([1, 2, 3], [10.5, 10.5, 10.5]),
([3, 4, 5], [10.5, 10.5, 10.5]),
([4, 5, 6], [10.5, 10.5, 10.5]),
([6, 7, 8], [10.5, 10.5, 10.5]);
SELECT
sumMap(statusMap.goal_id, statusMap.revenue)
FROM sum_map;
```
**Expected behavior**
The decimal values in the nested revenue column should be summed properly. The select above leads to:
```
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| sumMap(statusMap.goal_id, statusMap.revenue) |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ([1,2,3,4,5,6,7,8],[1521106780904990803940045903404371.81840,-305731560536066622954267316264999.30736,25802410697087604800041730231.52928,25802360332470575101123994625.01152,25802360332494186933538342851.08000,25802360332517798765952691077.14848,25802360332694887509060302762.16208,25802360332742111173888999214.29904]) |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```
**note** when writing this issue I accidentally [submitted pre-maturely](https://github.com/ClickHouse/ClickHouse/issues/19380) and closed that one. | https://github.com/ClickHouse/ClickHouse/issues/19382 | https://github.com/ClickHouse/ClickHouse/pull/20970 | a79ccce074293063cd30e808ab9b02abe4b01114 | c5643c47d002175779bff343a9584d1af8a7b5bd | "2021-01-21T18:29:30Z" | c++ | "2021-02-20T10:43:12Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,376 | ["tests/queries/0_stateless/01733_transform_ubsan.reference", "tests/queries/0_stateless/01733_transform_ubsan.sql"] | arrayStringConcat | arrayMap + ubsan | **Describe the bug**
Sanitizer died without any info (except stacktrace) of what happened.
**How to reproduce**
```sql
SELECT arrayStringConcat(arrayMap(x -> transform(x, [1025, -9223372036854775808, 65537, 257, 1048576, 10, 7, 1048575, 65536], ['yandex', 'googlegooglegooglegoogle', 'test', '', '', 'hello', 'world', '', 'xyz'], ''), arrayMap(x -> (x % -inf), range(number))), '')
FROM system.numbers
LIMIT 1025
```
**Error message and/or stacktrace**
```bash
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.162550 [ 144 ] <Fatal> BaseDaemon: ########################################
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.162651 [ 144 ] <Fatal> BaseDaemon: (version 21.1.1.5710, build id: BD338362C5B02B66ADA8E69227E73F4708363058) (from thread 131) (query_id: fe7de6de-0452-4024-b847-ebba579e6f7d) Received signal Unknown signal (-3)
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.162690 [ 144 ] <Fatal> BaseDaemon: Sanitizer trap.
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.162766 [ 144 ] <Fatal> BaseDaemon: Stack trace: 0xdfee3e5 0xe2177f6 0xdfb24d6 0xdfbff6f 0x163825e6 0x162230fd 0x16207226 0x117e9897 0x12298a2c 0x1229994e 0x198be4d4 0x198bdac0 0x198bfc6f 0x19f791cd 0x12298a2c 0x1229994e 0x1208b365 0x1a2db3eb 0x171aece7 0x117e9897 0x12298a2c 0x1229994e 0x198be4d4 0x198bdac0 0x1ae59a4e 0x1a512392 0x1ac42b80 0x1ac924b9 0x1ac923a7 0x1ac90db4 0x1ac8f68a 0x1ac8f14b
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.162919 [ 144 ] <Fatal> BaseDaemon: 0. ./obj-x86_64-linux-gnu/../src/Common/StackTrace.cpp:293: StackTrace::StackTrace() @ 0xdfee3e5 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.163296 [ 144 ] <Fatal> BaseDaemon: 1. ./obj-x86_64-linux-gnu/../base/daemon/BaseDaemon.cpp:380: sanitizerDeathCallback() @ 0xe2177f6 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.168024 [ 144 ] <Fatal> BaseDaemon: 2. __sanitizer::Die() @ 0xdfb24d6 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.172536 [ 144 ] <Fatal> BaseDaemon: 3. ? @ 0xdfbff6f in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.177022 [ 144 ] <Fatal> BaseDaemon: 4. bool DB::(anonymous namespace)::FunctionTransform::executeNumToStringWithConstDefault<double>(DB::ColumnVector<double> const*, DB::IColumn*) const @ 0x163825e6 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.181373 [ 144 ] <Fatal> BaseDaemon: 5. bool DB::(anonymous namespace)::FunctionTransform::executeNum<double>(DB::IColumn const*, DB::IColumn*, DB::IColumn const*) const @ 0x162230fd in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.185769 [ 144 ] <Fatal> BaseDaemon: 6. DB::(anonymous namespace)::FunctionTransform::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x16207226 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.190142 [ 144 ] <Fatal> BaseDaemon: 7. DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x117e9897 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.194494 [ 144 ] <Fatal> BaseDaemon: 8. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12298a2c in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.198877 [ 144 ] <Fatal> BaseDaemon: 9. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1229994e in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.201029 [ 144 ] <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:0: DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool) @ 0x198be4d4 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.203286 [ 144 ] <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:0: DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const @ 0x198bdac0 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.205471 [ 144 ] <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/vector:658: DB::ExpressionActions::execute(DB::Block&, bool) const @ 0x198bfc6f in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.209455 [ 144 ] <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../src/Functions/FunctionsMiscellaneous.h:50: DB::ExecutableFunctionExpression::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x19f791cd in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.213803 [ 144 ] <Fatal> BaseDaemon: 14. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12298a2c in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.218142 [ 144 ] <Fatal> BaseDaemon: 15. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1229994e in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.222477 [ 144 ] <Fatal> BaseDaemon: 16. 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 @ 0x1208b365 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.225109 [ 144 ] <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../src/Columns/ColumnFunction.cpp:0: DB::ColumnFunction::reduce() const @ 0x1a2db3eb in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.229410 [ 144 ] <Fatal> BaseDaemon: 18. DB::FunctionArrayMapped<DB::ArrayMapImpl, DB::NameArrayMap>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x171aece7 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.233809 [ 144 ] <Fatal> BaseDaemon: 19. DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x117e9897 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.238142 [ 144 ] <Fatal> BaseDaemon: 20. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12298a2c in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.242587 [ 144 ] <Fatal> BaseDaemon: 21. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x1229994e in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.244760 [ 144 ] <Fatal> BaseDaemon: 22. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:0: DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool) @ 0x198be4d4 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.246956 [ 144 ] <Fatal> BaseDaemon: 23. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:0: DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const @ 0x198bdac0 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.250224 [ 144 ] <Fatal> BaseDaemon: 24. ./obj-x86_64-linux-gnu/../src/Processors/Transforms/ExpressionTransform.cpp:0: DB::ExpressionTransform::transform(DB::Chunk&) @ 0x1ae59a4e in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.254092 [ 144 ] <Fatal> BaseDaemon: 25. ./obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.h:43: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x1a512392 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.257255 [ 144 ] <Fatal> BaseDaemon: 26. ./obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.cpp:99: DB::ISimpleTransform::work() @ 0x1ac42b80 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.260526 [ 144 ] <Fatal> BaseDaemon: 27. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:87: DB::executeJob(DB::IProcessor*) @ 0x1ac924b9 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.263750 [ 144 ] <Fatal> BaseDaemon: 28. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:99: decltype(std::__1::forward<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(fp)()) std::__1::__invoke<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&) @ 0x1ac923a7 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.266915 [ 144 ] <Fatal> BaseDaemon: 29. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:0: DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>*) @ 0x1ac90db4 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.270057 [ 144 ] <Fatal> BaseDaemon: 30. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:0: DB::PipelineExecutor::executeImpl(unsigned long) @ 0x1ac8f68a in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.273207 [ 144 ] <Fatal> BaseDaemon: 31. ./obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:398: DB::PipelineExecutor::execute(unsigned long) @ 0x1ac8f14b in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.01.18 08:09:43.536362 [ 144 ] <Fatal> BaseDaemon: Calculated checksum of the binary: 0DCC252AE8A764B28A0843DACDC5AC66. There is no information about the reference checksum.
Error on processing query 'SELECT arrayStringConcat(arrayMap(x -> transform(x, [1025, -9223372036854775808, 65537, 257, 1048576, 10, 7, 1048575, 65536], ['yandex', 'googlegooglegooglegoogle', 'test', '', '', 'hello', 'world', '', 'xyz'], ''), arrayMap(x -> (x % -inf), range(number))), '') FROM system.numbers LIMIT 1025': Code: 32, e.displayText() = DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000, Stack trace (when copying this message, always include the lines below):
0. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1b9e1d12 in /workspace/clickhouse
1. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:55: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0xdfcffd4 in /workspace/clickhouse
2. ./obj-x86_64-linux-gnu/../src/IO/VarInt.h:0: DB::throwReadAfterEOF() @ 0xdfe9969 in /workspace/clickhouse
3. ./obj-x86_64-linux-gnu/../src/IO/VarInt.h:133: void DB::readVarUIntImpl<false>(unsigned long&, DB::ReadBuffer&) @ 0xe0163ef in /workspace/clickhouse
4. ./obj-x86_64-linux-gnu/../src/Client/Connection.cpp:0: DB::Connection::receivePacket(std::__1::function<void (Poco::Net::Socket&)>) @ 0x1aa90486 in /workspace/clickhouse
5. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::receiveAndProcessPacket(bool) @ 0xe0e3442 in /workspace/clickhouse
6. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::receiveResult() @ 0xe0ea012 in /workspace/clickhouse
7. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::processOrdinaryQuery() @ 0xe0d2e08 in /workspace/clickhouse
8. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::processParsedSingleQuery() @ 0xe0cf7f7 in /workspace/clickhouse
9. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::processWithFuzzing(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xe0ca31b in /workspace/clickhouse
10. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:988: DB::Client::processMultiQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xe0cc28d in /workspace/clickhouse
11. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::nonInteractive() @ 0xe0be0bf in /workspace/clickhouse
12. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:709: DB::Client::mainImpl() @ 0xe0b67dd in /workspace/clickhouse
13. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::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&) @ 0xe0afbcb in /workspace/clickhouse
14. ./obj-x86_64-linux-gnu/../contrib/poco/Util/src/Application.cpp:0: Poco::Util::Application::run() @ 0x1b96c0ca in /workspace/clickhouse
15. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: mainEntryClickHouseClient(int, char**) @ 0xe0a3804 in /workspace/clickhouse
16. ./obj-x86_64-linux-gnu/../programs/main.cpp:0: main @ 0xdfc4014 in /workspace/clickhouse
17. /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344: __libc_start_main @ 0x21bf7 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
18. _start @ 0xdfa212e in /workspace/clickhouse
(version 21.1.1.5710)
```
https://clickhouse-test-reports.s3.yandex.net/18788/6a78b10e0b1ef3e341dfc7959ef24b7dede0dc1d/fuzzer_ubsan/fuzzer.log | https://github.com/ClickHouse/ClickHouse/issues/19376 | https://github.com/ClickHouse/ClickHouse/pull/21051 | 50639b7dba0ba3c5a6c94d6badafa6627f47883d | 9f9b862a477e545288d3d67ca36a08f0c39d012f | "2021-01-21T18:01:10Z" | c++ | "2021-02-22T10:11:01Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,362 | ["src/Interpreters/HashJoin.cpp", "src/Interpreters/IJoin.h", "src/Interpreters/MergeJoin.cpp", "src/Interpreters/join_common.cpp", "src/Interpreters/join_common.h", "tests/queries/0_stateless/01637_nullable_fuzz3.reference", "tests/queries/0_stateless/01637_nullable_fuzz3.sql"] | FULL OUTER JOIN: Logical error: 'Bad cast from type DB::ColumnString to DB::ColumnNullable'. | **Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/19316/9ae3628b662f5f9b34695a3f4f7b07307323fc8b/fuzzer_tsan/report.html#fail1
**How to reproduce**
Tried to reproduce locally, but it worked without data
``` sql
CREATE TABLE foo
(
`server_date` Date,
`dimension_1` String,
`metric_1` UInt32
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(server_date)
ORDER BY server_date
CREATE TABLE bar
(
`server_date` Date,
`dimension_1` String,
`metric_2` UInt32
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(server_date)
ORDER BY server_date
SELECT dimension_1, sum_metric_1, sum_metric_2 FROM (SELECT dimension_1, sum(metric_1) AS sum_metric_1 FROM foo GROUP BY dimension_1 WITH TOTALS) AS subquery_1 ALL FULL OUTER JOIN (SELECT dimension_1, sum(metric_2) AS sum_metric_2 FROM bar GROUP BY dimension_1 WITH TOTALS) AS subquery_2 USING (dimension_1) WHERE sum_metric_2 < NULL ORDER BY dimension_1 ASC
```
```
2021.01.21 14:38:20.107827 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Fatal> : Logical error: 'Bad cast from type DB::ColumnString to DB::ColumnNullable'.
2021.01.21 14:38:20.108891 [ 147 ] {} <Fatal> BaseDaemon: ########################################
2021.01.21 14:38:20.109223 [ 147 ] {} <Fatal> BaseDaemon: (version 21.1.1.5748, build id: A13A5A1D2B64279205A7F80714E67C76ED64DBC7) (from thread 77) (query_id: ff7d1781-d7e2-4596-ac76-b8b721f05908) Received signal Aborted (6)
2021.01.21 14:38:20.109468 [ 147 ] {} <Fatal> BaseDaemon:
2021.01.21 14:38:20.109756 [ 147 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f349fe6318b 0x7f349fe42859 0x108a9b46 0x108a9bf1 0x10b09c04 0x196db4d7 0x19712f80 0x1a01eb8c 0x1a01efd7 0x1abb6bb3 0x1abb4892 0x1abae7d6 0x1abb9fc8 0x1e3f10fc 0x1e3f1900 0x1e530963 0x1e52d7ed 0x1e52c678 0x7f34a0018609 0x7f349ff3f293
2021.01.21 14:38:20.110203 [ 147 ] {} <Fatal> BaseDaemon: 4. raise @ 0x4618b in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.01.21 14:38:20.110363 [ 147 ] {} <Fatal> BaseDaemon: 5. abort @ 0x25859 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.01.21 14:38:20.110890 [ 147 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:50: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x108a9b46 in /workspace/clickhouse
2021.01.21 14:38:20.111316 [ 147 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:56: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x108a9bf1 in /workspace/clickhouse
2021.01.21 14:38:20.115652 [ 147 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Common/assert_cast.h:47: DB::ColumnNullable const& assert_cast<DB::ColumnNullable const&, DB::IColumn const&>(DB::IColumn const&) @ 0x10b09c04 in /workspace/clickhouse
2021.01.21 14:38:20.150828 [ 147 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/DataTypes/DataTypeNullable.cpp:92: DB::DataTypeNullable::serializeBinaryBulkWithMultipleStreamsImpl(DB::IColumn const&, unsigned long, unsigned long, DB::IDataType::SerializeBinaryBulkSettings&, std::__1::shared_ptr<DB::IDataType::SerializeBinaryBulkState>&) const @ 0x196db4d7 in /workspace/clickhouse
2021.01.21 14:38:20.184167 [ 147 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/DataTypes/IDataType.cpp:287: DB::IDataType::serializeBinaryBulkWithMultipleStreams(DB::IColumn const&, unsigned long, unsigned long, DB::IDataType::SerializeBinaryBulkSettings&, std::__1::shared_ptr<DB::IDataType::SerializeBinaryBulkState>&) const @ 0x19712f80 in /workspace/clickhouse
2021.01.21 14:38:20.220331 [ 147 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/DataStreams/NativeBlockOutputStream.cpp:58: DB::NativeBlockOutputStream::writeData(DB::IDataType const&, COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&, DB::WriteBuffer&, unsigned long, unsigned long) @ 0x1a01eb8c in /workspace/clickhouse
2021.01.21 14:38:20.256528 [ 147 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/DataStreams/NativeBlockOutputStream.cpp:124: DB::NativeBlockOutputStream::write(DB::Block const&) @ 0x1a01efd7 in /workspace/clickhouse
2021.01.21 14:38:20.301459 [ 147 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:713: DB::TCPHandler::sendTotals(DB::Block const&) @ 0x1abb6bb3 in /workspace/clickhouse
2021.01.21 14:38:20.346480 [ 147 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:642: DB::TCPHandler::processOrdinaryQueryWithProcessors() @ 0x1abb4892 in /workspace/clickhouse
2021.01.21 14:38:20.390877 [ 147 ] {} <Fatal> BaseDaemon: 15. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:277: DB::TCPHandler::runImpl() @ 0x1abae7d6 in /workspace/clickhouse
2021.01.21 14:38:20.435869 [ 147 ] {} <Fatal> BaseDaemon: 16. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1417: DB::TCPHandler::run() @ 0x1abb9fc8 in /workspace/clickhouse
2021.01.21 14:38:20.487235 [ 147 ] {} <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:43: Poco::Net::TCPServerConnection::start() @ 0x1e3f10fc in /workspace/clickhouse
2021.01.21 14:38:20.538425 [ 147 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:112: Poco::Net::TCPServerDispatcher::run() @ 0x1e3f1900 in /workspace/clickhouse
2021.01.21 14:38:20.589951 [ 147 ] {} <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:199: Poco::PooledThread::run() @ 0x1e530963 in /workspace/clickhouse
2021.01.21 14:38:20.642154 [ 147 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x1e52d7ed in /workspace/clickhouse
2021.01.21 14:38:20.694410 [ 147 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345: Poco::ThreadImpl::runnableEntry(void*) @ 0x1e52c678 in /workspace/clickhouse
2021.01.21 14:38:20.694872 [ 147 ] {} <Fatal> BaseDaemon: 22. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
2021.01.21 14:38:20.695241 [ 147 ] {} <Fatal> BaseDaemon: 23. clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.01.21 14:38:21.645514 [ 147 ] {} <Fatal> BaseDaemon: Calculated checksum of the binary: 21CF627C42A57CBD36677FCEAAE2085B. There is no information about the reference checksum.
2021.01.21 14:38:31.622759 [ 68 ] {} <Fatal> Application: Child process was terminated by signal 6.
```
```
2021.01.21 14:38:20.065603 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> executeQuery: (from [::1]:49620, using production parser) SELECT dimension_1, sum_metric_1, sum_metric_2 FROM (SELECT dimension_1, sum(metric_1) AS sum_metric_1 FROM foo GROUP BY dimension_1 WITH TOTALS) AS subquery_1 ALL FULL OUTER JOIN (SELECT dimension_1, sum(metric_2) AS sum_metric_2 FROM bar GROUP BY dimension_1 WITH TOTALS) AS subquery_2 USING (dimension_1) WHERE sum_metric_2 < NULL ORDER BY dimension_1 ASC
2021.01.21 14:38:20.068542 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> ContextAccess (default): Access granted: SELECT(dimension_1, metric_1) ON default.foo
2021.01.21 14:38:20.070805 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> ContextAccess (default): Access granted: SELECT(dimension_1, metric_2) ON default.bar
2021.01.21 14:38:20.073383 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> ContextAccess (default): Access granted: SELECT(dimension_1, metric_1) ON default.foo
2021.01.21 14:38:20.076820 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> ContextAccess (default): Access granted: SELECT(dimension_1, metric_2) ON default.bar
2021.01.21 14:38:20.078239 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> default.bar (1c923af5-c234-4905-b24e-79cc8abce11f) (SelectExecutor): Key condition: unknown
2021.01.21 14:38:20.078357 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> default.bar (1c923af5-c234-4905-b24e-79cc8abce11f) (SelectExecutor): MinMax index condition: unknown
2021.01.21 14:38:20.078461 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> default.bar (1c923af5-c234-4905-b24e-79cc8abce11f) (SelectExecutor): Not using primary index on part 202001_1_1_0
2021.01.21 14:38:20.078563 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> default.bar (1c923af5-c234-4905-b24e-79cc8abce11f) (SelectExecutor): Selected 1 parts by partition key, 1 parts by primary key, 1 marks by primary key, 1 marks to read from 1 ranges
2021.01.21 14:38:20.079029 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> default.bar (1c923af5-c234-4905-b24e-79cc8abce11f) (SelectExecutor): Reading approx. 2 rows with 1 streams
2021.01.21 14:38:20.079529 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2021.01.21 14:38:20.081010 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> HashJoin: Right sample block: subquery_2.dimension_1 String String(size = 0), sum_metric_2 UInt64 UInt64(size = 0)
2021.01.21 14:38:20.087090 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> default.foo (440b87bd-055c-4e04-9d78-e2b6e316e086) (SelectExecutor): Key condition: unknown
2021.01.21 14:38:20.087211 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> default.foo (440b87bd-055c-4e04-9d78-e2b6e316e086) (SelectExecutor): MinMax index condition: unknown
2021.01.21 14:38:20.087308 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> default.foo (440b87bd-055c-4e04-9d78-e2b6e316e086) (SelectExecutor): Not using primary index on part 202001_1_1_0
2021.01.21 14:38:20.087424 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> default.foo (440b87bd-055c-4e04-9d78-e2b6e316e086) (SelectExecutor): Selected 1 parts by partition key, 1 parts by primary key, 1 marks by primary key, 1 marks to read from 1 ranges
2021.01.21 14:38:20.087851 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> default.foo (440b87bd-055c-4e04-9d78-e2b6e316e086) (SelectExecutor): Reading approx. 2 rows with 1 streams
2021.01.21 14:38:20.088320 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2021.01.21 14:38:20.089351 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2021.01.21 14:38:20.103011 [ 144 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> AggregatingTransform: Aggregating
2021.01.21 14:38:20.103114 [ 144 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> Aggregator: Aggregation method: key_string
2021.01.21 14:38:20.103420 [ 144 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> AggregatingTransform: Aggregated. 2 to 2 rows (from 36.00 B) in 0.006889853 sec. (290.2819552173319 rows/sec., 5.10 KiB/sec.)
2021.01.21 14:38:20.103509 [ 144 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> Aggregator: Merging aggregated data
2021.01.21 14:38:20.104376 [ 144 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> CreatingSetsTransform: Creating join.
2021.01.21 14:38:20.104810 [ 144 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> CreatingSetsTransform: Created Join with 2 entries from 2 rows in 0.000419498 sec.
2021.01.21 14:38:20.105497 [ 144 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Debug> MergingSortedTransform: Merge sorted 1 blocks, 0 rows in 0.008 sec., 0.0 rows/sec., 26.86 KiB/sec
2021.01.21 14:38:20.106979 [ 144 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> PipelineExecutor: Thread finished. Total time: 0.004590221 sec. Execution time: 0.002985379 sec. Processing time: 0.001532918 sec. Wait time: 7.1924e-05 sec.
2021.01.21 14:38:20.107047 [ 141 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> PipelineExecutor: Thread finished. Total time: 0.004615111 sec. Execution time: 0.000593121 sec. Processing time: 1.0846e-05 sec. Wait time: 0.004011144 sec.
2021.01.21 14:38:20.107069 [ 143 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Trace> PipelineExecutor: Thread finished. Total time: 0.004653067 sec. Execution time: 1.3484e-05 sec. Processing time: 5.579e-06 sec. Wait time: 0.004634004 sec.
2021.01.21 14:38:20.107827 [ 77 ] {ff7d1781-d7e2-4596-ac76-b8b721f05908} <Fatal> : Logical error: 'Bad cast from type DB::ColumnString to DB::ColumnNullable'.
2021.01.21 14:38:20.109223 [ 147 ] {} <Fatal> BaseDaemon: (version 21.1.1.5748, build id: A13A5A1D2B64279205A7F80714E67C76ED64DBC7) (from thread 77) (query_id: ff7d1781-d7e2-4596-ac76-b8b721f05908) Received signal Aborted (6)
``` | https://github.com/ClickHouse/ClickHouse/issues/19362 | https://github.com/ClickHouse/ClickHouse/pull/21248 | 63b95c7451c70f35d3692b88340d87c4a0e4649d | df728dc4ba5cae45958a1c5ee96d49049f1d6919 | "2021-01-21T14:46:24Z" | c++ | "2021-02-27T08:31:02Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,303 | ["src/Interpreters/join_common.cpp", "src/Processors/Transforms/JoiningTransform.cpp", "tests/queries/0_stateless/01107_join_right_table_totals.reference", "tests/queries/0_stateless/01107_join_right_table_totals.sql"] | Join + Invalid number of rows in Chunk | ```sql
CREATE TABLE t (item_id UInt64, price_sold Float32, date Date) ENGINE MergeTree ORDER BY item_id;
SELECT id, yago FROM (SELECT item_id AS id, materialize([arrayJoin([NULL, NULL]), NULL AS x, arrayJoin([0.9998999834060669, NULL, NULL, NULL]), arrayJoin([1048577, -inf, 100.0000991821289, NULL])]), SUM(price_sold) AS recent FROM t WHERE and(date >= NULL) GROUP BY 1023, id WITH TOTALS) AS ll FULL OUTER JOIN (SELECT item_id AS id, SUM(price_sold) AS yago FROM t WHERE (date >= '2018-12-17') AND (date <= '2019-03-10') GROUP BY id WITH TOTALS) AS rr USING (id);
```
```sql
SELECT
id,
yago
FROM
(
SELECT
item_id AS id,
materialize([arrayJoin([NULL, NULL]), NULL AS x, arrayJoin([0.9998999834060669, NULL, NULL, NULL]), arrayJoin([1048577, -inf, 100.0000991821289, NULL])]),
SUM(price_sold) AS recent
FROM t
WHERE and(date >= NULL)
GROUP BY
1023,
id
WITH TOTALS
) AS ll
FULL OUTER JOIN
(
SELECT
item_id AS id,
SUM(price_sold) AS yago
FROM t
WHERE (date >= '2018-12-17') AND (date <= '2019-03-10')
GROUP BY id
WITH TOTALS
) AS rr USING (id)
Query id: 308fbfd9-aed7-4de6-9f34-843c909b9243
Received exception from server (version 21.1.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Invalid number of rows in Chunk column Float64 position 1: expected 32, got 1.
``` | https://github.com/ClickHouse/ClickHouse/issues/19303 | https://github.com/ClickHouse/ClickHouse/pull/22129 | 3bc170e5ec59f30af4b47a8d3d0efcbcd6dccc5f | c762fa2f756d2f60d475403624fa5a6a000f99ad | "2021-01-20T09:48:23Z" | c++ | "2021-03-29T02:26:17Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,288 | ["src/Storages/tests/gtest_transform_query_for_external_database.cpp", "src/Storages/transformQueryForExternalDatabase.cpp", "tests/integration/test_mysql_database_engine/test.py"] | MySQL (table function, database engine) WHERE clause can't have condition on column from right table | **Describe the bug**
When you trying to join different mysql tables, clickhouse would accept in WHERE clause only columns from left table.
**Does it reproduce on recent release?**
Yes
**How to reproduce**
Clickhouse 21.1
```
docker run --name misaka -e MYSQL_ROOT_PASSWORD=xxxxx -p 3306:3306 -d mysql:latest
mysql --host 127.0.0.1 --password
> use mysql;
> CREATE TABLE members (
member_id INT AUTO_INCREMENT,
name VARCHAR(100),
PRIMARY KEY (member_id)
);
> CREATE TABLE committees (
committee_id INT AUTO_INCREMENT,
name VARCHAR(100),
PRIMARY KEY (committee_id)
);
> INSERT INTO members(name)
VALUES('John'),('Jane'),('Mary'),('David'),('Amelia');
> INSERT INTO committees(name)
VALUES('John'),('Mary'),('Amelia'),('Joe');
clickhouse
CREATE DATABASE mysql ENGINE=MySQL('127.0.0.1:3306','mysql','root','xxxxx');
SELECT *
FROM mysql.members AS m
INNER JOIN mysql.committees AS c ON m.name = c.name
โโmember_idโโฌโnameโโโโฌโcommittee_idโโฌโc.nameโโ
โ 1 โ John โ 1 โ John โ
โ 3 โ Mary โ 2 โ Mary โ
โ 5 โ Amelia โ 3 โ Amelia โ
โโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโ
SELECT *
FROM mysql.members AS m
INNER JOIN mysql.committees AS c ON m.name = c.name
WHERE committee_id = 2
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Missing columns: 'committee_id' while processing query: 'committee_id = 2', required columns: 'committee_id' 'committee_id'
SELECT *
FROM mysql.members AS m
INNER JOIN mysql.committees AS c ON m.name = c.name
WHERE `c.name` = 2
Code: 386. DB::Exception: Received from localhost:9000. DB::Exception: There is no supertype for types String, UInt8 because some of them are String/FixedString and some of them are not: while executing 'FUNCTION equals(c.name : 3, 2 : 4) -> equals(c.name, 2) Nullable(UInt8) : 5'.
^ Clickhouse actually know that c.name type is String.
```
**Additional context**
It looks like that clickhouse trying to push all WHERE conditions to the left mysql table.
https://github.com/ClickHouse/ClickHouse/issues/14614 Looks like related. | https://github.com/ClickHouse/ClickHouse/issues/19288 | https://github.com/ClickHouse/ClickHouse/pull/21640 | aa3e8fc4f01a80ef93996d19fa17469a825f8c37 | 0171ab95fa922e79511f2be2b05ec6af662fbb37 | "2021-01-19T18:15:16Z" | c++ | "2021-03-29T13:14:10Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,283 | ["programs/client/Client.cpp", "tests/queries/0_stateless/00979_live_view_watch_continuous_aggregates.py", "tests/queries/0_stateless/01184_insert_values_huge_strings.sh", "tests/queries/0_stateless/01184_long_insert_values_huge_strings.reference", "tests/queries/0_stateless/01184_long_insert_values_huge_strings.sh", "tests/queries/0_stateless/01246_insert_into_watch_live_view.py"] | FORMAT JSON omits a } | When formatting the output of query as JSON a closing curly brace is missing in the data section.
**Does it reproduce on recent release?**
Reproducible in 21.1.2
**How to reproduce**
```
ClickHouse client version 21.1.2.15 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.1.2 revision 54443.
```
I used the Github dataset, created the table and importet data according to (https://github-sql.github.io/explorer/#download-the-dataset)
The query (from (https://github-sql.github.io/explorer/#how-has-the-list-of-top-repositories-changed-over-the-years), added `FORMAT JSON`)
```
SELECT
repo AS name,
groupArrayInsertAt(toUInt32(c), toUInt64(dateDiff('month', toDate('2015-01-01'), month))) AS data
FROM
(
SELECT
lower(repo_name) AS repo,
toStartOfMonth(created_at) AS month,
count() AS c
FROM github_events
WHERE (event_type = 'WatchEvent') AND (toYear(created_at) >= 2015) AND (repo IN
(
SELECT lower(repo_name) AS repo
FROM github_events
WHERE (event_type = 'WatchEvent') AND (toYear(created_at) >= 2015)
GROUP BY repo
ORDER BY count() DESC
LIMIT 10
))
GROUP BY
repo,
month
)
GROUP BY repo
ORDER BY repo ASC
FORMAT JSON
```
returns
```
{
"meta":
[
{
"name": "name",
"type": "LowCardinality(String)"
},
{
"name": "data",
"type": "Array(UInt32)"
}
],
"data":
[
{
"name": "996icu\/996.icu",
"data": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,182752,143840,7373,2344,1992,1526,1128,1021,1356,1493,874,559,856,885,1044,721,1018,1147,1157,783,784,197]
},
{
"name": "facebook\/react",
"data": [1804,2785,2404,2059,1657,1493,1681,1578,1791,1944,1881,1900,2028,1688,2425,2206,1796,1820,2166,2076,2802,2522,2383,2134,3016,2833,2995,2658,2768,2717,2979,2677,3115,3271,2904,2591,3169,2429,3380,2744,2684,9092,2845,2711,2644,2376,2545,2198,2670,2618,3261,2917,2760,2144,2325,2132,2082,2130,2058,1943,1834,1821,2033,2282,2456,2122,2547,2290,2133,2131,2097,376]
},
{
"name": "freecodecamp\/freecodecamp",
"data": [59,37,36,29,59,1196,10700,6194,3748,7826,11147,12775,17333,19204,16711,16233,18109,20430,10388,10157,11378,13257,14436,14567,15461,14096,14661,15004,16828,13811,1195,1203,922,1194,1041,943,1034,928,1212,952,854,1062,1583,1271,1036,2424,1044,982,1155,1129,2922,3314,1609,1081,1234,1055,1186,1249,1787,1234,1136,1091,1194,1556,1621,1303,1607,1506,1486,1669,1243,289]
},
{
"name": "getify\/you-dont-know-js",
"data": [826,2772,877,1218,987,1492,998,1123,1975,1420,1188,1528,1446,1375,1466,1528,1585,4382,2625,2233,2383,1802,2086,2064,3389,2464,3178,2969,2637,2519,2409,2223,1820,1646,1844,1804,2292,1921,2183,2360,1745,1667,1600,1861,1713,1621,1620,1431,1818,1649,2216,2119,1838,1853,1969,1960,1471,1891,1945,1918,2178,2673,1518,1445,2104,1874,1556,1591,1467,1634,1195,543]
},
{
"name": "jwasham\/coding-interview-university",
"data": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,3043,4460,1518,983,1125,1071,1036,1202,1043,5860,1835,1609,1532,2303,2344,1384,1085,1166,1334,1275,1014,1374,1103,1057,1457,1271,1412,1195,4281,5654,2275,1970,2430,1451,1988,3288,4510,6989,8344,4294,5546,6347,3860,5833,2856,736]
},
{
"name": "kamranahmedse\/developer-roadmap",
"data": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13979,5944,3246,1566,1075,1191,1114,961,777,644,9617,4919,2266,3231,1710,1684,2149,2038,1614,2802,1616,1632,6700,4052,2847,3153,2092,1812,2038,1879,1529,1379,1724,1637,2546,2096,2259,8192,4466,3037,5168,4938,5821,6674,5038,709]
},
{
"name": "microsoft\/vscode",
"data": [0,0,0,0,0,0,0,0,0,0,8199,1290,1047,892,1094,1959,1106,921,871,866,1042,1122,1201,1163,1767,1951,2028,1843,1704,1483,1620,1772,1779,2692,2852,2013,2179,1965,2175,1864,2312,3130,1994,2251,2300,2508,1855,1678,1875,1971,2918,2356,2973,1990,1918,1886,1856,1771,2712,2117,1700,1585,1898,2139,2276,1955,2290,1978,1800,1864,1791,331]
},
{
"name": "sindresorhus\/awesome",
"data": [423,263,297,360,6808,2689,1139,2882,2307,2867,2010,2375,2590,2508,2292,1637,1668,1627,2022,2340,2320,2033,1758,2034,3096,2993,2452,1963,1837,2063,1889,2131,1969,2181,4252,2258,2900,2008,2967,2143,1970,2261,1696,1838,1650,2000,1912,1632,2079,2011,2771,2526,2121,2137,2223,2099,1895,1985,1984,2455,2802,2256,3374,2282,2353,2097,1992,2177,2189,1994,4369,539]
},
{
"name": "tensorflow\/tensorflow",
"data": [0,0,0,0,0,0,0,0,0,0,14078,1931,2162,1492,1734,2290,2780,2207,1997,2038,2360,3034,2844,3344,3881,5164,4427,3633,3829,3525,3488,3588,3398,4318,5225,4802,4230,3359,4412,3592,3535,2829,2749,2404,2550,2596,2518,2202,2276,2081,3461,2820,2627,1910,2213,1853,2064,2010,2059,1658,1370,1284,1605,1638,1693,1407,1501,1294,1257,1214,1612,229]
},
{
"name": "vuejs\/vue",
"data": [0,0,0,0,0,0,0,0,0,1374,1562,1647,1711,1039,1416,2165,2188,1862,2219,2454,3010,3976,3497,3294,4100,4480,4622,3757,3816,3706,4193,3969,4252,4084,3677,3529,4662,3327,4601,3959,3687,11164,4032,3775,3004,2859,3237,3208,3486,2957,5579,4306,3630,3180,3248,2805,2316,2829,2422,2401,1850,2296,3061,3258,2569,2427,2727,2458,2679,1870,1856,407]
],
"rows": 10,
"statistics":
{
"elapsed": 0.657104025,
"rows_read": 231481344,
"bytes_read": 1581901060
}
}
```
Notice the missing `}` after the last name/data tuple of the returned rows
Sadly i was not able to reproduce with a simpler statement or built in tables.
**Expected behavior**
There should be a `}`
| https://github.com/ClickHouse/ClickHouse/issues/19283 | https://github.com/ClickHouse/ClickHouse/pull/23050 | 3770781c1c358e92903486c47f698f8c664b5310 | b029e9e4f6be8c6501ecd8bcb5dd1520924e664f | "2021-01-19T15:02:41Z" | c++ | "2021-04-29T19:00:02Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,281 | ["src/Common/parseRemoteDescription.cpp", "src/Databases/MySQL/FetchTablesColumnsList.cpp", "src/Storages/StorageMySQL.cpp", "src/TableFunctions/TableFunctionMySQL.cpp"] | MySQL Engine: INSERT statement without database name | Create test table:
`CREATE TABLE test (`id` Int32) ENGINE = MySQL('localhost:3306', '', 'test', 'user', 'pass')`
Attempt insert:
`INSERT INTO test VALUES(1)`
CH sending SQL:
`INSERT INTO ``.`test` (`id`) VALUES (1)`
"``." - sending empty database name in generated SQL
However SELECT statement working with empty database name correctrly
P.S.
This can be useful when working with databases such as sphinx | https://github.com/ClickHouse/ClickHouse/issues/19281 | https://github.com/ClickHouse/ClickHouse/pull/23319 | a311a5c0b538d2c644fca8e914c4569e13641a64 | cbbff1bc4b8ed813bb181808433d07ef25388920 | "2021-01-19T13:39:40Z" | c++ | "2021-04-20T16:30:44Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,255 | ["src/Storages/Kafka/KafkaBlockInputStream.cpp", "src/Storages/Kafka/ReadBufferFromKafkaConsumer.cpp", "tests/integration/test_storage_kafka/test.py"] | A bug in Kafka engine: Segmentation fault (JSONEachRowRowInputFormat) | Kafka ingestion crashed the server.
Data is serialized via jackson (possible missing field referenced by queue/topic table)
```
2021.01.18 16:19:09.348955 [ 30912 ] {} <Fatal> BaseDaemon: ########################################
2021.01.18 16:19:09.349037 [ 30912 ] {} <Fatal> BaseDaemon: (version 20.8.3.18, no build id) (from thread 4994) (no query) Received signal Segmentation fault (11)
2021.01.18 16:19:09.349063 [ 30912 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
2021.01.18 16:19:09.349096 [ 30912 ] {} <Fatal> BaseDaemon: Stack trace: 0x1131d9c0 0x118459ac 0x112719d7 0x11890535 0x11891774 0x10a7675d 0x10a91b8a 0x11472f8d 0x11473988 0x1149cde2 0x1149d20a 0x1149d30f 0xa43cc4d 0xa43b3ff 0x7fa73043bea5 0x7fa72fd5896d
2021.01.18 16:19:09.349160 [ 30912 ] {} <Fatal> BaseDaemon: 3. DB::JSONEachRowRowInputFormat::readPrefix() @ 0x1131d9c0 in /usr/bin/clickhouse
2021.01.18 16:19:09.349189 [ 30912 ] {} <Fatal> BaseDaemon: 4. DB::IRowInputFormat::generate() @ 0x118459ac in /usr/bin/clickhouse
2021.01.18 16:19:09.349212 [ 30912 ] {} <Fatal> BaseDaemon: 5. DB::ISource::work() @ 0x112719d7 in /usr/bin/clickhouse
2021.01.18 16:19:09.349229 [ 30912 ] {} <Fatal> BaseDaemon: 6. ? @ 0x11890535 in /usr/bin/clickhouse
2021.01.18 16:19:09.349246 [ 30912 ] {} <Fatal> BaseDaemon: 7. DB::KafkaBlockInputStream::readImpl() @ 0x11891774 in /usr/bin/clickhouse
2021.01.18 16:19:09.349264 [ 30912 ] {} <Fatal> BaseDaemon: 8. DB::IBlockInputStream::read() @ 0x10a7675d in /usr/bin/clickhouse
2021.01.18 16:19:09.349289 [ 30912 ] {} <Fatal> BaseDaemon: 9. DB::copyData(DB::IBlockInputStream&, DB::IBlockOutputStream&, std::__1::atomic<bool>*) @ 0x10a91b8a in /usr/bin/clickhouse
2021.01.18 16:19:09.349307 [ 30912 ] {} <Fatal> BaseDaemon: 10. DB::StorageKafka::streamToViews() @ 0x11472f8d in /usr/bin/clickhouse
2021.01.18 16:19:09.349324 [ 30912 ] {} <Fatal> BaseDaemon: 11. DB::StorageKafka::threadFunc() @ 0x11473988 in /usr/bin/clickhouse
2021.01.18 16:19:09.349341 [ 30912 ] {} <Fatal> BaseDaemon: 12. DB::BackgroundSchedulePoolTaskInfo::execute() @ 0x1149cde2 in /usr/bin/clickhouse
2021.01.18 16:19:09.349358 [ 30912 ] {} <Fatal> BaseDaemon: 13. DB::BackgroundSchedulePool::threadFunction() @ 0x1149d20a in /usr/bin/clickhouse
2021.01.18 16:19:09.349373 [ 30912 ] {} <Fatal> BaseDaemon: 14. ? @ 0x1149d30f in /usr/bin/clickhouse
2021.01.18 16:19:09.349395 [ 30912 ] {} <Fatal> BaseDaemon: 15. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xa43cc4d in /usr/bin/clickhouse
2021.01.18 16:19:09.349411 [ 30912 ] {} <Fatal> BaseDaemon: 16. ? @ 0xa43b3ff in /usr/bin/clickhouse
2021.01.18 16:19:09.349435 [ 30912 ] {} <Fatal> BaseDaemon: 17. start_thread @ 0x7ea5 in /usr/lib64/libpthread-2.17.so
2021.01.18 16:19:09.349459 [ 30912 ] {} <Fatal> BaseDaemon: 18. __clone @ 0xfe96d in /usr/lib64/libc-2.17.so
```
Thank you for your effort and time.
Regards,
Ivan
| https://github.com/ClickHouse/ClickHouse/issues/19255 | https://github.com/ClickHouse/ClickHouse/pull/27794 | ba45bd834ff4a5e0d3c97c7f559522f9d2b92402 | 215385e4d069dff409f780dccd908bc12e73e63e | "2021-01-18T23:11:32Z" | c++ | "2021-08-19T08:25:07Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,222 | ["tests/queries/0_stateless/02212_cte_and_table_alias.reference", "tests/queries/0_stateless/02212_cte_and_table_alias.sql"] | why with query cannot accept the talbe alias | ```sql
WITH t AS
(
SELECT number AS n
FROM numbers(10000)
)
SELECT count(*)
FROM t AS a
WHERE a.n < 5000
Query id: 1248d8af-bb2a-4212-8fd5-e5b89641dd35
Received exception from server (version 21.1.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Missing columns: 'a.n' while processing query: 'WITH t AS (SELECT number AS n FROM numbers(10000)) AS _subquery6 SELECT count() FROM (SELECT number AS n FROM numbers(10000) HAVING n < 5000) AS t WHERE a.n < 5000', required columns: 'a.n' 'a.n'.
0 rows in set. Elapsed: 0.001 sec.
kylin-gtj :) with t as(select number n from numbers(10000))select count(*) from t a where t.n<5000;
WITH t AS
(
SELECT number AS n
FROM numbers(10000)
)
SELECT count(*)
FROM t AS a
WHERE t.n < 5000
Query id: 881b9675-67b8-4a7e-a290-5597d63a9010
โโcount()โโ
โ 5000 โ
โโโโโโโโโโโ
1 rows in set. Elapsed: 0.002 sec. Processed 10.00 thousand rows, 80.00 KB (4.87 million rows/s., 38.96 MB/s.)
``` | https://github.com/ClickHouse/ClickHouse/issues/19222 | https://github.com/ClickHouse/ClickHouse/pull/34615 | 724340418e74790cb296fb9f8a27ae8627a90e4b | 100389b92f76a4a7ff7b5bfb99575ec752931d24 | "2021-01-18T02:27:08Z" | c++ | "2022-02-15T19:42:51Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,217 | ["contrib/dragonbox"] | AArch64: floating point numbers are formatted with excessive zeros. | ```
$ docker run --rm -it --network host --volume $(pwd):/workspace multiarch/ubuntu-core:arm64-bionic /workspace/clickhouse-aarch64 local --query "SELECT 1.5"
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
1.500000000000000
```
It must be `1.5`, not `1.500000000000000`.
Also reproduced on AWS `c6g.4xlarge` instance.
Most likely the bug in Dragonbox, see #17831 | https://github.com/ClickHouse/ClickHouse/issues/19217 | https://github.com/ClickHouse/ClickHouse/pull/19218 | 4c29a29e4a1e918e5f134ed8e69676791e620d0a | b282df488f6069674191dbb61358c0bf86ea990d | "2021-01-17T20:31:26Z" | c++ | "2021-01-18T11:23:33Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,184 | ["src/DataTypes/DataTypeNumberBase.h", "src/DataTypes/IDataType.h", "tests/queries/0_stateless/01656_ipv4_bad_formatting.reference", "tests/queries/0_stateless/01656_ipv4_bad_formatting.sql"] | Misleading indentation of IPv4 addresses in Pretty formats | **Describe the issue**
```
SELECT
extract(log, '\\* Trying ([0-9a-z\\.\\:\\[\\]]+):\\d+\\.\\.\\.') AS resolved_address,
toIPv4(resolved_address) AS ipv4
FROM minicrawl
LIMIT 10
โโresolved_addressโโฌโโโโโโโโโโโipv4โโ
โ 89.46.106.77 โ 89.46.106.77 โ
โ 13.33.243.83 โ 13.33.243.83 โ
โ 93.95.100.90 โ 93.95.100.90 โ
โ 23.227.38.32 โ 23.227.38.32 โ
โ 203.113.174.46 โ 203.113.174.46 โ
โ 13.70.20.161 โ 13.70.20.161 โ
โ 60.199.172.227 โ 60.199.172.227 โ
โ โ 0.0.0.0 โ
โ โ 0.0.0.0 โ
โ 82.149.228.245 โ 82.149.228.245 โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโ
``` | https://github.com/ClickHouse/ClickHouse/issues/19184 | https://github.com/ClickHouse/ClickHouse/pull/19339 | 08dc5ebfa75ebd3d3cf935a5b98938863425738b | 7370335f872063b56d6efa881cacac98edc97616 | "2021-01-16T13:21:18Z" | c++ | "2021-01-21T12:20:24Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,163 | ["docs/en/sql-reference/functions/date-time-functions.md", "docs/zh/sql-reference/functions/date-time-functions.md", "src/Functions/formatDateTime.cpp", "tests/queries/0_stateless/01655_quarter_modificator_for_formatDateTime.reference", "tests/queries/0_stateless/01655_quarter_modificator_for_formatDateTime.sql"] | Add a %Q replacement fields to function formatDateTime to format date to quarter | **Example**
Query:
```` sql
SELECT formatDateTime(toDate('2010-01-04'), '%Q')
````
Result:
```` sql
โโformatDateTime(toDate('2010-01-04'), '%Q')โโ
โ 1 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
````
| https://github.com/ClickHouse/ClickHouse/issues/19163 | https://github.com/ClickHouse/ClickHouse/pull/19224 | cf3a89cd7b722d3ba00af7deec52aebac14a1b0d | 937fb25739b64d8fe8be2ee9e1be9ef39af7b2b2 | "2021-01-16T03:11:02Z" | c++ | "2021-01-18T17:48:43Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,108 | ["src/DataTypes/DataTypeFactory.cpp", "src/Parsers/ParserDataType.cpp", "tests/queries/0_stateless/00945_bloom_filter_index.sql", "tests/queries/0_stateless/01414_low_cardinality_nullable.sql", "tests/queries/0_stateless/01675_data_type_coroutine.reference", "tests/queries/0_stateless/01675_data_type_coroutine.sh", "tests/queries/0_stateless/arcadia_skip_list.txt"] | Fuzzer: Segfault without stacktrace | https://clickhouse-test-reports.s3.yandex.net/18979/27600064159ac63e05800ef37afa41b317771352/fuzzer/report.html#fail1
Fuzzer log:
```
SELECT ((100, (toUInt8(3), toUInt8(NULL)), toUInt8(1048576)), 65537, toUInt8(1023))
FROM dist_01528
WHERE dummy = 100
SETTINGS allow_nondeterministic_optimize_skip_unused_shards = 1
Error on processing query 'SELECT ((100, (toUInt8(3), toUInt8(NULL)), toUInt8(1048576)), 65537, toUInt8(1023)) FROM dist_01528 WHERE dummy = 100 SETTINGS allow_nondeterministic_optimize_skip_unused_shards = 1': Code: 32, e.displayText() = DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000, Stack trace (when copying this message, always include the lines below):
0. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/exception:133: std::exception::capture() @ 0x10763718 in /workspace/clickhouse
1. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/exception:111: std::exception::exception() @ 0x107636e5 in /workspace/clickhouse
2. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Exception.cpp:27: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1e2fad93 in /workspace/clickhouse
3. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:54: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x107455ea in /workspace/clickhouse
4. ./obj-x86_64-linux-gnu/../src/IO/VarInt.h:122: DB::throwReadAfterEOF() @ 0x10763ac7 in /workspace/clickhouse
5. ./obj-x86_64-linux-gnu/../src/IO/VarInt.h:135: void DB::readVarUIntImpl<false>(unsigned long&, DB::ReadBuffer&) @ 0x1079ec87 in /workspace/clickhouse
6. ./obj-x86_64-linux-gnu/../src/IO/VarInt.h:149: DB::readVarUInt(unsigned long&, DB::ReadBuffer&) @ 0x1079e914 in /workspace/clickhouse
7. ./obj-x86_64-linux-gnu/../src/Client/Connection.cpp:762: DB::Connection::receivePacket(std::__1::function<void (Poco::Net::Socket&)>) @ 0x1a954da2 in /workspace/clickhouse
8. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:1667: DB::Client::receiveAndProcessPacket(bool) @ 0x1088fc7b in /workspace/clickhouse
9. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:1653: DB::Client::receiveResult() @ 0x1089477c in /workspace/clickhouse
10. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:1373: DB::Client::processOrdinaryQuery() @ 0x1087be6c in /workspace/clickhouse
11. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:1280: DB::Client::processParsedSingleQuery() @ 0x1087ac5b in /workspace/clickhouse
12. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:1130: DB::Client::processWithFuzzing(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x108786b8 in /workspace/clickhouse
13. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:988: DB::Client::processMultiQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x10879591 in /workspace/clickhouse
14. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:804: DB::Client::nonInteractive() @ 0x10866314 in /workspace/clickhouse
15. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:706: DB::Client::mainImpl() @ 0x10863665 in /workspace/clickhouse
16. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:278: DB::Client::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&) @ 0x10859a76 in /workspace/clickhouse
17. ./obj-x86_64-linux-gnu/../contrib/poco/Util/src/Application.cpp:334: Poco::Util::Application::run() @ 0x1e254aef in /workspace/clickhouse
18. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:2486: mainEntryClickHouseClient(int, char**) @ 0x10851787 in /workspace/clickhouse
19. ./obj-x86_64-linux-gnu/../programs/main.cpp:368: main @ 0x10736ae5 in /workspace/clickhouse
20. /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344: __libc_start_main @ 0x21bf7 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
21. _start @ 0x1073672e in /workspace/clickhouse
(version 21.1.1.5681)
Fuzzing step 314 out of 1000
```
Server log:
```
2021.01.15 01:03:18.452778 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Debug> executeQuery: (from [::1]:46782, using production parser) SELECT (65537, toUInt8(-1)) FROM dist_01528 WHERE dummy = 100 SETTINGS allow_nondeterministic_optimize_skip_unused_shards = 1
2021.01.15 01:03:18.455101 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Debug> StorageDistributed (dist_01528): Skipping irrelevant shards - the query will be sent to the following shards of the cluster (shard numbers): [1]
2021.01.15 01:03:18.457177 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON default.dist_01528
2021.01.15 01:03:18.459540 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Debug> StorageDistributed (dist_01528): Skipping irrelevant shards - the query will be sent to the following shards of the cluster (shard numbers): [1]
2021.01.15 01:03:18.461553 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON default.dist_01528
2021.01.15 01:03:18.465080 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON system.one
2021.01.15 01:03:18.465414 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2021.01.15 01:03:18.466918 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Trace> InterpreterSelectQuery: Complete -> Complete
2021.01.15 01:03:18.470815 [ 114 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Trace> PipelineExecutor: Thread finished. Total time: 0.000321977 sec. Execution time: 0.000111691 sec. Processing time: 0.000193292 sec. Wait time: 1.6994e-05 sec.
2021.01.15 01:03:18.471511 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Information> executeQuery: Read 1 rows, 1.00 B in 0.018558757 sec., 53 rows/sec., 53.88 B/sec.
2021.01.15 01:03:18.471696 [ 66 ] {4d77c30c-b1e8-4cf0-8b78-f1ad5573edb1} <Debug> MemoryTracker: Peak memory usage (for query): 0.00 B.
2021.01.15 01:03:18.472569 [ 66 ] {} <Debug> TCPHandler: Processed in 0.022818956 sec.
2021.01.15 01:03:18.482945 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Debug> executeQuery: (from [::1]:46782, using production parser) SELECT ((-1, (toUInt8(3), toUInt8(NULL)), toUInt8(65537)), 65537, toUInt8(1023)) FROM dist_01528 WHERE dummy = 100 SETTINGS allow_nondeterministic_optimize_skip_unused_shards = 1
2021.01.15 01:03:18.485741 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Debug> StorageDistributed (dist_01528): Skipping irrelevant shards - the query will be sent to the following shards of the cluster (shard numbers): [1]
2021.01.15 01:03:18.489727 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON default.dist_01528
2021.01.15 01:03:18.492585 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Debug> StorageDistributed (dist_01528): Skipping irrelevant shards - the query will be sent to the following shards of the cluster (shard numbers): [2]
2021.01.15 01:03:18.496532 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON default.dist_01528
2021.01.15 01:03:18.502449 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON system.one
2021.01.15 01:03:18.502786 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2021.01.15 01:03:18.505113 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Trace> InterpreterSelectQuery: Complete -> Complete
2021.01.15 01:03:18.510451 [ 131 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Trace> PipelineExecutor: Thread finished. Total time: 0.000431822 sec. Execution time: 0.000240757 sec. Processing time: 0.000171492 sec. Wait time: 1.9573e-05 sec.
2021.01.15 01:03:18.511127 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Information> executeQuery: Read 1 rows, 1.00 B in 0.027976969 sec., 35 rows/sec., 35.74 B/sec.
2021.01.15 01:03:18.511310 [ 66 ] {d4a8e027-35e0-4fa2-94d7-9f1fa1d61276} <Debug> MemoryTracker: Peak memory usage (for query): 0.00 B.
2021.01.15 01:03:18.512219 [ 66 ] {} <Debug> TCPHandler: Processed in 0.035391971 sec.
2021.01.15 01:03:18.520945 [ 66 ] {5c6bacee-e200-4b99-84c7-193fd79cef3b} <Debug> executeQuery: (from [::1]:46782, using production parser) SELECT ((100, (toUInt8(3), toUInt8(NULL)), toUInt8(1048576)), 65537, toUInt8(1023)) FROM dist_01528 WHERE dummy = 100 SETTINGS allow_nondeterministic_optimize_skip_unused_shards = 1
2021.01.15 01:03:18.523659 [ 66 ] {5c6bacee-e200-4b99-84c7-193fd79cef3b} <Debug> StorageDistributed (dist_01528): Skipping irrelevant shards - the query will be sent to the following shards of the cluster (shard numbers): [2]
2021.01.15 01:03:18.527695 [ 66 ] {5c6bacee-e200-4b99-84c7-193fd79cef3b} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON default.dist_01528
2021.01.15 01:03:18.530462 [ 66 ] {5c6bacee-e200-4b99-84c7-193fd79cef3b} <Debug> StorageDistributed (dist_01528): Skipping irrelevant shards - the query will be sent to the following shards of the cluster (shard numbers): [1]
2021.01.15 01:03:18.534410 [ 66 ] {5c6bacee-e200-4b99-84c7-193fd79cef3b} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON default.dist_01528
2021.01.15 01:03:18.535889 [ 66 ] {5c6bacee-e200-4b99-84c7-193fd79cef3b} <Trace> InterpreterSelectQuery: Complete -> Complete
2021.01.15 01:03:18.546266 [ 142 ] {ae3f89c4-0593-425a-ba17-513c9b90ca4a} <Debug> executeQuery: (from [::ffff:127.0.0.1]:46004, initial_query_id: 5c6bacee-e200-4b99-84c7-193fd79cef3b, using production parser) SELECT ((100, (toUInt8(3), toUInt8(NULL)), toUInt8(1048576)), 65537, toUInt8(1023)) FROM system.one WHERE dummy = 100
2021.01.15 01:03:18.552015 [ 142 ] {ae3f89c4-0593-425a-ba17-513c9b90ca4a} <Trace> ContextAccess (default): Access granted: SELECT(dummy) ON system.one
2021.01.15 01:03:18.552394 [ 142 ] {ae3f89c4-0593-425a-ba17-513c9b90ca4a} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2021.01.15 01:03:20.101390 [ 56 ] {} <Fatal> Application: Child process was terminated by signal 11.
```
No other messages from thread 56 in log. | https://github.com/ClickHouse/ClickHouse/issues/19108 | https://github.com/ClickHouse/ClickHouse/pull/19736 | 9f95fd9c627db9f5542bad51cba77efbd1270348 | 386bcb07da36c534c4750b06e0b4bbd7670c78ad | "2021-01-15T10:42:25Z" | c++ | "2021-01-28T15:20:44Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,095 | ["src/Processors/Formats/Impl/ORCBlockInputFormat.cpp", "tests/queries/0_stateless/00900_orc_load.reference", "tests/queries/0_stateless/00900_orc_load.sh"] | Import from ORC doesn't finish | I have an ORC file with 10 mln rows. I created a table with the same structure and executed `insert into <table> select * from file('<filename>', ORC, '<fields>')` . Rows were inserted, and `select count(1) from <table>` gave me 10 mln. But query didn't stop, and still is running. `select query, written_rows from system.processes` shows 700 mln inserted rows and counting.
`CREATE TABLE t (a lot of ordinary fields) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/t', '{replica}') PARTITION BY toYYYYMM(calday) ORDER BY (calday) SETTINGS index_granularity = 8192`
clickhouse version 20.8.2.3.
**Expected behavior**
Query is finished. | https://github.com/ClickHouse/ClickHouse/issues/19095 | https://github.com/ClickHouse/ClickHouse/pull/19134 | 67fd381034ada11191aff46f3b2e841aef4e34ee | 6ed14ba0b67618508ecaf09374ed406c2e7f812d | "2021-01-14T22:13:47Z" | c++ | "2021-01-16T08:03:26Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,088 | ["src/Common/UnicodeBar.cpp", "tests/queries/0_stateless/01654_bar_nan.reference", "tests/queries/0_stateless/01654_bar_nan.sql"] | Function bar: Too large size passed to allocator | ```sql
SELECT bar(-1, -9223372036854775808, nan)
Query id: c54d8992-f48c-44d8-b845-bde3b681ced4
Received exception from server (version 21.1.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Too large size (9223372036854775840) passed to allocator. It indicates an error.: While processing bar(-1, -9223372036854775808, nan).
0 rows in set. Elapsed: 0.020 sec.
```
```
2021.01.14 18:58:16.766365 [ 66 ] {f20828a7-8f87-47c0-89ba-42ba358e121f} <Fatal> : Logical error: 'Too large size (9223372036854775840) passed to allocator. It indicates an error.'.
2021.01.14 18:58:16.766898 [ 62 ] {} <Trace> BaseDaemon: Received signal 6
2021.01.14 18:58:16.767313 [ 150 ] {} <Fatal> BaseDaemon: ########################################
2021.01.14 18:58:16.767527 [ 150 ] {} <Fatal> BaseDaemon: (version 21.1.1.5679, build id: 90D27D0446ED4181B315CB990FC2166587A57DF6) (from thread 66) (query_id: f20828a7-8f87-47c0-89ba-42ba358e121f) Received signal Aborted (6)
2021.01.14 18:58:16.767672 [ 150 ] {} <Fatal> BaseDaemon:
2021.01.14 18:58:16.767846 [ 150 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f3d1e3f2fb7 0x7f3d1e3f4921 0x107454d6 0x10745581 0x107beb1f 0x107be7f0 0x107cec3b 0x107ceac5 0x107caf56 0x1669dd1d 0x12913048 0x12911e2e 0x12916b73 0x12916786 0x12916a3b 0x12917c2b 0x196dc0c8 0x196dbb4a 0x19ef5963 0x19efc990 0x19ef8d06 0x19ef5cc7 0x19ef9619 0x19ef5d33 0x19ed6089 0x19ecabb3 0x19ecee32 0x19ed2349
2021.01.14 18:58:16.768181 [ 150 ] {} <Fatal> BaseDaemon: 4. /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51: raise @ 0x3efb7 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
2021.01.14 18:58:16.768411 [ 150 ] {} <Fatal> BaseDaemon: 5. /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81: abort @ 0x40921 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
2021.01.14 18:58:16.768656 [ 150 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:50: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x107454d6 in /workspace/clickhouse
2021.01.14 18:58:16.768878 [ 150 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:56: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x10745581 in /workspace/clickhouse
2021.01.14 18:58:16.769272 [ 150 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Common/Exception.h:38: DB::Exception::Exception<unsigned long&>(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&) @ 0x107beb1f in /workspace/clickhouse
2021.01.14 18:58:16.769629 [ 150 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Common/Allocator.h:257: Allocator<false, false>::checkSize(unsigned long) @ 0x107be7f0 in /workspace/clickhouse
2021.01.14 18:58:16.770566 [ 150 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Common/Allocator.h:115: Allocator<false, false>::realloc(void*, unsigned long, unsigned long, unsigned long) @ 0x107cec3b in /workspace/clickhouse
2021.01.14 18:58:16.771491 [ 150 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Common/PODArray.h:152: void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::realloc<>(unsigned long) @ 0x107ceac5 in /workspace/clickhouse
2021.01.14 18:58:16.772154 [ 150 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/Common/PODArray.h:237: void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::resize<>(unsigned long) @ 0x107caf56 in /workspace/clickhouse
2021.01.14 18:58:16.786974 [ 150 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../src/Functions/bar.cpp:114: DB::(anonymous namespace)::FunctionBar::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x1669dd1d in /workspace/clickhouse
2021.01.14 18:58:16.793410 [ 150 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Functions/IFunctionImpl.h:203: 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 @ 0x12913048 in /workspace/clickhouse
2021.01.14 18:58:16.799668 [ 150 ] {} <Fatal> BaseDaemon: 15. ./obj-x86_64-linux-gnu/../src/Functions/IFunctionAdaptors.h:158: DB::DefaultExecutable::executeDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x12911e2e in /workspace/clickhouse
2021.01.14 18:58:16.805664 [ 150 ] {} <Fatal> BaseDaemon: 16. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:291: DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12916b73 in /workspace/clickhouse
2021.01.14 18:58:16.811839 [ 150 ] {} <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:240: DB::ExecutableFunctionAdaptor::defaultImplementationForConstantArguments(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12916786 in /workspace/clickhouse
2021.01.14 18:58:16.817896 [ 150 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:283: DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12916a3b in /workspace/clickhouse
2021.01.14 18:58:16.824081 [ 150 ] {} <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:448: DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12917c2b in /workspace/clickhouse
2021.01.14 18:58:16.858075 [ 150 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:211: DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node*, std::__1::allocator<DB::ActionsDAG::Node*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) @ 0x196dc0c8 in /workspace/clickhouse
2021.01.14 18:58:16.891714 [ 150 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:165: DB::ActionsDAG::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> >, DB::Context const&) @ 0x196dbb4a in /workspace/clickhouse
2021.01.14 18:58:16.927658 [ 150 ] {} <Fatal> BaseDaemon: 22. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:501: 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> >) @ 0x19ef5963 in /workspace/clickhouse
2021.01.14 18:58:16.964270 [ 150 ] {} <Fatal> BaseDaemon: 23. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.h:155: 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> >) @ 0x19efc990 in /workspace/clickhouse
2021.01.14 18:58:17.001472 [ 150 ] {} <Fatal> BaseDaemon: 24. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:975: DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x19ef8d06 in /workspace/clickhouse
2021.01.14 18:58:17.037798 [ 150 ] {} <Fatal> BaseDaemon: 25. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:546: DB::ActionsMatcher::visit(std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x19ef5cc7 in /workspace/clickhouse
2021.01.14 18:58:17.073545 [ 150 ] {} <Fatal> BaseDaemon: 26. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:655: DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x19ef9619 in /workspace/clickhouse
2021.01.14 18:58:17.109876 [ 150 ] {} <Fatal> BaseDaemon: 27. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:550: DB::ActionsMatcher::visit(std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x19ef5d33 in /workspace/clickhouse
2021.01.14 18:58:17.146239 [ 150 ] {} <Fatal> BaseDaemon: 28. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:34: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0x19ed6089 in /workspace/clickhouse
2021.01.14 18:58:17.182295 [ 150 ] {} <Fatal> BaseDaemon: 29. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:410: DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) @ 0x19ecabb3 in /workspace/clickhouse
2021.01.14 18:58:17.218434 [ 150 ] {} <Fatal> BaseDaemon: 30. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1024: DB::SelectQueryExpressionAnalyzer::appendSelect(DB::ExpressionActionsChain&, bool) @ 0x19ecee32 in /workspace/clickhouse
2021.01.14 18:58:17.254495 [ 150 ] {} <Fatal> BaseDaemon: 31. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1408: DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterInfo> const&, DB::Block const&) @ 0x19ed2349 in /workspace/clickhouse
```
https://clickhouse-test-reports.s3.yandex.net/19007/e2a2ab6f67b6935ea5bb7de6ac57fe32a0598992/functional_stateless_tests_(debug).html#fail1 | https://github.com/ClickHouse/ClickHouse/issues/19088 | https://github.com/ClickHouse/ClickHouse/pull/19107 | 971ff2ee0a5ae8e18118d20f3bdd3431d4df6895 | f8830e0f112298ae2388cc42e7de05ca9edbb982 | "2021-01-14T16:36:34Z" | c++ | "2021-01-15T17:38:02Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,078 | ["src/Interpreters/convertFieldToType.cpp", "tests/queries/0_stateless/01866_datetime64_cmp_with_constant.reference", "tests/queries/0_stateless/01866_datetime64_cmp_with_constant.sql"] | DateTime64 cmp DateTime constant / column inconsistency. | ```sql
CREATE TABLE dt64test
(`dt64column` DateTime64(3))
ENGINE = MergeTree
PARTITION BY toYYYYMM(dt64column)
ORDER BY dt64column;
INSERT INTO dt64test VALUES ('2020-01-13 13:37:00');
SELECT 1 FROM dt64test WHERE dt64column = toDateTime('2020-01-13 13:37:00');
DB::Exception: Key expression contains comparison between inconvertible types: DateTime64(3) and DateTime
SELECT 1 FROM dt64test WHERE dt64column = materialize(toDateTime('2020-01-13 13:37:00'));
โโ1โโ
โ 1 โ
โโโโโ
``` | https://github.com/ClickHouse/ClickHouse/issues/19078 | https://github.com/ClickHouse/ClickHouse/pull/24100 | e9b69bbd708b5fc1761df09812359d8112b87aae | 218f534a6f5a4389c8c3b47f0a3fe3acd6ac3aee | "2021-01-14T15:41:35Z" | c++ | "2021-05-19T14:27:28Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,029 | ["src/Functions/tupleHammingDistance.cpp", "tests/queries/0_stateless/01653_tuple_hamming_distance_2.reference", "tests/queries/0_stateless/01653_tuple_hamming_distance_2.sql"] | tupleHammingDistance: Logical error: 'Invalid Field get from type Null to type UInt64'. | **Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/18723/5f962015caf6e48f3ec5ea115a8f424e88741c8b/fuzzer/report.html#fail1
**How to reproduce**
`SELECT tupleHammingDistance((65537, 256), (1025, NULL))`
| https://github.com/ClickHouse/ClickHouse/issues/19029 | https://github.com/ClickHouse/ClickHouse/pull/19084 | 421dd1ca661f22c9c7f5846a999653c28554b332 | 80c937b64c8e0caaf9da353d83920ae9450c02e6 | "2021-01-14T07:23:05Z" | c++ | "2021-01-15T10:02:09Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,028 | ["contrib/libunwind"] | (ARM, only on Huawei) crashed on kylin os with arm | I have compiled the clickhouse in both cross compile and local compile way.
cross env:
intel+ubuntu20.04
local env:
cpu:ft2000+/64 (ARMv8 aarch64)
os:kylin v10sp1 (based on centos)
Then I got the binarys to run in the local of arm, but I got this error for both binarys:
```
programs]# ./clickhouse server config.xml
Processing configuration file 'config.xml'.
Include not found: clickhouse_remote_servers
Include not found: clickhouse_compression
Logging trace to /var/log/clickhouse-server/clickhouse-server.log
Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log
Logging trace to console
2021.01.14 13:10:56.182732 [ 3839 ] {} <Information> SentryWriter: Sending crash reports is disabled
2021.01.14 13:10:56.188723 [ 3839 ] {} <Trace> Pipe: Pipe capacity is 1.00 MiB
2021.01.14 13:10:56.347137 [ 3839 ] {} <Information> : Starting ClickHouse 20.9.7.11 with revision 54439, no build id, PID 3839
2021.01.14 13:10:56.347365 [ 3839 ] {} <Information> Application: starting up
2021.01.14 13:10:56.353820 [ 3839 ] {} <Trace> Application: Will mlockall to prevent executable memory from being paged out. It may take a few seconds.
2021.01.14 13:10:56.393169 [ 3839 ] {} <Trace> Application: The memory map of clickhouse executable has been mlock'ed
2021.01.14 13:10:56.393363 [ 3839 ] {} <Information> StatusFile: Status file /var/lib/clickhouse/status already exists - unclean restart. Contents:
PID: 3738
Started at: 2021-01-14 13:10:02
Revision: 54439
2021.01.14 13:10:56.393564 [ 3839 ] {} <Debug> Application: Set max number of file descriptors to 524288 (was 1024).
2021.01.14 13:10:56.393612 [ 3839 ] {} <Debug> Application: Initializing DateLUT.
2021.01.14 13:10:56.393653 [ 3839 ] {} <Trace> Application: Initialized DateLUT with time zone 'Asia/Shanghai'.
2021.01.14 13:10:56.393699 [ 3839 ] {} <Debug> Application: Setting up /var/lib/clickhouse/tmp/ to store temporary data in it
2021.01.14 13:10:56.422484 [ 3839 ] {} <Debug> Application: Configuration parameter 'interserver_http_host' doesn't exist or exists and empty. Will use '10-20-103-5' as replica host.
2021.01.14 13:10:56.422784 [ 3839 ] {} <Information> SensitiveDataMaskerConfigRead: 1 query masking rules loaded.
2021.01.14 13:10:56.424728 [ 3839 ] {} <Debug> ConfigReloader: Loading config 'users.xml'
Processing configuration file 'users.xml'.
Include not found: networks
Saved preprocessed configuration to '/var/lib/clickhouse//preprocessed_configs/users.xml'.
2021.01.14 13:10:56.425928 [ 3839 ] {} <Debug> ConfigReloader: Loaded config 'users.xml', performing update on configuration
2021.01.14 13:10:56.427033 [ 3839 ] {} <Debug> ConfigReloader: Loaded config 'users.xml', performed update on configuration
2021.01.14 13:10:56.428452 [ 3839 ] {} <Information> Application: Setting max_server_memory_usage was set to 28.24 GiB (31.38 GiB available * 0.90 max_server_memory_usage_to_ram_ratio)
2021.01.14 13:10:56.428538 [ 3839 ] {} <Information> Application: Loading metadata from /var/lib/clickhouse/
2021.01.14 13:10:56.432195 [ 3839 ] {} <Information> DatabaseAtomic (system): Total 3 tables and 0 dictionaries.
2021.01.14 13:10:56.438953 [ 3846 ] {} <Information> BackgroundProcessingPool: Create BackgroundProcessingPool with 16 threads
2021.01.14 13:10:56.440752 [ 3846 ] {} <Debug> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Loading data parts
2021.01.14 13:10:56.440809 [ 3845 ] {} <Debug> system.trace_log (1f350748-7912-447d-972e-62b13dc00cd8): Loading data parts
2021.01.14 13:10:56.442483 [ 3845 ] {} <Debug> system.trace_log (1f350748-7912-447d-972e-62b13dc00cd8): Loaded data parts (2 items)
2021.01.14 13:10:56.443548 [ 3846 ] {} <Debug> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Loaded data parts (7 items)
2021.01.14 13:10:56.444726 [ 3844 ] {} <Debug> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Loading data parts
2021.01.14 13:10:56.446746 [ 3844 ] {} <Debug> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Loaded data parts (7 items)
2021.01.14 13:10:56.447255 [ 3839 ] {} <Information> DatabaseAtomic (system): Starting up tables.
2021.01.14 13:10:56.447379 [ 3844 ] {} <Trace> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Found 5 old parts to remove.
2021.01.14 13:10:56.447390 [ 3845 ] {} <Trace> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Found 5 old parts to remove.
2021.01.14 13:10:56.447440 [ 3845 ] {} <Debug> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Removing part from filesystem 202101_1_5_1
2021.01.14 13:10:56.447423 [ 3844 ] {} <Debug> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Removing part from filesystem all_1_5_2
2021.01.14 13:10:56.448011 [ 3844 ] {} <Debug> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Removing part from filesystem all_6_6_0
2021.01.14 13:10:56.448119 [ 3845 ] {} <Debug> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Removing part from filesystem 202101_6_6_0
2021.01.14 13:10:56.448631 [ 3844 ] {} <Debug> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Removing part from filesystem all_7_7_0
2021.01.14 13:10:56.449090 [ 3845 ] {} <Debug> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Removing part from filesystem 202101_7_7_0
2021.01.14 13:10:56.449256 [ 3844 ] {} <Debug> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Removing part from filesystem all_8_8_0
2021.01.14 13:10:56.449705 [ 3844 ] {} <Debug> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Removing part from filesystem all_9_9_0
2021.01.14 13:10:56.449718 [ 3845 ] {} <Debug> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Removing part from filesystem 202101_8_8_0
2021.01.14 13:10:56.450509 [ 3845 ] {} <Debug> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Removing part from filesystem 202101_9_9_0
2021.01.14 13:10:56.454925 [ 3839 ] {} <Information> DatabaseOrdinary (default): Total 0 tables and 0 dictionaries.
2021.01.14 13:10:56.455011 [ 3839 ] {} <Information> DatabaseOrdinary (default): Starting up tables.
2021.01.14 13:10:56.455148 [ 3839 ] {} <Information> BackgroundSchedulePool/BgSchPool: Create BackgroundSchedulePool with 16 threads
2021.01.14 13:10:56.456233 [ 3839 ] {} <Debug> Application: Loaded metadata.
2021.01.14 13:10:56.456322 [ 3839 ] {} <Trace> Pipe: Pipe capacity is 1.00 MiB
2021.01.14 13:10:56.457206 [ 3839 ] {} <Information> Application: Listening for http://[::]:8123
2021.01.14 13:10:56.457403 [ 3839 ] {} <Information> Application: Listening for connections with native protocol (tcp): [::]:9000
2021.01.14 13:10:56.457568 [ 3839 ] {} <Information> Application: Listening for replica communication (interserver): http://[::]:9009
2021.01.14 13:10:56.458191 [ 3842 ] {} <Trace> BaseDaemon: Received signal 6
2021.01.14 13:10:56.458328 [ 3889 ] {} <Fatal> BaseDaemon: ########################################
2021.01.14 13:10:56.458404 [ 3889 ] {} <Fatal> BaseDaemon: (version 20.9.7.11, no build id) (from thread 3839) (no query) Received signal Aborted (6)
2021.01.14 13:10:56.458444 [ 3889 ] {} <Fatal> BaseDaemon:
2021.01.14 13:10:56.458486 [ 3889 ] {} <Fatal> BaseDaemon: Stack trace: 0xfffbcb0266e0
2021.01.14 13:10:56.458555 [ 3889 ] {} <Fatal> BaseDaemon: 0. raise @ 0x366e0 in /usr/lib64/libc-2.28.so
2021.01.14 13:10:56.458617 [ 3889 ] {} <Information> SentryWriter: Not sending crash report
2021.01.14 13:10:57.453318 [ 3874 ] {} <Trace> SystemLog (system.crash_log): Flushing system log, 1 entries to flush
2021.01.14 13:10:57.453479 [ 3874 ] {} <Debug> SystemLog (system.crash_log): Will use existing table system.crash_log for CrashLog
2021.01.14 13:10:57.453779 [ 3874 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 2.20 GiB.
2021.01.14 13:10:57.454695 [ 3874 ] {} <Trace> system.crash_log (02c9a7cb-1f0d-42e3-980e-4c777d9def85): Renaming temporary part tmp_insert_all_1_1_0 to all_11_11_0.
2021.01.14 13:10:57.454903 [ 3874 ] {} <Trace> SystemLog (system.crash_log): Flushed system log
2021.01.14 13:11:03.953259 [ 3868 ] {} <Trace> SystemLog (system.metric_log): Flushing system log, 8 entries to flush
2021.01.14 13:11:03.954099 [ 3868 ] {} <Debug> SystemLog (system.metric_log): Will use existing table system.metric_log for MetricLog
2021.01.14 13:11:03.958451 [ 3868 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 2.20 GiB.
2021.01.14 13:11:03.962650 [ 3868 ] {} <Trace> system.metric_log (a6097972-253c-4bc1-91dd-b7888efc0bd9): Renaming temporary part tmp_insert_202101_1_1_0 to 202101_11_11_0.
2021.01.14 13:11:03.964171 [ 3868 ] {} <Trace> SystemLog (system.metric_log): Flushed system log
core dumped(core dumped)
```
And I notice that 66e0 is fix in "Stack trace: 0xfffbcb0266e0" in any runnings.
More info:
The binarys two works well in another os with arm.
What could I do to local the problem? | https://github.com/ClickHouse/ClickHouse/issues/19028 | https://github.com/ClickHouse/ClickHouse/pull/25854 | 956b1f588dbf5e406bf61e8a9b4e329d35af8b70 | 011ed015fa49c8e1a37f6f103c28def5e637a23f | "2021-01-14T05:29:44Z" | c++ | "2021-06-30T13:18:59Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 19,021 | ["src/IO/PeekableReadBuffer.cpp", "src/IO/PeekableReadBuffer.h", "src/Interpreters/InterpreterInsertQuery.cpp", "src/Interpreters/executeQuery.cpp", "tests/queries/0_stateless/01183_custom_separated_format_http.reference", "tests/queries/0_stateless/01183_custom_separated_format_http.sh"] | FORMAT CustomSeparated doesnt' work for http queries | (you don't have to strictly follow this form)
It seems that CH doesn't support `FORMAT CustomSeparated` with http request
https://github.com/ClickHouse/ClickHouse/issues/12744#issuecomment-663738562
When I make a request with `format_custom_field_delimiter='^'`, I got an error
```
Code: 49, e.displayText() = DB::Exception: There is no checkpoint (version 20.1.2.4 (official build))
```
Bash script:
```
#!/bin/bash
find . -type f -name 'j.log' | while read f; do
curl "http://localhost:8123
/?query=INSERT%20INTO%20mydb%20FORMAT%20CustomSeparated%20SETTINGS%20format_custom_escaping_rule%3D%27CSV%27%2C%20format_custom_field_delimiter%20%3D%20%27%5E%27" --data-binary "@${f}"
done
```
But all is OK, when I do it with client:
```
cat j.log |clickhouse-client -q "INSERT into mydb FORMAT CustomSeparated SETTINGS format_custom_escaping_rule='CSV', format_custom_field_delimiter = '^'"
```
**How to reproduce**
* Which ClickHouse server version to use
version 20.13.1.1 and github build `commit 6e34a0b71efc0e5af1cfb05b77a5e7b2568a2e49`
* Which interface to use, if matters
* Non-default settings, if any
* `CREATE TABLE` statements for all tables involved
```
CREATE TABLE mydb
(
datetime String,
d1 String,
d2 String
)
engine=MergeTree()
ORDER BY d1
SETTINGS index_granularity = 8192;
```
* Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/master/programs/obfuscator/Obfuscator.cpp#L42-L80) if necessary
j.log:
```
2021-Jan^d1^d2
```
* Queries to run that lead to unexpected result
**Expected behavior**
A clear and concise description of what you expected to happen.
**Error message and/or stacktrace**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
| https://github.com/ClickHouse/ClickHouse/issues/19021 | https://github.com/ClickHouse/ClickHouse/pull/19072 | 1b832aa698f5f3d96a625728df989721d2fd52ba | 49e1321df444bdc665a823002c20ab9543cc79ec | "2021-01-13T18:46:51Z" | c++ | "2021-01-22T18:00:04Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,991 | ["src/Core/MySQL/MySQLGtid.cpp", "src/Core/MySQL/MySQLGtid.h", "src/Core/tests/mysql_protocol.cpp", "src/Databases/MySQL/MaterializeMySQLSyncThread.cpp"] | MaterializeMySQL will get exeception with MySQL log_bin_use_v1_row_events 'ON' | **Describe the bug**
when I set log_bin_use_v1_row_events =1 in MySQL side and start replicate data to ClickHouse๏ผI will get the following execption๏ผ
0. DB::ReadBuffer::throwReadAfterEOF() @ 0x7d3f9ed in /usr/bin/clickhouse
1. ? @ 0xdb3d0a3 in /usr/bin/clickhouse
2. DB::MySQLReplication::MySQLFlavor::readPayloadImpl(DB::ReadBuffer&) @ 0xdb41983 in /usr/bin/clickhouse
3. DB::MySQLProtocol::IMySQLReadPacket::readPayload(DB::ReadBuffer&, unsigned char&) @ 0xdb29bb2 in /usr/bin/clickhouse
4. DB::MySQLProtocol::PacketEndpoint::tryReceivePacket(DB::MySQLProtocol::IMySQLReadPacket&, unsigned long) @ 0xdb2a6a3 in /usr/bin/clickhouse
5. DB::MaterializeMySQLSyncThread::synchronization(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xdb544b6 in /usr/bin/clickhouse
6. ? @ 0xdb72e2a in /usr/bin/clickhouse
7. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x7d25aad in /usr/bin/clickhouse
8. ? @ 0x7d295d3 in /usr/bin/clickhouse
9. start_thread @ 0x7e65 in /usr/lib64/libpthread-2.17.so
10. __clone @ 0xfe88d in /usr/lib64/libc-2.17.so
(version 20.12.4.5 (official build))
2021.01.12 17:52:48.630695 [ 13966 ] {abb6f32b-079a-493a-8bf3-30c970a46a22} <Error> executeQuery: Code: 32, e.displayText() = DB::Exception: Attempt to read after eof (version 20.12.4.5 (official build)) (from [::ffff:172.21.128.5]:37384) (in query: select count(*) from yuan;), Stack trace (when copying this message, always include the lines below):
0. DB::ReadBuffer::throwReadAfterEOF() @ 0x7d3f9ed in /usr/bin/clickhouse
1. ? @ 0xdb3d0a3 in /usr/bin/clickhouse
2. DB::MySQLReplication::MySQLFlavor::readPayloadImpl(DB::ReadBuffer&) @ 0xdb41983 in /usr/bin/clickhouse
3. DB::MySQLProtocol::IMySQLReadPacket::readPayload(DB::ReadBuffer&, unsigned char&) @ 0xdb29bb2 in /usr/bin/clickhouse
4. DB::MySQLProtocol::PacketEndpoint::tryReceivePacket(DB::MySQLProtocol::IMySQLReadPacket&, unsigned long) @ 0xdb2a6a3 in /usr/bin/clickhouse
5. DB::MaterializeMySQLSyncThread::synchronization(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xdb544b6 in /usr/bin/clickhouse
6. ? @ 0xdb72e2a in /usr/bin/clickhouse
7. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x7d25aad in /usr/bin/clickhouse
8. ? @ 0x7d295d3 in /usr/bin/clickhouse
9. start_thread @ 0x7e65 in /usr/lib64/libpthread-2.17.so
10. __clone @ 0xfe88d in /usr/lib64/libc-2.17.so
2021.01.12 17:52:48.630860 [ 13966 ] {abb6f32b-079a-493a-8bf3-30c970a46a22} <Error> TCPHandler: Code: 32, e.displayText() = DB::Exception: Attempt to read after eof, Stack trace:
0. DB::ReadBuffer::throwReadAfterEOF() @ 0x7d3f9ed in /usr/bin/clickhouse
1. ? @ 0xdb3d0a3 in /usr/bin/clickhouse
2. DB::MySQLReplication::MySQLFlavor::readPayloadImpl(DB::ReadBuffer&) @ 0xdb41983 in /usr/bin/clickhouse
3. DB::MySQLProtocol::IMySQLReadPacket::readPayload(DB::ReadBuffer&, unsigned char&) @ 0xdb29bb2 in /usr/bin/clickhouse
4. DB::MySQLProtocol::PacketEndpoint::tryReceivePacket(DB::MySQLProtocol::IMySQLReadPacket&, unsigned long) @ 0xdb2a6a3 in /usr/bin/clickhouse
5. DB::MaterializeMySQLSyncThread::synchronization(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xdb544b6 in /usr/bin/clickhouse
6. ? @ 0xdb72e2a in /usr/bin/clickhouse
7. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x7d25aad in /usr/bin/clickhouse
8. ? @ 0x7d295d3 in /usr/bin/clickhouse
9. start_thread @ 0x7e65 in /usr/lib64/libpthread-2.17.so
10. __clone @ 0xfe88d in /usr/lib64/libc-2.17.so
**How to reproduce**
just setting log_bin_use_v1_row_events in my.cnf
* Which ClickHouse server version to use
20.12.4.5
**Additional context**
MySQL 5.7.31 and MySQL8.0.21 both can reprod the bug.
| https://github.com/ClickHouse/ClickHouse/issues/18991 | https://github.com/ClickHouse/ClickHouse/pull/19205 | ee4cc94e6c47a48f491c34f4844345a16a37379a | 47102d2ee8b8067f9942683aad58affb04782312 | "2021-01-13T07:45:29Z" | c++ | "2021-01-19T11:52:30Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,973 | ["src/Core/Settings.h", "src/Interpreters/RewriteAnyFunctionVisitor.cpp", "tests/queries/0_stateless/01398_any_with_alias.sql", "tests/queries/0_stateless/01470_columns_transformers.reference", "tests/queries/0_stateless/01591_window_functions.reference", "tests/queries/0_stateless/01591_window_functions.sql", "tests/queries/0_stateless/01650_any_null_if.reference", "tests/queries/0_stateless/01650_any_null_if.sql"] | `optimize_move_functions_out_of_any` is questionable | **Describe the situation**
There is a setting `optimize_move_functions_out_of_any` that is turn on by default.
It moves functions out of `any` aggregate function.
But it's not always beneficial.
Example:
```
any(substring(large_string, 1, 10))
```
is better than
```
substring(any(large_string), 1, 10)
```
| https://github.com/ClickHouse/ClickHouse/issues/18973 | https://github.com/ClickHouse/ClickHouse/pull/18981 | 7d7af00afb2a2dde105abc78b8fa1378176efa96 | 6d79068a0fc7459341e77a086ec1de9d9e59dfed | "2021-01-12T13:35:50Z" | c++ | "2021-01-14T07:12:55Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,951 | ["base/glibc-compatibility/CMakeLists.txt", "cmake/find/rdkafka.cmake", "contrib/librdkafka-cmake/CMakeLists.txt", "contrib/librdkafka-cmake/config.h.in"] | error: invalid conversion between vector type | Hello,
When compiling from source on an Ubuntu 20.04 arm64 instance, I receive this: `error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size`. Full output & details are below.
**Operating system**
Ubuntu 20.04, arm64, running on AWS Graviton c6g.medium instance
**Cmake version**
3.16.3
**Ninja version**
1.10.0
**Compiler name and version**
clang-11
**Full cmake and/or ninja output**
```
[0/2] Re-checking globbed directories...
[2/7220] Building C object base/glibc-compatibility/CMakeFiles/clickhouse_memcpy.dir/__/__/contrib/FastMemcpy/memcpy_wrapper.c.o
FAILED: base/glibc-compatibility/CMakeFiles/clickhouse_memcpy.dir/__/__/contrib/FastMemcpy/memcpy_wrapper.c.o
/usr/bin/clang-11 -fdiagnostics-color=always -gdwarf-aranges -Wall -Wno-unused-command-line-argument -fdiagnostics-absolute-paths -fexperimental-new-pass-manager -Werror -Wno-builtin-requires-header -fomit-frame-pointer -O2 -g -DNDEBUG -O3 -D OS_LINUX -MD -MT base/glibc-compatibility/CMakeFiles/clickhouse_memcpy.dir/__/__/contrib/FastMemcpy/memcpy_wrapper.c.o -MF base/glibc-compatibility/CMakeFiles/clickhouse_memcpy.dir/__/__/contrib/FastMemcpy/memcpy_wrapper.c.o.d -o base/glibc-compatibility/CMakeFiles/clickhouse_memcpy.dir/__/__/contrib/FastMemcpy/memcpy_wrapper.c.o -c ../contrib/FastMemcpy/memcpy_wrapper.c
In file included from ../contrib/FastMemcpy/memcpy_wrapper.c:1:
In file included from ../contrib/FastMemcpy/FastMemcpy.h:14:
In file included from /usr/lib/llvm-11/lib/clang/11.0.0/include/emmintrin.h:13:
In file included from /usr/lib/llvm-11/lib/clang/11.0.0/include/xmmintrin.h:13:
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:50:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:129:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:159:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:189:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:216:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:239:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:260:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:287:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:310:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:331:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:352:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:373:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:394:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:416:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:439:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:461:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:483:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_paddusw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:504:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_psubb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-11/lib/clang/11.0.0/include/mmintrin.h:525:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_psubw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[3/7220] Building CXX object contrib/libunwind-cmake/CMakeFiles/unwind.dir/__/libunwind/src/libunwind.cpp.o
ninja: build stopped: subcommand failed.
``` | https://github.com/ClickHouse/ClickHouse/issues/18951 | https://github.com/ClickHouse/ClickHouse/pull/19369 | eeafd738906bc04eed59bb3f2002d4d6766c5ca9 | 303db08231f19ad5739551991fc23a63012a2773 | "2021-01-11T16:11:43Z" | c++ | "2021-01-22T22:52:07Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,950 | ["tests/integration/test_testkeeper_back_to_back/test.py"] | Strange test keeper tests failure | https://github.com/ClickHouse/ClickHouse/pull/18897 | https://github.com/ClickHouse/ClickHouse/issues/18950 | https://github.com/ClickHouse/ClickHouse/pull/19942 | da367a500e6cfe0fb6234bf98683154264dd995d | a9c50caa9a9f5ff15efbc4d290b8956dd8085def | "2021-01-11T15:43:42Z" | c++ | "2021-02-02T07:17:27Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,937 | ["tests/queries/0_stateless/02692_multiple_joins_unicode.reference", "tests/queries/0_stateless/02692_multiple_joins_unicode.sql"] | Cannot select non-english column name when using multiple join in a single query. | **Describe the bug**
Cannot select non-english column name when using multiple join in a single query.
**How to reproduce**
ClickHouse server version 20.11.4 revision 54442.
* `CREATE TABLE` statements for all tables involved
````
CREATE TABLE store (id UInt32, "ๅ็งฐ" String, "็ถๆ" String) ENGINE=MergeTree() Order by id;
CREATE TABLE location (id UInt32, name String) ENGINE=MergeTree() Order by id;
CREATE TABLE sales ("ๆฅๆ" Date, "ๅบ้บ" UInt32, "ๅฐๅ" UInt32, "้ๅฎ้ข" Float32) ENGINE=MergeTree() Order by "ๆฅๆ";
````
* Sample data for all these tables
````
INSERT INTO store VALUES (1,'ๅบ้บ1','ๅฏ็จ'),(2,'ๅบ้บ2','ๅ็จ');
INSERT INTO location VALUES (1,'ไธๆตทๅธ'),(2,'ๅไบฌๅธ');
INSERT INTO sales VALUES ('2021-01-01',1,1,10),('2021-01-02',2,2,20);
````
**Query which cause error**
````
SELECT
`ๆฅๆ`,
location.name,
store.`็ถๆ`
FROM sales
LEFT JOIN store ON store.id = `ๅบ้บ`
LEFT JOIN location ON location.id = `ๅฐๅ`
````
**Error message and/or stacktrace**
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Missing columns: '็ถๆ' while processing query: 'SELECT `ๅฐๅ`, `ๅบ้บ`, `ๆฅๆ`, `็ถๆ`, id AS `--store.id` FROM sales ALL LEFT JOIN (SELECT * FROM store) AS store ON `--store.id` = `ๅบ้บ`', required columns: 'ๅฐๅ' 'ๅบ้บ' 'ๆฅๆ' 'id' '็ถๆ', source columns: '้ๅฎ้ข' 'ๅฐๅ' 'ๅบ้บ' 'ๆฅๆ', joined columns: 'id' 'store.ๅ็งฐ' 'store.็ถๆ'.
**Additional context**
I can select `english column name` when using multiple left join:
````
SELECT
`ๆฅๆ`,
location.name,
store.id
FROM sales
LEFT JOIN store ON store.id = `ๅบ้บ`
LEFT JOIN location ON location.id = `ๅฐๅ`
````
Result:
````
Query id: f352f76b-575c-4f2d-873f-63aae289a61d
โโโโโโโโๆฅๆโโฌโlocation.nameโโฌโstore.idโโ
โ 2021-01-01 โ ไธๆตทๅธ โ 1 โ
โ 2021-01-02 โ ๅไบฌๅธ โ 2 โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโ
2 rows in set. Elapsed: 0.016 sec.
````
I can select `non-english column name` when using **single** left join:
````
SELECT store.`็ถๆ`
FROM sales
LEFT JOIN store ON store.id = `ๅบ้บ`
````
Result:
````
Query id: f70f9b1e-ff0f-43a4-a9e0-9bbf31c93333
โโstore.็ถๆโโ
โ ๅฏ็จ โ
โ ๅ็จ โ
โโโโโโโโโโโโโโ
2 rows in set. Elapsed: 0.014 sec.
````
| https://github.com/ClickHouse/ClickHouse/issues/18937 | https://github.com/ClickHouse/ClickHouse/pull/47738 | 72c6084267da929019068fae3d78741b8225efcf | 4fcc5bbea75c47496c617ce8f28b22ff13d99c7a | "2021-01-11T14:08:00Z" | c++ | "2023-03-23T14:50:56Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,927 | ["docker/server/Dockerfile", "docker/server/Dockerfile.alpine"] | >= 20.11 wrong owner of /etc/clickhouse-server/ | ```
mfilimonov@laptop-5591:~/workspace/altinity/docker$ docker run -it --rm yandex/clickhouse-server:20.10 bash
root@bc569367e840:/# ls -la /etc/clickhouse-server/
total 60
drwxr-xr-x 1 root root 4096 Dec 24 00:23 .
drwxr-xr-x 1 root root 4096 Jan 11 11:57 ..
drwxr-xr-x 1 root root 4096 Dec 24 00:23 config.d
-rw-r--r-- 1 root root 35884 Dec 23 14:13 config.xml
lrwxrwxrwx 1 root root 41 Dec 24 00:23 preprocessed -> /var/lib/clickhouse//preprocessed_configs
drwxr-xr-x 2 root root 4096 Dec 24 00:23 users.d
-rw-r--r-- 1 root root 5587 Dec 23 14:13 users.xml
root@bc569367e840:/# exit
exit
```
```
mfilimonov@laptop-5591:~/workspace/altinity/docker$ docker run -it --rm yandex/clickhouse-server:20.11 bash
root@a70e26b70ead:/# ls -la /etc/clickhouse-server/
total 64
drwx------ 1 clickhouse clickhouse 4096 Dec 23 22:25 .
drwxr-xr-x 1 root root 4096 Jan 11 11:57 ..
dr-x------ 1 clickhouse clickhouse 4096 Dec 23 22:26 config.d
-r-------- 1 clickhouse clickhouse 38407 Dec 23 14:13 config.xml
dr-x------ 2 clickhouse clickhouse 4096 Dec 23 22:25 users.d
-r-------- 1 clickhouse clickhouse 5587 Dec 23 14:13 users.xml
```
That is not secure (clickhouse process can modify own config), and that prevents using clickhouse in non-root containers.
```
docker run --user 12345:12345 yandex/clickhouse-server:20.11
std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in posix_stat: failed to determine attributes for the specified path: Permission denied [/etc/clickhouse-server/config.xml] (version 20.11.6.6 (official build))
std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in posix_stat: failed to determine attributes for the specified path: Permission denied [/etc/clickhouse-server/config.xml] (version 20.11.6.6 (official build))
std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in posix_stat: failed to determine attributes for the specified path: Permission denied [/etc/clickhouse-server/config.xml] (version 20.11.6.6 (official build))
std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in posix_stat: failed to determine attributes for the specified path: Permission denied [/etc/clickhouse-server/config.xml] (version 20.11.6.6 (official build))
std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in posix_stat: failed to determine attributes for the specified path: Permission denied [/etc/clickhouse-server/config.xml] (version 20.11.6.6 (official build))
dirname: missing operand
Try 'dirname --help' for more information.
std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in posix_stat: failed to determine attributes for the specified path: Permission denied [/etc/clickhouse-server/config.xml] (version 20.11.6.6 (official build))
dirname: missing operand
Try 'dirname --help' for more information.
std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in posix_stat: failed to determine attributes for the specified path: Permission denied [/etc/clickhouse-server/config.xml] (version 20.11.6.6 (official build))
Processing configuration file '/etc/clickhouse-server/config.xml'.
std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in posix_stat: failed to determine attributes for the specified path: Permission denied [/etc/clickhouse-server/config.xml], Stack trace (when copying this message, always include the lines below):
0. 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&) @ 0x11bbdb23 in ?
1. ? @ 0x11b596b4 in ?
2. ? @ 0x11b59346 in ?
3. ? @ 0x11b641a5 in ?
4. DB::ConfigProcessor::processConfig(bool*, zkutil::ZooKeeperNodeCache*, std::__1::shared_ptr<Poco::Event> const&) @ 0xe537339 in /usr/bin/clickhouse
5. DB::ConfigProcessor::loadConfig(bool) @ 0xe53de74 in /usr/bin/clickhouse
6. BaseDaemon::reloadConfiguration() @ 0x7c6ec81 in /usr/bin/clickhouse
7. BaseDaemon::initialize(Poco::Util::Application&) @ 0x7c70ec5 in /usr/bin/clickhouse
8. DB::Server::initialize(Poco::Util::Application&) @ 0x7b44b30 in /usr/bin/clickhouse
9. Poco::Util::Application::run() @ 0x10a4aba6 in /usr/bin/clickhouse
10. DB::Server::run() @ 0x7b4498f in /usr/bin/clickhouse
11. mainEntryClickHouseServer(int, char**) @ 0x7b4430b in /usr/bin/clickhouse
12. main @ 0x7ae7cbd in /usr/bin/clickhouse
13. __libc_start_main @ 0x270b3 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
14. _start @ 0x7a9802e in /usr/bin/clickhouse
(version 20.11.6.6 (official build))
``` | https://github.com/ClickHouse/ClickHouse/issues/18927 | https://github.com/ClickHouse/ClickHouse/pull/19374 | f44f169aaa1b9fe0580ca4862056bf0d31330e8f | 21455ae646d8aca2be32c15cc61bfcf5c6a4871e | "2021-01-11T12:02:41Z" | c++ | "2021-01-22T14:28:44Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,926 | ["docker/test/fasttest/run.sh", "docker/test/stateless/Dockerfile", "src/Core/MySQL/PacketsProtocolText.cpp", "src/Core/MySQL/PacketsProtocolText.h", "src/Server/MySQLHandler.cpp", "tests/queries/0_stateless/01176_mysql_client_interactive.expect", "tests/queries/0_stateless/01176_mysql_client_interactive.reference", "tests/queries/shell_config.sh"] | MYSQL protocol reading table information error after USE database query. | **Describe the bug**
If you would change database with ```USE database``` command via mysql protocol and have auto completion enabled, you would get an error.
**How to reproduce**
Clickhouse 20.13.1.5517
mysql client 8.0
```
mysql --host 127.0.0.1 --port 9004 --user default
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 20.13.1.5517-ClickHouse 0
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW TABLES;
23 rows in set (0.01 sec)
Read 23 rows, 776.00 B in 0.0084032 sec., 2737 rows/sec., 90.18 KiB/sec.
mysql> SHOW DATABASES;
+-----------+
| name |
+-----------+
| default |
| model |
| system |
| test |
+-----------+
6 rows in set (0.00 sec)
Read 6 rows, 879.00 B in 0.002237 sec., 2682 rows/sec., 383.73 KiB/sec.
mysql> USE system
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> SELECT 1;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 5
Current database: system
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 6
Current database: system
ERROR 2006 (HY000): MySQL server has gone away
```
If we would disable auto completion with -A cli arg.
```
mysql --host 127.0.0.1 --port 9004 --user default -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 20.13.1.5517-ClickHouse 0
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> USE system
Database changed, 1 warning
mysql> SELECT 1;
+------+
| 1 |
+------+
| 1 |
+------+
1 row in set (0.01 sec)
Read 1 rows, 1.00 B in 0.0013077 sec., 764 rows/sec., 764.70 B/sec.
mysql> SHOW TABLES;
75 rows in set (0.00 sec)
Read 75 rows, 2.61 KiB in 0.0053943 sec., 13903 rows/sec., 483.91 KiB/sec.
```
**Expected behavior**
It's possible to change databases with ```USE database``` command in mysql client works with autocomplete enabled.
**Error message and/or stacktrace**
```
2021.01.11 14:43:38.721310 [ 4371 ] {} <Debug> MySQLHandler: Received command: 4. Connection id: 21.
2021.01.11 14:43:38.721427 [ 4371 ] {} <Debug> MySQLHandler: Received command: 4. Connection id: 21.
2021.01.11 14:43:38.721590 [ 4371 ] {} <Error> MySQLHandler: DB::Exception: Cannot read all data. Bytes read: 0. Bytes expected: 3.
2021.01.11 14:43:36.306221 [ 4372 ] {} <Error> MySQLHandler: DB::Exception: Cannot read all data. Bytes read: 0. Bytes expected: 3.
2021.01.11 14:43:38.712040 [ 4372 ] {} <Error> MySQLHandler: DB::Exception: Cannot read all data. Bytes read: 0. Bytes expected: 3.
2021.01.11 14:43:38.721590 [ 4371 ] {} <Error> MySQLHandler: DB::Exception: Cannot read all data. Bytes read: 0. Bytes expected: 3.
```
**Additional context**
If you would pass database name in mysql args, you need to disable auto completion too.
```
mysql --host 127.0.0.1 --port 9004 --user default --database default
mysql> SELECT 1;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 35
Current database: default
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 36
Current database: default
ERROR 2006 (HY000): MySQL server has gone away
mysql --host 127.0.0.1 --port 9004 --user default --database default -A
mysql> SELECT 1;
+------+
| 1 |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
Read 1 rows, 1.00 B in 0.0012839 sec., 778 rows/sec., 778.88 B/sec.
``` | https://github.com/ClickHouse/ClickHouse/issues/18926 | https://github.com/ClickHouse/ClickHouse/pull/20878 | ceacae4ee4e1642c20a8e3ac4cd7f2154fb26722 | 3509fe88d89a767cbc9f2abe0adfecadb5051a12 | "2021-01-11T11:53:55Z" | c++ | "2021-02-19T16:25:54Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,923 | ["docker/server/entrypoint.sh"] | watchdog: clickhouse-server docker images does not react on Ctrl+C anymore | For some reason, the watchdog doesn't process/pass the signal correctly?
If we consider watchdog as a useful/essential part (which should now work also in docker) - it should react on Ctrl+C correctly.
Also, we need a cmd line options (with corresponding config settings?) to enforce watchdog installation even for TTY mode and disable it even for non-TTY mode.
| https://github.com/ClickHouse/ClickHouse/issues/18923 | https://github.com/ClickHouse/ClickHouse/pull/26757 | dab9cfb9c9471f3a14158fdf1e58fc0331fbde98 | 418af36372c4f691e662e1313cb7da08e93238ec | "2021-01-11T10:21:47Z" | c++ | "2021-07-24T02:52:16Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,916 | ["docker/test/fuzzer/run-fuzzer.sh", "programs/client/Client.cpp"] | Extensive fuzzing of new added tests | Add an option for `clickhouse-client` with a list of tests for extensive fuzzing.
Processing of these tests will be interleaved between every other tests, so we will get much better fuzzing coverage. | https://github.com/ClickHouse/ClickHouse/issues/18916 | https://github.com/ClickHouse/ClickHouse/pull/19185 | d782a0e7ba7353f109f9e3fb8f60fab1dd272060 | 6f1d92070ddaa4070cad7cf3eea2e5528447b097 | "2021-01-11T06:01:40Z" | c++ | "2021-01-18T23:36:51Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,913 | ["src/Storages/MergeTree/MergeTreeDataPartWriterWide.cpp", "tests/queries/0_stateless/01654_test_writer_block_sequence.python", "tests/queries/0_stateless/01654_test_writer_block_sequence.reference", "tests/queries/0_stateless/01654_test_writer_block_sequence.sh"] | Incorrect mark is found while running debug tests | **Describe the bug**
https://github.com/ClickHouse/ClickHouse/pull/18899#issuecomment-757571194
| https://github.com/ClickHouse/ClickHouse/issues/18913 | https://github.com/ClickHouse/ClickHouse/pull/19123 | 112746e8ca3409a761afce68cd2fbd2fe8ad6dc3 | 67fd381034ada11191aff46f3b2e841aef4e34ee | "2021-01-11T02:37:17Z" | c++ | "2021-01-16T07:17:44Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,891 | ["programs/local/LocalServer.cpp", "src/Core/BackgroundSchedulePool.cpp"] | clickhouse-local cannot shutdown correctly. | **How to reproduce**
```
for i in {1..1000}; do echo 'Hello, world!' | clickhouse-local --query "SELECT * FROM table" --structure 's String' | wc -c; done
```
This script hangs. | https://github.com/ClickHouse/ClickHouse/issues/18891 | https://github.com/ClickHouse/ClickHouse/pull/18977 | a15092eeb77b7d35d8f068f99bfeb26b0470ae9d | 6885890006a4fd6e07ca8daeb6a645acf3d120ce | "2021-01-10T02:33:53Z" | c++ | "2021-01-16T15:05:59Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,879 | ["src/Interpreters/Context.cpp", "src/Interpreters/DatabaseCatalog.cpp", "src/Storages/LiveView/TemporaryLiveViewCleaner.cpp", "src/Storages/LiveView/TemporaryLiveViewCleaner.h"] | After run of stress test duplicate UUIDs have found. | https://clickhouse-test-reports.s3.yandex.net/18817/9049599e367bcccd809f45af138452f965b3303a/stress_test_(undefined)/test_run.txt.out.log | https://github.com/ClickHouse/ClickHouse/issues/18879 | https://github.com/ClickHouse/ClickHouse/pull/19020 | 80c937b64c8e0caaf9da353d83920ae9450c02e6 | 461d370e8dbd5fa00590a1910b8b4c8f8f8c20a9 | "2021-01-09T05:13:25Z" | c++ | "2021-01-15T10:04:08Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,878 | ["src/Storages/MutationCommands.cpp", "tests/queries/0_stateless/01648_mutations_and_escaping.reference", "tests/queries/0_stateless/01648_mutations_and_escaping.sql"] | Server cannot parse mutation command list. | https://clickhouse-test-reports.s3.yandex.net/18817/9049599e367bcccd809f45af138452f965b3303a/stress_test_(thread)/test_run.txt.out.log
| https://github.com/ClickHouse/ClickHouse/issues/18878 | https://github.com/ClickHouse/ClickHouse/pull/18944 | e1631d341f9d4b4178d5506010b54c5b243afd13 | 1d6bfe8ad7b4ab90b0c3417d604c578215ddb8e5 | "2021-01-09T05:12:05Z" | c++ | "2021-01-12T08:29:24Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,874 | ["src/Storages/StorageReplicatedMergeTree.cpp", "tests/queries/0_stateless/01650_drop_part_and_deduplication_zookeeper.reference", "tests/queries/0_stateless/01650_drop_part_and_deduplication_zookeeper.sql"] | Dropping of a part breaks deduplication of data blocks | 20.12.5.14 `alter table ... drop part ...` removes from ZooKeeper all blocks for the partition.
The same thing happens when CH cleans empty parts:
```
CREATE TABLE empty_parts
(
`k` Int8,
`v` Int8
)
ENGINE = ReplicatedSummingMergeTree ('/clickhouse/empty_parts','replica1')
ORDER BY k;
insert into empty_parts values (1, 15);
insert into empty_parts values (1, -15);
optimize table empty_parts;
insert into empty_parts values (2, -15);
select name, active, rows, modification_time from system.parts where table like 'empty_parts'
name | active | rows | modification_time
------------+--------+------+--------------------
all_15_15_0 | 0 | 1 | 2021-01-07 21:54:05
all_16_16_0 | 0 | 1 | 2021-01-08 20:13:00
all_15_16_1 | 1 | 0 | 2021-01-08 20:13:46
all_17_17_0 | 1 | 1 | 2021-01-08 20:13:47
select name, value from system.zookeeper where path='/clickhouse/empty_parts/blocks/'
name | value
---------------------------------------------+------------
all_9295045124109325217_14756667786308374723 | all_16_16_0
all_18396465411487747783_4385790938943258888 | all_17_17_0
```
The next insert of the same block is deduplicated:
```
insert into empty_parts values (2, -15);
2021.01.08 20:13:53.267392 <Information> empty_parts (Replicated OutputStream): Block with ID all_18396465411487747783_4385790938943258888 already exists locally as part all_17_17_0; ignoring it.
```
The empty part is getting dropped in background
```
2021.01.08 20:14:19.103462 <Trace> empty_parts: Will try to insert a log entry to DROP_RANGE for part: all_15_16_1
```
The next insert of the same block is NOT deduplicated:
```
insert into empty_parts values (2, -15);
2021.01.08 20:16:19.145203 <Debug> executeQuery: (from [::1]:40824) insert into empty_parts values
2021.01.08 20:16:19.146681 <Debug> empty_parts (Replicated OutputStream): Wrote block with ID 'all_18396465411487747783_4385790938943258888', 1 rows
2021.01.08 20:16:19.181508 <Trace> empty_parts: Renaming temporary part tmp_insert_all_23_23_0 to all_18_18_0.
select name, active, rows, modification_time from system.parts where table like 'empty_parts'
name | active | rows | modification_time
------------+--------+------+--------------------
all_17_17_0 | 1 | 1 | 2021-01-08 16:13:47
all_18_18_0 | 1 | 1 | 2021-01-08 16:16:19
select name, value from system.zookeeper where path='/clickhouse/empty_parts/blocks/'
name | value
---------------------------------------------+------------
all_18396465411487747783_4385790938943258888 | all_18_18_0
SELECT _part, * FROM empty_parts
โโ_partโโโโโโโโฌโkโโฌโโvโโ
โ all_17_17_0 โ 1 โ 15 โ
โโโโโโโโโโโโโโโดโโโโดโโโโโ
โโ_partโโโโโโโโฌโkโโฌโโvโโ
โ all_18_18_0 โ 1 โ 15 โ
โโโโโโโโโโโโโโโดโโโโดโโโโโ
```
| https://github.com/ClickHouse/ClickHouse/issues/18874 | https://github.com/ClickHouse/ClickHouse/pull/18969 | 07431a64940d88735ebeaeed8102f6160c0c99ff | c97469773dbcb8b13a6ec9e5ee07c49d88c05eb9 | "2021-01-08T22:26:33Z" | c++ | "2021-01-13T08:50:26Z" |
closed | ClickHouse/ClickHouse | https://github.com/ClickHouse/ClickHouse | 18,847 | ["base/daemon/BaseDaemon.cpp", "base/daemon/BaseDaemon.h", "src/Interpreters/InterpreterSystemQuery.cpp"] | SYSTEM KILL doesn't work on docker environment. | **Describe the bug**
`SYSTEM KILL` does not shutdown the server when run in a docker environment. I used https://hub.docker.com/r/yandex/clickhouse-server/ instructions to setup the docker.
**How to reproduce**
* ClickHouse server version 20.12.4 revision 54442.
```
myrotk@altinity-qa-cosmic3:~$ docker pull yandex/clickhouse-server
Using default tag: latest
latest: Pulling from yandex/clickhouse-server
da7391352a9b: Pull complete
14428a6d4bcd: Pull complete
2c2d948710f2: Pull complete
076cd2c6a81e: Pull complete
201ea6cda8c8: Pull complete
0d7b4e598027: Pull complete
0d86a58e3639: Pull complete
3b78a4fd0f92: Pull complete
86d65487f611: Pull complete
dc82dea7d6fe: Pull complete
Digest: sha256:8f669dafd35eb527210cc77973ed927734dff2c2cafd345823c8c99769124fd1
Status: Downloaded newer image for yandex/clickhouse-server:latest
docker.io/yandex/clickhouse-server:latest
myrotk@altinity-qa-cosmic3:~$ docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server
35603911ec6c5737f069a019a60d03270cefe78e52c77d1bc6ff33a0548ae97e
myrotk@altinity-qa-cosmic3:~$ docker run -it --rm --link some-clickhouse-server:clickhouse-server yandex/clickhouse-client --host clickhouse-server
Unable to find image 'yandex/clickhouse-client:latest' locally
latest: Pulling from yandex/clickhouse-client
f22ccc0b8772: Pull complete
3cf8fb62ba5f: Pull complete
e80c964ece6a: Pull complete
6f064a173914: Pull complete
37a06aaf9ee5: Pull complete
Digest: sha256:504e18bed5162a20bbff6071ca1b7c7baca1380d2e2755e4d6bf4bac7e534531
Status: Downloaded newer image for yandex/clickhouse-client:latest
ClickHouse client version 20.12.4.5 (official build).
Connecting to clickhouse-server:9000 as user default.
Connected to ClickHouse server version 20.12.4 revision 54442.
35603911ec6c :) SYSTEM KILL
SYSTEM KILL
Query id: 0da8cfef-36c8-4de9-8c12-3e9175c5aed0
Ok.
0 rows in set. Elapsed: 0.002 sec.
35603911ec6c :)
| https://github.com/ClickHouse/ClickHouse/issues/18847 | https://github.com/ClickHouse/ClickHouse/pull/18848 | 6e34a0b71efc0e5af1cfb05b77a5e7b2568a2e49 | f3fb2204d2898e80f4c1be3f1298fbfcbc8fa9f8 | "2021-01-07T17:17:02Z" | c++ | "2021-01-08T19:25:25Z" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.