apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.66k stars 3.27k forks source link

BE crashed during the upgrade #2189

Closed HangyuanLiu closed 4 years ago

HangyuanLiu commented 4 years ago

Describe the bug Be crashed while I was upgrading from 10.17 to 11.18.

To Reproduce Steps to reproduce the behavior: 1.Upgrade 2.Wait

core bt

0 pop_free_chunk (ptr=0x7f561b0ff440, size=0, this=) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/runtime/memory/chunk_allocator.cpp:84

1 doris::ChunkAllocator::allocate (this=0x641f050, size=size@entry=0, chunk=chunk@entry=0x7f561b0ff440) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/runtime/memory/chunk_allocator.cpp:147

2 0x0000000000fa63ac in doris::MemPool::find_chunk (this=this@entry=0x181dd5b00, min_size=min_size@entry=16759202516318552082, check_limits=check_limits@entry=false) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/runtime/mem_pool.cpp:130

3 0x0000000000e9b694 in allocate (alignment=8, size=-1687541557390999534, this=0x181dd5b00) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/runtime/mem_pool.h:235

4 allocate (size=-1687541557390999534, this=0x181dd5b00) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/runtime/mem_pool.h:109

5 doris::FieldTypeTraits<(doris::FieldType)13>::deep_copy (dest=0x20a900f2, src=0x16e2561fc, mem_pool=0x181dd5b00) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/olap/types.h:540

6 0x0000000000f0b0b6 in doris::MemTable::insert (this=0x16fe850f0, tuple=0x16e2561cc) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/olap/memtable.cpp:73

7 0x000000000151b366 in doris::DeltaWriter::write (this=0x21aa1300, tuple=) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/olap/delta_writer.cpp:163

8 0x000000000100c7be in doris::TabletsChannel::add_batch (this=this@entry=0x152df28c0, params=...) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/runtime/tablets_channel.cpp:94

9 0x0000000001009436 in doris::LoadChannel::add_batch (this=this@entry=0x176f3c300, request=..., tablet_vec=tablet_vec@entry=0x7f91e18) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/runtime/load_channel.cpp:91

10 0x0000000001004a13 in doris::LoadChannelMgr::add_batch (this=0x64e3480, request=..., tablet_vec=0x7f91e18, wait_lock_time_ns=wait_lock_time_ns@entry=0x7f561b0ffee0)

at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/runtime/load_channel_mgr.cpp:125

11 0x0000000001073d75 in doris::PInternalServiceImpl::tablet_writer_add_batch(google::protobuf::RpcController, doris::PTabletWriterAddBatchRequest const, doris::PTabletWriterAddBatchResult, google::protobuf::Closure)::{lambda()#1}::operator()() const (__closure=0x172616fa0) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/service/internal_service.cpp:109

12 0x0000000000ecbcc8 in operator() (this=0x7f561b0fffc0) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/thirdparty/installed/include/boost/function/function_template.hpp:759

13 doris::ThreadPool::work_thread (this=0x14e12d090, thread_id=) at /export/admin/workspace/master/incubator-doris-DORIS-0.11.18-release/be/src/util/thread_pool.hpp:120

imay commented 4 years ago

Because len of StringValue is changed from int to size_t, it will lead invalid length of StringValue. It will make Doris crash.

HangyuanLiu commented 4 years ago

Fix~