GoGoWen opened a new issue, #20042:
URL: https://github.com/apache/doris/issues/20042

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   1.1.5-rc01
   
   ### What's Wrong?
   
   be crashed
   
   ### What You Expected?
   
   works well
   
   ### How to Reproduce?
   
   we have a table which is alpha-row-set format, and the cluster is upgraded 
from 0.12, it like:
   CREATE TABLE `wd_tpm_url_analyse_data_bak` (
     `pin_id` bigint(20) NOT NULL COMMENT "",
     `date` date NOT NULL COMMENT "",
     `active_user_log_acct` hll HLL_UNION NULL COMMENT ""
   ) ENGINE=OLAP
   AGGREGATE KEY(`pin_id`, `date`)
   COMMENT "OLAP"
   
   seems there are some null value of column `active_user_log_acct`, which is 
HLL column.  and when the table doing compaction(row engine), the be will 
coredump:
   *** Query id: 0-0 ***
   *** Aborted at 1681099113 (unix time) try "date -d @1681099113" if you are 
using GNU date ***
   *** SIGSEGV unkown detail explain (@0x0) received by PID 199409 (TID 
0x7f4224f47700) from PID 0; stack trace: ***
    0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, 
siginfo_t*, void*) at 
/root/workspace/narwal/coding/narwal-doris/be/src/common/signal_handler.h:428
    1# 0x00007F42824D6400 in /lib64/libc.so.6
    2# doris::HyperLogLog::HyperLogLog(doris::Slice const&) at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/hll.cpp:36
    3# doris::AggregateFuncTraits<(doris::FieldAggregationMethod)5, 
(doris::FieldType)23, (doris::FieldType)22>::init(doris::RowCursorCell*, char 
const*, bool, doris::MemPool*, doris::ObjectPool*) at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/aggregate_func.h:506
    4# doris::TupleReader::_agg_key_next_row(doris::RowCursor*, 
doris::MemPool*, doris::ObjectPool*, bool*) at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/tuple_reader.cpp:141
    5# doris::Merger::merge_rowsets(std::shared_ptr<doris::Tablet>, 
doris::ReaderType, std::vector<std::shared_ptr<doris::RowsetReader>, 
std::allocator<std::shared_ptr<doris::RowsetReader> > > const&, 
doris::RowsetWriter*, doris::Merger::Statistics*) at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/merger.cpp:61
    6# doris::Compaction::do_compaction_impl(long) at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/compaction.cpp:156
    7# doris::Compaction::do_compaction(long) at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/compaction.cpp:121
    8# doris::BaseCompaction::execute_compact_impl() at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/base_compaction.cpp:72
    9# doris::Compaction::execute_compact() at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/compaction.cpp:59
   10# doris::Tablet::execute_compaction(doris::CompactionType) at 
/root/workspace/narwal/coding/narwal-doris/be/src/olap/tablet.cpp:1524
   11# std::_Function_handler<void (), 
doris::StorageEngine::_submit_compaction_task(std::shared_ptr<doris::Tablet>, 
doris::CompactionType)::{lambda()#1}>::_M_invoke(std::_Any_data const&) at 
/var/local/ldb-toolchain/include/c++/11/bits/std_function.h:291
   12# doris::ThreadPool::dispatch_thread() at 
/root/workspace/narwal/coding/narwal-doris/be/src/util/threadpool.cpp:578
   13# doris::Thread::supervise_thread(void*) at 
/root/workspace/narwal/coding/narwal-doris/be/src/util/thread.cpp:407
   14# start_thread in /lib64/libpthread.so.0
   15# __clone in /lib64/libc.so.6。
   
   
   when use debug version we get DCHECK fail at:
   struct AggregateFuncTraits<OLAP_FIELD_AGGREGATION_HLL_UNION, 
OLAP_FIELD_TYPE_HLL> {
       static void init(RowCursorCell* dst, const char* src, bool src_null, 
MemPool* mem_pool,
                        ObjectPool* agg_pool) {
           ### **DCHECK_EQ**(src_null, false);
           dst->set_not_null();
   
           auto* src_slice = reinterpret_cast<const Slice*>(src);
           auto* dst_slice = reinterpret_cast<Slice*>(dst->mutable_cell_ptr());
   
           // we use zero size represent this slice is a agg object
           dst_slice->size = 0;
           auto* hll = new HyperLogLog(*src_slice);
   
           dst_slice->data = reinterpret_cast<char*>(hll);
   
           agg_pool->add(hll);
       }
   
       static void update(RowCursorCell* dst, const RowCursorCell& src, 
MemPool* mem_pool) {
           **### DCHECK_EQ**(src.is_null(), false);
   
           auto* dst_slice = reinterpret_cast<Slice*>(dst->mutable_cell_ptr());
           auto* src_slice = reinterpret_cast<const Slice*>(src.cell_ptr());
           auto* dst_hll = reinterpret_cast<HyperLogLog*>(dst_slice->data);
   
           // fixme(kks): trick here, need improve
           if (mem_pool == nullptr) { // for query
               HyperLogLog src_hll(*src_slice);
               dst_hll->merge(src_hll);
           } else { // for stream load
               auto* src_hll = reinterpret_cast<HyperLogLog*>(src_slice->data);
               dst_hll->merge(*src_hll);
           }
       }
   
   
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to