apache / doris

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

BE coredump when do schema change #4660

Open acelyc111 opened 4 years ago

acelyc111 commented 4 years ago

Describe the bug BE coredump when do schema change on a column from CHAR(10) to VARCHAR(64)

Core was generated by `/home/work/app/doris/zjyprc-hadoop/be/package/be/lib/palo_be'.
Program terminated with signal 11, Segmentation fault.
#0  is_null (this=0x52a4c280) at /home/laiyingchun/ap_doris/be/src/olap/wrapper_field.h:84
84  /home/laiyingchun/ap_doris/be/src/olap/wrapper_field.h: 没有那个文件或目录.
Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7_3.1.x86_64 libgcc-4.8.5-28.el7_5.1.x86_64 zlib-1.2.7-17.el7.x86_64
(gdb)
(gdb)
(gdb) bt
#0  is_null (this=0x52a4c280) at /home/laiyingchun/ap_doris/be/src/olap/wrapper_field.h:84
#1  compare_cell<doris::WrapperField, doris::RowCursorCell> (this=<optimized out>, rhs=<synthetic pointer>, lhs=...) at /home/laiyingchun/ap_doris/be/src/olap/field.h:137
#2  doris::ColumnDataWriter::next<doris::RowCursor> (this=this@entry=0x8c0ad20, row=...) at /home/laiyingchun/ap_doris/be/src/olap/rowset/column_data_writer.cpp:147
#3  0x0000000000f285e1 in doris::ColumnDataWriter::write<doris::RowCursor> (this=0x8c0ad20, row=...) at /home/laiyingchun/ap_doris/be/src/olap/rowset/column_data_writer.cpp:130

#4  0x0000000000f1894b in doris::AlphaRowsetWriter::_add_row<doris::RowCursor> (this=0x35c87540, row=...) at /home/laiyingchun/ap_doris/be/src/olap/rowset/alpha_rowset_writer.cpp:83
#5  0x0000000001583cc0 in _write_row_block (row_block=0x8c0b900, rowset_writer=0x35c87540, this=0x3af04060) at /home/laiyingchun/ap_doris/be/src/olap/schema_change.cpp:745
#6  doris::SchemaChangeDirectly::process (this=0x3af04060, rowset_reader=..., rowset_writer=0x35c87540, new_tablet=..., base_tablet=...) at /home/laiyingchun/ap_doris/be/src/olap/schema_change.cpp:845
#7  0x000000000158af86 in doris::SchemaChangeHandler::_convert_historical_rowsets (sc_params=...) at /home/laiyingchun/ap_doris/be/src/olap/schema_change.cpp:1718
#8  0x000000000158d59d in doris::SchemaChangeHandler::_do_process_alter_tablet_v2 (this=this@entry=0x7fdf53af7cf0, request=...) at /home/laiyingchun/ap_doris/be/src/olap/schema_change.cpp:1388
#9  0x000000000158e5a2 in doris::SchemaChangeHandler::process_alter_tablet_v2 (this=this@entry=0x7fdf53af7cf0, request=...) at /home/laiyingchun/ap_doris/be/src/olap/schema_change.cpp:1217
#10 0x00000000015c0abf in doris::EngineAlterTabletTask::execute (this=0x7fdf53af7f40) at /home/laiyingchun/ap_doris/be/src/olap/task/engine_alter_tablet_task.cpp:39
#11 0x0000000000df284e in doris::StorageEngine::execute_task (this=0x5c6cc80, task=task@entry=0x7fdf53af7f40) at /home/laiyingchun/ap_doris/be/src/olap/storage_engine.cpp:932
#12 0x00000000013ea8d1 in doris::TaskWorkerPool::_alter_tablet (this=this@entry=0x6d79e60, worker_pool_this=worker_pool_this@entry=0x6d79e60, agent_task_req=..., signature=signature@entry=16036347, task_type=task_type@entry=doris::TTaskType::ALTER,
    finish_task_request=finish_task_request@entry=0x7fdf53af8010) at /home/laiyingchun/ap_doris/be/src/agent/task_worker_pool.cpp:514
#13 0x00000000013f3e27 in doris::TaskWorkerPool::_alter_tablet_worker_thread_callback (arg_this=0x6d79e60) at /home/laiyingchun/ap_doris/be/src/agent/task_worker_pool.cpp:466
#14 0x00007fdfd67eedc5 in start_thread () from /lib64/libpthread.so.0
#15 0x00007fdfd6afa73d in clone () from /lib64/libc.so.6
(gdb) f 1
#1  compare_cell<doris::WrapperField, doris::RowCursorCell> (this=<optimized out>, rhs=<synthetic pointer>, lhs=...) at /home/laiyingchun/ap_doris/be/src/olap/field.h:137
137 /home/laiyingchun/ap_doris/be/src/olap/field.h: 没有那个文件或目录.
(gdb) p lhs
$4 = (const doris::WrapperField &) @0x52a4c280: {
  _vptr.WrapperField = 0x600000000537970,
  _rep = 0x0,
  _is_string_type = false,
  _field_buf = 0x0,                     // I‘m confused how these fields are 0x0.
  _owned_buf = 0x0,
  _length = 281474976710656,
  _var_length = 0,
  _string_content = {
    _M_t = {
      _M_t = {
        <std::_Tuple_impl<0, char*, std::default_delete<char []> >> = {
          <std::_Tuple_impl<1, std::default_delete<char []> >> = {
            <std::_Head_base<1, std::default_delete<char []>, true>> = {
              <std::default_delete<char []>> = {<No data fields>}, <No data fields>}, <No data fields>},
          <std::_Head_base<0, char*, false>> = {
            _M_head_impl = 0x0
          }, <No data fields>}, <No data fields>}
    }
  }
}

I‘m confused how fields like _field_buf, _rep are 0x0.

acelyc111 commented 4 years ago

This issue may be ralated with https://github.com/apache/incubator-doris/issues/4527