starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[sqlancer] query crash

Open wanpengfei-git opened this issue 3 years ago • 0 comments
trafficstars

Steps to reproduce the behavior (Required)

DROP DATABASE IF EXISTS g12;
CREATE DATABASE g12;
USE g12;
admin set frontend config ("enable_decimal_v3" = "true");
CREATE TABLE IF NOT EXISTS t0 (c_0_0 SMALLINT NOT NULL ,c_0_1 BOOLEAN NULL ,c_0_2 JSON NULL ,c_0_3 LARGEINT NOT NULL ,c_0_4 DATE NULL ) DUPLICATE KEY (c_0_0) DISTRIBUTED BY HASH (c_0_0) BUCKETS 3 properties("replication_num"="3") ;
CREATE TABLE IF NOT EXISTS t1 (c_1_0 DATETIME NOT NULL,c_1_1 DATETIME NOT NULL,c_1_2 DATE NOT NULL,c_1_3 DATE NOT NULL,c_1_4 VARCHAR(1) NOT NULL,c_1_5 SMALLINT NOT NULL,c_1_6 ARRAY<INT> NOT NULL,c_1_7 DATE NOT NULL,c_1_8 BOOLEAN NOT NULL,c_1_9 DATETIME NOT NULL,c_1_10 BOOLEAN NOT NULL) PRIMARY KEY (c_1_0,c_1_1,c_1_2,c_1_3,c_1_4) PARTITION BY RANGE(c_1_0) (START ("2010-01-01") END ("2022-12-31") EVERY (INTERVAL 107 day)) DISTRIBUTED BY HASH (c_1_4,c_1_0) BUCKETS 3 properties("replication_num"="3") ;
INSERT INTO t0 VALUES (15, false, parse_json('{"AW6": "1N", "cLCo5Ut5e": -865784128, "LZ4": -280065994, "Eo": 1658156923, "o": 1317853337, "shFeEj9hz": [true, null, 1615738634, true], "46tkqvm": "", "aBjL05": {"2cSA16De": -813404620, "Af9": -315689152, "G": 278154209, "E2Yi0": true, "Uk8r": null, "Y": "V0PWsi4ZF", "ha": null}, "Q": -1645498930, "r": {"qc": null, "U": "DaOh8sN9D", "8dGG": false, "J": false, "OEiJjcJEm": 0.21505107956260106, "j": true, "m": "xHFk"}, "wsuySMR": true, "wnDaSuk": "ee4", "TLzia7Urk": false, "u": true, "v": "I2gxcC3M"}'), -1987731824, '2010-01-18'), (5, true, parse_json('{"p": [null, true, false, 0.6628469023304259, -187692007, true], "HX": {"q": null, "GzfS": null, "o2": null, "T": -840971507, "ogP9": 0.4421162696660754, "DvRqAzMFb": "", "zhG": false, "kiytqJP": -1987731824, "Odxim": 445517400}, "DY": 0.6813831746362642, "jYhS": {"UvKjuLsiJ": true, "abq": -8.65784128E8}, "jO8j3FVD": true, "N": 0.7023872161977865}'), -12831975, '2010-01-05'), (7, true, parse_json('{"Ab": -1389443534, "N3zDFa35": "eyMzJW", "8IxF": null, "7uQKgrv": 1658156923, "Evqp0X": null, "k": false, "GPDKs": "8iaILYU", "ufOmFyW85": false, "p": null, "4": -9223372036854775808, "CGFp4": 0.29770185226506773, "8vZ": 24273532, "CHNJ": null}'), -1912774195, '2010-01-09'), (7, false, parse_json('{"4T": "Ksu", "QjoxbJyQ": -149349143, "ysqw78Qa": 0.6159580785357606, "nD": null, "2HM": 1.658156923E9, "x": null, "i": 1947043290, "cqHIxRv": true, "er": null, "o": "w39Ne8Wj9"}'), -570012682, '2010-01-06');
INSERT INTO t0 VALUES (13, false, parse_json('{"AABEaNq": null, "F": 2062214987, "h": 0.5057420457399344, "L": 1373620604, "RFM7L4HtD": "8TogZotVm", "N": false, "mIR": true, "nG": null, "twB7X": true, "z": "G", "Zu": "7mVBiN5Jm", "MI": true, "V3tDI1vJu": 0.07283278998732412, "iG": "sL"}'), -315689152, '2010-01-17'), (13, true, parse_json('{"A": "", "l4": 0.6048091506292821, "6oBtf23h": true, "J": "t", "uOg": -1912774195, "7ithTFUi": true, "6h": null, "icRm9uCq": -1645498930, "r": "", "s": -8.65784128E8, "W": 1317853337, "ppcWV": [true, true, true, "", true, null, 1.7976931348623157E308, false, true, false, false, false, 445517400, false], "nK": {"fv": 0.7183760711647728, "q": null, "Op": 0.5700325685348154, "Xfc": null, "ruNGvS": "K", "7exsk": 0.02013805692415216, "IAnki0S8": "w", "phDski5": null, "HLa87": null, "XFas": true, "g2": null, "TUZq1": null}}'), -715349672, NULL);
INSERT INTO t1 VALUES ('2010-01-19 08:00:14', '2010-01-16 08:00:14', '2010-01-23', '2010-01-13', '', 1, [1947043290, 2062214987, 2062214987, -715349672], '2010-01-24', true, '2010-01-06 08:00:14', true), ('2010-01-05 08:00:14', '2010-01-16 08:00:14', '2010-01-20', '2010-01-08', '', 6, [-1338290919, -1912774195, 1410400936, -525616210, -516463829, 1403003653, 850510271, -246446798, 154864765, 588928313], '2010-01-26', false, '2010-01-02 08:00:14', false);
INSERT INTO t1 VALUES ('2010-01-04 08:00:14', '2010-01-13 08:00:14', '2010-01-17', '2009-12-31', '', 3, [-1987731824, -1497946694, -1015803472, -1645498930, -1111486458, -653003326, -704287436, -449644476, 1820865304, 1317934449, 674457173], '2010-01-21', false, '2010-01-25 08:00:14', true), ('2010-01-07 08:00:14', '2010-01-12 08:00:14', '2010-01-25', '2010-01-31', '', 9, [-686489301, -2037429714, -570012682, -53596296, 1317934449, 1373620604, 152321837, 1038384068, -516463829, 24273532, 1217344460, -8662739, 1410400936], '2010-01-05', true, '2010-01-05 08:00:14', false), ('2010-01-26 08:00:14', '2010-01-15 08:00:14', '2010-01-18', '2010-01-28', '', 15, [1715376734, 1288122694, -1481692467, -887673926, 166684489], '2010-01-25', false, '2009-12-31 08:00:14', true);
INSERT INTO t0 VALUES (0, true, parse_json('{"fNvV6VA8": null, "wa7sro": 0.7607252494050166, "ChavxL": null, "phJ6llvui": null, "4": "34", "rUDki5mmZ": -6.53003326E8, "1g0ZZg": 0.6215563789677812, "CcZTHo2": null, "YtPIV": -1481692467, "kDKHup00": false}'), -671402978, '2010-01-28');
INSERT INTO t1 VALUES ('2010-01-24 08:00:14', '2010-01-01 08:00:14', '2010-01-12', '2010-01-27', '', 5, [1374893035, -653003326, -1024151029, -216003720, -1329569612, 166684489, -2010605222, 150090073, 674457173, -1968372857, -871821317, 1625769757, 338296681, -796426994], '2010-01-01', false, '2010-01-15 08:00:14', true), ('2010-01-25 08:00:14', '2010-01-07 08:00:14', '2010-01-19', '2010-01-25', '', 4, [1715376734, -1111486458, -1889633195, -840971507, -216003720, -246165471, -325293829, 1374893035], '2010-01-28', true, '2010-01-07 08:00:14', false);
TRUNCATE TABLE t1;
INSERT INTO t1 VALUES ('2010-01-21 08:00:14', '2010-01-21 08:00:14', '2010-01-06', '2009-12-31', '', 3, [-1031127901, 2062214987, 646492369, -1005841588, 1038384068, 460572403, 309341903, -12831975, -667552055, -246446798], '2010-01-03', false, '2010-01-11 08:00:14', false), ('2010-01-04 08:00:14', '2010-01-12 08:00:14', '2010-01-06', '2010-01-27', '', 4, [-1968372857, 2052998669, 1658156923], '2010-01-27', true, '2010-01-15 08:00:14', true);
INSERT INTO t0 VALUES (11, false, parse_json('{"Kn55V": true, "Hh": 850510271, "39XJol": null, "ej0": true, "J": true, "9f": false, "N3IXpa": "ZyhoY", "Gbxu2N": "9", "KBsn": false, "RZVmW": false, "I7hj8": null, "LTre": true, "y": false}'), -1142065249, '2010-01-29'), (5, false, parse_json('{"ORGceK": 849969568, "a": 939079162, "B": null, "T": -1329569612, "E": 0.29770185226506773, "l7": 1.317853337E9}'), -1540774248, '2010-01-07');
INSERT INTO t1 VALUES ('2010-01-30 08:00:14', '2010-01-04 08:00:14', '2010-01-02', '2010-01-04', '', 14, [685301646, 1288122694, 283149564, 1885630819], '2010-01-28', true, '2010-01-19 08:00:14', false), ('2010-01-05 08:00:14', '2010-01-19 08:00:14', '2010-01-05', '2010-01-02', '', 15, [1390538266, -1218816462, -272633053], '2010-01-26', true, '2010-01-20 08:00:14', true), ('2010-01-02 08:00:14', '2010-01-02 08:00:14', '2010-01-19', '2010-01-04', '', 12, [-845524553, -1788547815, -1136107109, 823875900, 1891176790, 244632611], '2010-01-21', true, '2010-01-04 08:00:14', false);
INSERT INTO t1 VALUES ('2010-01-07 08:00:14', '2010-01-04 08:00:14', '2010-01-11', '2010-01-09', '', 2, [1581636058, 203285094, -427275804, 20232956, 460572403, -124613462, 1917454306, -1399890343, -85707952, 152032498], '2010-01-08', true, '2010-01-01 08:00:14', false), ('2010-01-02 08:00:14', '2010-01-23 08:00:14', '2010-01-13', '2010-01-28', '', 14, [-9223372036854775808, -911605767, -704287436, 453650209, -1298129281, -988700477, -1474399231, 1288122694, 283149564, 796786046, -648279457, 1947043290], '2010-01-21', true, '2010-01-16 08:00:14', false);
INSERT INTO t0 VALUES (10, false, parse_json('{"z28UkO5s": true, "D": true, "oXEr": 0.28322662716072944, "E": -5.16463829E8, "v": -188080894, "7": -1111486458, "x": false, "Lu": {"LzmqHWkeF": [true, null, -1258214492], "vu1h": 811865520, "d0GG": null, "79": 0.2894475716723862, "1t": {"UdwwY8zRx": null, "2g": -329503497, "WiPuSRE": false, "5q9iQh": -740112498, "W": 0.766646684158092, "8p": null, "KvD": null, "h": false, "JIg": 0.4079900198164508, "Uo": -3.25293829E8, "N": "X3"}, "w": {"lkxjUdF": false, "S": -1913907514, "d": false, "NC": -934182772, "g": -1408158063, "wjM": 850510271, "AL": -2146464683, "L": 0.8816567479432709, "m": 1.288122694E9}, "h": {"A": -1336612173, "y0": "YOODmpr3"}, "HS5": -1837362644, "ns487": false, "m2J6lh": null, "B7Hb2knaw": "Iv63"}, "S9q": [489303866, 0.04810385710015985, "tyik68iH7", [true, -246446798, null, -1717646392, null, 2052959869, false, "4q6W", null, null, "", false], true, 0.7676783168162292, null, 678589362, 0.5057420457399344, 0.8240570156178618, ["87", null, 0.6907146162956188, 503038084, true, 0.5057420457399344, null, ""], [null, null, false], "uAjSwCp", "YMH86Opuu"], "H3": [[false, true, "OP", 2123875060, 338296681, null, null, 0.12785178975334177, 0.9459742984626446, false], {"p76i3iYpC": true, "574": null, "jh8cBrF": 0.10720750051438077, "Xba": true, "TydCnrETY": 685301646, "zUltC": "g", "A6tP": 0.9459742984626446}, [424868243, 0.5671355597739474, 1389457658, null, "6N", null, null, null, false, null, 646492369, null, "K4", null, 0.32336243103021534], 982003587, {"Ei": true, "IZ5Gn": null, "H": null, "FRiH": "y", "IRke1nl": true, "aJ70eM1H": 0.5803093634645171, "hK1": null, "0": null, "w": null, "9": true, "y": null, "ZeKbKai08": null, "rcsuZ0f": true}, true, null], "cp": null}'), -1987731824, '2010-01-05');
WITH with_t_0 as (SELECT t0_105.c_0_0, t0_105.c_0_1, t0_105.c_0_3, t0_105.c_0_4 FROM t0 AS t0_105 WHERE false) , with_t_1 as (SELECT t0_105.c_0_0, t0_105.c_0_1, t0_105.c_0_3, t0_105.c_0_4 FROM t0 AS t0_105) SELECT with_t_0.c_0_0, with_t_0.c_0_3, with_t_1.c_0_3, with_t_0.c_0_4, subt0.c_0_1, subt1.c_1_2, subt1.c_1_0, subt0.c_0_0, subt0.c_0_4, subt1.c_1_3, subt1.c_1_10, with_t_1.c_0_1, subt1.c_1_7, subt0.c_0_3, subt1.c_1_8 FROM  (SELECT t1_106.c_1_0, t1_106.c_1_1, t1_106.c_1_2, t1_106.c_1_3, t1_106.c_1_4, t1_106.c_1_5, t1_106.c_1_7, t1_106.c_1_8, t1_106.c_1_9, t1_106.c_1_10 FROM t1 AS t1_106 WHERE  ( (SELECT subt1.c_1_10 FROM  (SELECT t1_106.c_1_0, t1_106.c_1_1, t1_106.c_1_2, t1_106.c_1_3, t1_106.c_1_4, t1_106.c_1_5, t1_106.c_1_7, t1_106.c_1_8, t1_106.c_1_9, t1_106.c_1_10 FROM t1 AS t1_106 WHERE EXISTS (SELECT t1_106.c_1_5 FROM t1 AS t1_106 WHERE (NOT (((t1_106.c_1_5) IS NULL)))) ) subt1 LEFT ANTI JOIN t0 AS t0_105 ON subt1.c_1_10 = t0_105.c_0_3 AND subt1.c_1_10 = t0_105.c_0_3 WHERE true)  ) >= ( (SELECT t1_106.c_1_10 FROM t1 AS t1_106 WHERE (([-1056712070, -105423438, -1684579600, -910076613, -841853682, -246446798, -934510397, 1922145625, 257882153]) IS NULL))  ) ) subt1 RIGHT JOIN (SELECT t0_105.c_0_0, t0_105.c_0_1, t0_105.c_0_3, t0_105.c_0_4 FROM t0 AS t0_105 WHERE (NOT ((NOT ((((720049738)/(NULL)))  BETWEEN (((((-1689844965)*(763944427)))%(((934915063)%(-890256822))))) AND (((-840971507)%(-501327055))) )))) ORDER BY t0_105.c_0_1) subt0 ON subt1.c_1_4 = subt0.c_0_0 AND subt1.c_1_4 <= subt0.c_0_0 AND subt1.c_1_0 != subt0.c_0_0 AND subt1.c_1_0 >= ((-2146203137)+(1080118947)),  with_t_0 AS with_t_0 FULL JOIN with_t_1 AS with_t_1 ON with_t_0.c_0_0 = with_t_1.c_0_1 AND with_t_0.c_0_0 > with_t_1.c_0_1 GROUP BY with_t_0.c_0_0, with_t_0.c_0_3, with_t_1.c_0_3, with_t_0.c_0_4, subt0.c_0_1, subt1.c_1_2, subt1.c_1_0, subt0.c_0_0, subt0.c_0_4, subt1.c_1_3, subt1.c_1_10, with_t_1.c_0_1, subt1.c_1_7, subt0.c_0_3, subt1.c_1_8;

crash.log:
(gdb) bt
#0  x86_64_fallback_frame_state (context=0x7fab5a942df0, context=0x7fab5a942df0, fs=0x7fab5a942ee0) at ./md-unwind-support.h:63
#1  uw_frame_state_for (context=0x7fab5a942df0, fs=0x7fab5a942ee0) at ../.././libgcc/unwind-dw2.c:1271
#2  0x000000000609aa4b in _Unwind_Backtrace (trace=0x45e1290 <google::GetOneFrame(_Unwind_Context*, void*)>, trace_argument=0x7fab5a9430a0) at ../.././libgcc/unwind.inc:302
#3  0x00000000045e164c in google::GetStackTrace (skip_count=2, max_depth=32, result=0x7fab5a9430e0) at src/stacktrace_x86_64-inl.h:100
#4  google::GetStackTrace (result=result@entry=0x7fab5a9430e0, max_depth=max_depth@entry=32, skip_count=skip_count@entry=1) at src/stacktrace_x86_64-inl.h:87
#5  0x00000000045e3bd7 in google::(anonymous namespace)::FailureSignalHandler (signal_number=signal_number@entry=11, signal_info=signal_info@entry=0x7fab5a943530, 
    ucontext=ucontext@entry=0x7fab5a943400) at src/signalhandler.cc:327
#6  0x00000000045e4412 in google::(anonymous namespace)::FailureSignalHandler (signal_number=11, signal_info=0x7fab5a943530, ucontext=0x7fab5a943400)
    at src/signalhandler.cc:306
#7  <signal handler called>
#8  0x0000293300000005 in ?? ()
#9  0x00000000023f21f2 in starrocks::ScopedTimer<starrocks::MonotonicStopWatch>::UpdateCounter (this=0x7fab5a944280) at /root/starrocks/be/src/util/stopwatch.hpp:53
#10 starrocks::ScopedTimer<starrocks::MonotonicStopWatch>::~ScopedTimer (this=0x7fab5a944280, __in_chrg=<optimized out>) at /root/starrocks/be/src/util/runtime_profile.h:713
#11 0x0000000002c84704 in starrocks::pipeline::PipelineDriver::process (this=this@entry=0x5c1efd50, runtime_state=runtime_state@entry=0xa0eee800, worker_id=worker_id@entry=2)
    at /root/starrocks/be/src/common/status.h:143
#12 0x0000000002c7a0ab in starrocks::pipeline::GlobalDriverExecutor::_worker_thread (this=0x9490a10) at /root/starrocks/be/src/exec/pipeline/pipeline_driver_executor.cpp:125
#13 0x00000000024dc865 in std::function<void ()>::operator()() const (this=<optimized out>) at /usr/include/c++/10.3.0/bits/std_function.h:248
#14 starrocks::FunctionRunnable::run (this=<optimized out>) at /root/starrocks/be/src/util/threadpool.cpp:44
#15 starrocks::ThreadPool::dispatch_thread (this=0x95a5880) at /root/starrocks/be/src/util/threadpool.cpp:515
#16 0x00000000024d7d8a in std::function<void ()>::operator()() const (this=0xd999198) at /usr/include/c++/10.3.0/bits/std_function.h:248
#17 starrocks::Thread::supervise_thread (arg=0xd999180) at /root/starrocks/be/src/util/thread.cpp:326
#18 0x00007fabb7251e65 in start_thread () from /lib64/libpthread.so.0
#19 0x00007fabb686c88d in clone () from /lib64/libc.so.6
(gdb) p tls_thread_status
No symbol "tls_thread_status" in current context.
(gdb) f 9
#9  0x00000000023f21f2 in starrocks::ScopedTimer<starrocks::MonotonicStopWatch>::UpdateCounter (this=0x7fab5a944280) at /root/starrocks/be/src/util/stopwatch.hpp:53
53	/root/starrocks/be/src/util/stopwatch.hpp: No such file or directory.
(gdb) p tls_thread_status
$1 = {static BATCH_SIZE = 2097152, _cache_size = 112, _total_consumed_bytes = 35109641888, _try_consume_mem_size = 0, _query_id = {<apache::thrift::TBase> = {
      _vptr.TBase = 0x70}, hi = -2331914018617421331, lo = -6595240083777654396}, _fragment_instance_id = {<apache::thrift::TBase> = {_vptr.TBase = 0x70}, 
    hi = -2331914018617421331, lo = -6595240083777654377}, _driver_id = 0, _is_catched = false, _check = true}

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
  • mysql> select current_version(); +----------------------+ | current_version() | +----------------------+ | MAIN-RELEASE e8ba97d | +----------------------+
  • cluster: sqlancer_master_release_01

wanpengfei-git avatar Aug 12 '22 07:08 wanpengfei-git