StarRocks / starrocks

The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
https://starrocks.io
Apache License 2.0
8.91k stars 1.79k forks source link

be crash with JVM_handle_inux_signal #7161

Closed only2yangcao closed 2 years ago

only2yangcao commented 2 years ago

version: use tag 2.2.0 enable_udf=true

be.out

tcmalloc: large alloc 4295098368 bytes == 0xf1c738000 @  0x5487c5f 0x57194dc 0x1eba748 0x5669755 0x1922eb8 0x22da2d8 0x1d9ceff 0x3175c16 0x316772b 0x3d7afcc 0x3d7bd98 0x1f5b959 0x1f5750a 0x7f38fc1bddd5
tcmalloc: large alloc 4295098368 bytes == 0x11246c8000 @  0x5487c5f 0x57194dc 0x1eba748 0x5669755 0x1922eb8 0x22da2d8 0x22cfb47 0x1d9c0d3 0x1d9c8dd 0x3175723 0x3175e9d 0x316772b 0x3d7afcc 0x3d7bd98 0x1f5b959 0x1f5750a 0x7f38fc1bddd5
*** Aborted at 1655079022 (unix time) try "date -d @1655079022" if you are using GNU date ***
PC: @          0x1b82df8 starrocks::StringColumnWriter::speculate_column_and_set_encoding()
*** SIGSEGV (@0x12246e8000) received by PID 30905 (TID 0x7f2f9fd43700) from PID 611221504; stack trace: ***
    @          0x3caa7b2 google::(anonymous namespace)::FailureSignalHandler()
    @     0x7f38fcce5e9b os::Linux::chained_handler()
    @     0x7f38fcceaa5d JVM_handle_linux_signal
    @     0x7f38fccdd858 signalHandler()
    @     0x7f38fc1c55d0 (unknown)
    @          0x1b82df8 starrocks::StringColumnWriter::speculate_column_and_set_encoding()
    @          0x1b800ff starrocks::StringColumnWriter::append()
    @          0x1a1cd59 starrocks::SegmentWriter::append_chunk()
    @          0x1de3530 starrocks::HorizontalBetaRowsetWriter::flush_chunk()
    @          0x1d93b5d starrocks::vectorized::MemTable::flush()
    @          0x1b0bb03 starrocks::FlushToken::_flush_memtable()
    @          0x1b0c810 starrocks::MemtableFlushTask::run()
    @          0x1f5bcfd starrocks::ThreadPool::dispatch_thread()
    @          0x1f5750a starrocks::Thread::supervise_thread()
    @     0x7f38fc1bddd5 start_thread
    @     0x7f38fb7d8ead __clone
    @                0x0 (unknown)
trueeyu commented 2 years ago
addr2line -e ./starrocks_be 0x5487c5f 0x57194dc 0x1eba748 0x5669755 0x1922eb8 0x22da2d8 0x1d9ceff 0x3175c16 0x316772b 0x3d7afcc 0x3d7bd98 0x1f5b959 0x1f5750a 0x7f38fc1bddd5
/var/local/thirdparty/src/gperftools-gperftools-2.7/src/tcmalloc.cc:1338
/var/local/thirdparty/src/gperftools-gperftools-2.7/src/tcmalloc.cc:1357
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/service/mem_hook.cpp:232
/var/local/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/../../.././libstdc++-v3/libsupc++/new_op.cc:50
/usr/include/c++/10.3.0/bits/stl_vector.h:1169
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/column/nullable_column.cpp:82
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/storage/vectorized/memtable.cpp:93
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/storage/vectorized/delta_writer.cpp:201
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/common/status.h:36
/var/local/thirdparty/src/incubator-brpc-0.9.7/src/bthread/execution_queue.cpp:272
/var/local/thirdparty/src/incubator-brpc-0.9.7/src/bthread/execution_queue.cpp:151
/usr/include/c++/10.3.0/bits/shared_ptr_base.h:732
/usr/include/pthread.h:555
addr2line -e ./starrocks_be 0x5487c5f 0x57194dc 0x1eba748 0x5669755 0x1922eb8 0x22da2d8 0x22cfb47 0x1d9c0d3
 0x1d9c8dd 0x3175723 0x3175e9d 0x316772b 0x3d7afcc 0x3d7bd98 0x1f5b959 0x1f5750a 0x7f38fc1bddd5                                        
/var/local/thirdparty/src/gperftools-gperftools-2.7/src/tcmalloc.cc:1338
/var/local/thirdparty/src/gperftools-gperftools-2.7/src/tcmalloc.cc:1357
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/service/mem_hook.cpp:232
/var/local/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/../../.././libstdc++-v3/libsupc++/new_op.cc:50
/usr/include/c++/10.3.0/bits/stl_vector.h:1169
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/column/nullable_column.cpp:82
/usr/include/c++/10.3.0/bits/stl_vector.h:1046 (discriminator 2)
/usr/include/c++/10.3.0/bits/shared_ptr_base.h:761
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/storage/vectorized/memtable.cpp:181
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/storage/vectorized/delta_writer.cpp:239
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/common/status.h:36
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/common/status.h:36
/var/local/thirdparty/src/incubator-brpc-0.9.7/src/bthread/execution_queue.cpp:272
/var/local/thirdparty/src/incubator-brpc-0.9.7/src/bthread/execution_queue.cpp:151
/usr/include/c++/10.3.0/bits/shared_ptr_base.h:732
/usr/include/pthread.h:555
trueeyu commented 2 years ago

How to reproduce

create table l1 like lineorder;

insert into l1 select * from lineorder;
insert into l1 select * from lineorder;
insert into l1 select * from lineorder;
insert into l1 select * from lineorder;

 CREATE TABLE `t2` (
  `c1` varchar(65533) NULL COMMENT "",
  `c2` varchar(65533) NULL COMMENT ""
) ENGINE=OLAP 
DUPLICATE KEY(`c1`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`c1`) BUCKETS 500 
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "DEFAULT",
"enable_persistent_index" = "false"
);

mysql> select count(*) from l1;
+-----------+
| count(*)  |
+-----------+
| 479978432 |
+-----------+
1 row in set (7.04 sec)

CREATE TABLE `t2` (
  `c1` varchar(65533) NULL COMMENT "",
  `c2` varchar(65533) NULL COMMENT ""
) ENGINE=OLAP 
DUPLICATE KEY(`c1`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`c1`) BUCKETS 500 
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "DEFAULT",
"enable_persistent_index" = "false"
);

insert into t2 select if(lo_quantity=1, lo_shipmode, null), if(lo_quantity=1, repeat(lo_shipmode, 600), null) from l1;

data is wrong

mysql> select count(distinct c1) from t2;
+--------------------+
| count(DISTINCT c1) |
+--------------------+
|                  7 |
+--------------------+
1 row in set (1.42 sec)

mysql> select count(distinct c2) from t2;
+--------------------+
| count(DISTINCT c2) |
+--------------------+
|                 10 |
+--------------------+
1 row in set (7.08 sec)
tcmalloc: large alloc 7418748928 bytes == 0x906daa000 @  0x5361a69 0x55ec3dc 0x1eaff38 0x553cc75 0x1918548 0x22cd378 0x1d9276f 0x316c9e6 0x315e0fb 0x3cb2cfc 0x3cb3ac8 0x1f51769 0x1f4d31a 0x7f4d8d65dea5