Skip to content

Instantly share code, notes, and snippets.

View tavplubix's full-sized avatar

Alexander Tokmakov tavplubix

View GitHub Profile
@tavplubix
tavplubix / gist:8e0212a61cf48c0dadf9cca6d11e1eb0
Last active October 17, 2019 12:27
Another tsan report
2019.10.17 13:37:21.917323 [ 1 ] {} <Information> Application: Ready for connections.
2019.10.17 13:37:22.781528 [ 8 ] {} <Debug> system.query_log (MergerMutator): Merge sorted 12089 rows, containing 42 columns (42 merged, 0 gathered) in 1.71 sec., 7068.71 rows/sec., 7.75 MB/sec.
2019.10.17 13:37:22.907177 [ 8 ] {} <Trace> system.query_log: Renaming temporary part tmp_merge_20191014_1138_1290_77 to 20191014_1138_1290_77.
2019.10.17 13:37:22.910180 [ 8 ] {} <Trace> system.query_log (MergerMutator): Merged 2 parts: from 20191014_1138_1289_76 to 20191014_1290_1290_0
==================
WARNING: ThreadSanitizer: data race (pid=682161)
Write of size 8 at 0x7b6000002400 by thread T41 (mutexes: write M916):
#0 memcpy ??:? (clickhouse+0x34ead37)
#1 _nss_sss_endservent ??:? (libnss_sss.so.2+0x5768)
#2 Poco::Path::parseUnix(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /home/avtokmakov/ch/ClickHouse/build_tsan/../contrib/poco/Foundation/src/Path.cpp:602 (clic
WARNING: ThreadSanitizer: heap-use-after-free (pid=1042078)
Write of size 1 at 0x7b04000391ff by thread T101:
#0 void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::reserve<>(unsigned long) /home/avtokmakov/ch/ClickHouse/build_tsan/../dbms/src/Common/PODArray.h:109 (clickhouse+0x373f2b8)
#1 <null> /home/avtokmakov/ch/ClickHouse/build_tsan/../dbms/src/Common/PODArray.h:127 (clickhouse+0x373f2b8)
#2 void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::reserve<>(unsigned long) /home/avtokmakov/ch/ClickHouse/build_tsan/../dbms/src/Common/PODArray.h:205 (clickhouse+0x373f2b8)
#3 DB::ColumnString::replicate(DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const&) const /home/avtokmakov/ch/ClickHouse/build_tsan/../dbms/src/Columns/ColumnString.cpp:292 (clickhouse+0x8d9b324)
#4 StoragesInfoStream /home/avtokmakov/ch/ClickHouse/build_tsan/../dbms/src/Storages/System/StorageSystemPartsBase.cpp:135 (clickhouse+0x886f017)
#5 DB::St
==================
WARNING: ThreadSanitizer: heap-use-after-free (pid=1042078)
Write of size 4 at 0x7b0400037770 by thread T101:
#0 <null> <null> (clickhouse+0x8d9b538)
#1 <null> <null> (clickhouse+0x886f017)
#2 <null> <null> (clickhouse+0x88713cf)
#3 <null> <null> (clickhouse+0x8b64705)
#4 <null> <null> (clickhouse+0x8b3e000)
#5 <null> <null> (clickhouse+0x8b23b72)
#6 <null> <null> (clickhouse+0x8b96e73)
2019.12.25 22:03:10.606795 [ 1317 ] {290a3db9-d50d-433d-9261-8d258a91e675} <Debug> executeQuery: (from [::1]:59248) SELECT (SELECT bitmapXorCardinality((SELECT toDateTime64([[(SELECT [], [], '\0')]], rowNumberInBlock())))) AS gjof, (SELECT CAST((SELECT [-38180779], [], '\0', NULL, NULL), 'Date'), NULL, (SELECT '', [], (SELECT regionToTopContinent([CAST([-37555914], 'DateTime')], '')) AS qhv, (SELECT [], bitNot(), CAST([], 'Date'), 'RZ', NULL), '\0', '0LTc_R5') AS njicgk, (SELECT formatReadableSize([['*,W\'r']], '')) AS dh, '\0'), (SELECT * FROM mysql(NULL, [])), [], ''
2019.12.25 22:03:10.625323 [ 1356 ] {} <Fatal> BaseDaemon: ########################################
2019.12.25 22:03:10.625779 [ 1356 ] {} <Fatal> BaseDaemon: (version 19.19.1.1976) (from thread 1317) (query_id: 290a3db9-d50d-433d-9261-8d258a91e675) Received signal Segmentation fault (11).
2019.12.25 22:03:10.625976 [ 1356 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
2019.12.25 22:03:10.626391 [ 1
2020.08.07 10:47:28.265213 [ 1440 ] {} <Information> SentryWriter: Sending crash reports is disabled
2020.08.07 10:47:29.049967 [ 1440 ] {} <Information> : Starting ClickHouse 20.7.1.1 with revision 54437, build id: 6B6B94644A3E2A235068C211D37F04E26023F84D, PID 1440
2020.08.07 10:47:29.050329 [ 1440 ] {} <Information> : Set OOM score adjustment to 555
2020.08.07 10:47:29.050688 [ 1440 ] {} <Information> Application: starting up
2020.08.07 10:47:29.067010 [ 1440 ] {} <Warning> Application: Server was built in debug mode. It will work slowly.
2020.08.07 10:47:29.071078 [ 1440 ] {} <Information> StatusFile: Status file /home/avtokmakov/ch/test/atomic_tmp/status already exists - unclean restart. Contents:
PID: 658
Started at: 2020-08-07 10:42:54
Revision: 54437
ch1_1 | ==================
ch1_1 | WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=1)
ch1_1 | Cycle in lock order graph: M1029207995302769728 (0x000000000000) => M1029489521819197136 (0x000000000000) => M1029207995302769728
ch1_1 |
ch1_1 | Mutex M1029489521819197136 acquired here while holding mutex M1029207995302769728 in thread T62:
ch1_1 | #0 pthread_mutex_lock <null> (clickhouse+0x2745aa66)
ch1_1 | #1 std::__1::__libcpp_mutex_lock(pthread_mutex_t*) /home/avtokmakov/ch/ClickHouse/build_tsan_debug/../contrib/libcxx/include/__threading_support:322:10 (clickhouse+0x42bfe068)
ch1_1 | #2 std::__1::mutex::lock() /home/avtokmakov/ch/ClickHouse/build_tsan_debug/../contrib/libcxx/src/mutex.cpp:33:14 (clickhouse+0x42bfe188)
ch1_1 | #3 std::__1::unique_lock<std::__1::mutex>::unique_lock(std::__1::mutex&) /home/avtokmakov/ch/ClickHouse/build_tsan_debug/../contrib/libcxx/include/__mutex_base:119:61 (clickhouse+0x2754fd0c)
ch1_1 | #4 DB::StorageDistri
https://clickhouse-test-reports.s3.yandex.net/15003/9000ec0331fe062552590d5b253540e5af039b4f/functional_stateless_tests_(release,_polymorphic_parts_enabled).html#fail1
$ grep -Fa "68ca4fdc-77a8-4a80-81bb-d61ad206d16c" clickhouse-server.log
2020.09.24 17:51:04.371695 [ 44982 ] {2f7f8e82-6c66-4efe-a943-f02f916bd55e} <Debug> test_01193_27222.table_9_164 (68ca4fdc-77a8-4a80-81bb-d61ad206d16c): Loading data parts
2020.09.24 17:51:04.372588 [ 44982 ] {2f7f8e82-6c66-4efe-a943-f02f916bd55e} <Debug> test_01193_27222.table_9_164 (68ca4fdc-77a8-4a80-81bb-d61ad206d16c): Loaded data parts (0 items)
2020.09.24 17:51:04.492700 [ 44982 ] {d3ed15d7-e8f9-4410-b493-eeeb9a5c6ba1} <Trace> test_01193_27222.table_9_164 (68ca4fdc-77a8-4a80-81bb-d61ad206d16c): Renaming temporary part tmp_insert_all_1_1_0 to all_1_1_0.
2020.09.24 17:54:31.939489 [ 44977 ] {b46fcd47-6b94-4be4-b12c-769d4f7efec1} <Debug> test_01193_27222.table_9_164 (68ca4fdc-77a8-4a80-81bb-d61ad206d16c) (SelectExecutor): Key condition: unknown
2020.09.24 17:54:31.93950
2020.11.07 16:00:57.860421 [ 62 ] {} <Fatal> BaseDaemon: ########################################
2020.11.07 16:00:57.861503 [ 62 ] {} <Fatal> BaseDaemon: (version 20.12.1.5122, build id: F136D3C1320C7349) (from thread 42) (query_id: 61fb1f3a-5842-44bd-abad-b7e7d169e9ea) Received signal Segmentation fault (11)
2020.11.07 16:00:57.862165 [ 62 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Unknown si_code.
2020.11.07 16:00:57.862716 [ 62 ] {} <Fatal> BaseDaemon: Stack trace: 0x80b7797 0x107f7c29 0x1177038c 0x11770545 0x1176f790 0x1141199b 0x10c1d590 0x10bcbc00 0x10b75d80 0x11762d57 0x1175e863 0x11769908 0x14459dc3 0x1445a4da 0x145bc812 0x145baee0 0x145b9848 0x80598ad 0x7f806b56a669 0x7f806b4812b3
2020.11.07 16:00:57.908701 [ 62 ] {} <Fatal> BaseDaemon: 5. __tsan_read4 @ 0x80b7797 in /usr/bin/clickhouse
2020.11.07 16:00:57.936987 [ 62 ] {} <Fatal> BaseDaemon: 6. /build/obj-x86_64-linux-gnu/../src/Interpreters/Context.cpp:2069: DB::Context::getApplicationType() const @ 0x107f7c29 in /usr/bin/clickh
node1_1 | =================================================================
node1_1 | ==1==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fc39c61f3b0 at pc 0x00001c18bec9 bp 0x7fc39c61eb10 sp 0x7fc39c61eb08
node1_1 | READ of size 1 at 0x7fc39c61f3b0 thread T58 (MySQLDBSync)
node1_1 | #0 0x1c18bec8 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const /build/obj-x86_64-linux-gnu/../contrib/libcxx/include/string:1426:39
node1_1 | #1 0x1c18bec8 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size() const /build/obj-x86_64-linux-gnu/../contrib/libcxx/include/string:950:17
node1_1 | #2 0x1c18bec8 in bool std::__1::operator==<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> > const&
node_1 | ==================
node_1 | WARNING: ThreadSanitizer: data race (pid=1)
node_1 | Write of size 8 at 0x7f8bcb1fe718 by thread T43:
node_1 | #0 DB::MySQLHandler::comQuery(DB::ReadBuffer&)::$_1::operator()(DB::Progress const&) const /build/obj-x86_64-linux-gnu/../src/Server/MySQLHandler.cpp:332:90 (clickhouse+0x117d7d06)
node_1 | #1 decltype(std::__1::forward<DB::MySQLHandler::comQuery(DB::ReadBuffer&)::$_1&>(fp)(std::__1::forward<DB::Progress const&>(fp0))) std::__1::__invoke<DB::MySQLHandler::comQuery(DB::ReadBuffer&)::$_1&, DB::Progress const&>(DB::MySQLHandler::comQuery(DB::ReadBuffer&)::$_1&, DB::Progress const&) /build/obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3519:1 (clickhouse+0x117d7d06)
node_1 | #2 void std::__1::__invoke_void_return_wrapper<void>::__call<DB::MySQLHandler::comQuery(DB::ReadBuffer&)::$_1&, DB::Progress const&>(DB::MySQLHandler::comQuery(DB::ReadBuffer&)::$_1&, DB::Progress const&) /build/