Skip to content

Instantly share code, notes, and snippets.

@abyss7
abyss7 / ch-build-time.txt
Created September 12, 2019 20:35
Analysis based on Clang -ftime-trace
**** Time summary:
Compilation (5780 times):
Parsing (frontend): 9377.0 s
Codegen & opts (backend): 6879.6 s
**** Files that took longest to parse (compiler frontend):
28008 ms: build/dbms/src/Functions/GatherUtils/CMakeFiles/clickhouse_functions_gatherutils.dir/has.cpp.o
24678 ms: build/contrib/arrow-cmake/CMakeFiles/arrow_shared.dir/__/arrow/cpp/src/arrow/compute/kernels/cast.cc.o
21463 ms: build/dbms/src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionQuantile.cpp.o
21209 ms: build/dbms/CMakeFiles/clickhouse_interpreters.dir/src/Interpreters/InterpreterSelectQuery.cpp.o
@abyss7
abyss7 / txt
Created August 11, 2020 10:58
Stress-test failure stacktrace
==321==ERROR: AddressSanitizer: heap-use-after-free on address 0x60600521c1e8 at pc 0x00001c82ebe5 bp 0x7ffcdd954f00 sp 0x7ffcdd954ef8
READ of size 8 at 0x60600521c1e8 thread T0
#0 0x1c82ebe4 in std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>* std::__1::__tree_next_iter<std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*, std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*) /build/obj-x86_64-linux-gnu/../contrib/libcxx/include/__tree:182:14
#1 0x1c82ebe4 in std::__1::__tree_iterator<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo> >, std::__1::__tree_node<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo> >, void*>*, long>::operator++() /build/obj-x86_64-linux-gnu/../contrib/libcxx/include/__tree:848:11
#2 0x1c82ebe4 in std::__1::__tree<std::__1::__value_type<Poco::Timestamp, std::__1::shared_ptr<DB::BackgroundSchedulePoolTaskInfo> >, std::__1::__map_value_compa
@abyss7
abyss7 / test.g4
Created September 29, 2020 14:27
Buggy grammar
grammar test;
queryStmt: query (SEMICOLON | EOF) | insertStmt;
query
: alterStmt
| analyzeStmt
| createStmt
| optimizeStmt
| selectUnionStmt
| showStmt