Skip to content

[Bug] Creating a materialized view causes the be process to hang #20575

@caoliang-web

Description

@caoliang-web

Search before asking

  • I had searched in the issues and found no similar issues.

Version

doris 1.2.4.1

What's Wrong?

start time: Wed Jun 7 16:34:41 CST 2023
*** Query id: 0-0 ***
*** Aborted at 1686131840 (unix time) try "date -d @1686131840" if you are using GNU date ***
*** Current BE git commitID: Unknown ***
*** SIGSEGV address not mapped to object (@0x0) received by PID 20415 (TID 0x7fb465dda700) from PID 0; stack trace: ***
0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
1# os::Linux::chained_handler(int, siginfo*, void*) in /data/soft/jdk1.8.0_331/jre/lib/amd64/server/libjvm.so
2# JVM_handle_linux_signal in /data/soft/jdk1.8.0_331/jre/lib/amd64/server/libjvm.so
3# signalHandler(int, siginfo*, void*) in /data/soft/jdk1.8.0_331/jre/lib/amd64/server/libjvm.so
4# 0x00007FB5ED7EF400 in /lib64/libc.so.6
5# doris::MultiBlockMerger::merge(std::vector<std::unique_ptr<doris::vectorized::Block, std::default_deletedoris::vectorized::Block >, std::allocator<std::unique_ptr<doris::vectorized::Block, std::default_deletedoris::vectorized::Block > > > const&, doris::RowsetWriter*, unsigned long*) at /root/doris/be/src/olap/schema_change.cpp:136
6# doris::VSchemaChangeWithSorting::_internal_sorting(std::vector<std::unique_ptr<doris::vectorized::Block, std::default_deletedoris::vectorized::Block >, std::allocator<std::unique_ptr<doris::vectorized::Block, std::default_deletedoris::vectorized::Block > > > const&, doris::Version const&, long, long, std::shared_ptrdoris::Tablet, doris::RowsetTypePB, doris::SegmentsOverlapPB, std::shared_ptrdoris::Rowset) at /root/doris/be/src/olap/schema_change.cpp:1676
7# doris::VSchemaChangeWithSorting::_inner_process(std::shared_ptrdoris::RowsetReader, doris::RowsetWriter
, std::shared_ptrdoris::Tablet, std::shared_ptrdoris::TabletSchema)::{lambda()#2}::operator()() const at /var/local/ldb-toolchain/include/c++/11/bits/shared_ptr.h:122
8# doris::VSchemaChangeWithSorting::_inner_process(std::shared_ptrdoris::RowsetReader, doris::RowsetWriter*, std::shared_ptrdoris::Tablet, std::shared_ptrdoris::TabletSchema) at /root/doris/be/src/olap/schema_change.cpp:1618
9# doris::SchemaChange::process(std::shared_ptrdoris::RowsetReader, doris::RowsetWriter*, std::shared_ptrdoris::Tablet, std::shared_ptrdoris::Tablet, std::shared_ptrdoris::TabletSchema) at /var/local/ldb-toolchain/include/c++/11/bits/shared_ptr.h:122
10# doris::SchemaChangeHandler::_convert_historical_rowsets(doris::SchemaChangeHandler::SchemaChangeParams const&) at /root/doris/be/src/olap/schema_change.cpp:2224
11# doris::SchemaChangeHandler::_do_process_alter_tablet_v2(doris::TAlterTabletReqV2 const&) at /root/doris/be/src/olap/schema_change.cpp:2020
12# doris::SchemaChangeHandler::process_alter_tablet_v2(doris::TAlterTabletReqV2 const&) at /root/doris/be/src/olap/schema_change.cpp:1758
13# doris::EngineAlterTabletTask::execute() at /root/doris/be/src/olap/task/engine_alter_tablet_task.cpp:41
14# doris::StorageEngine::execute_task(doris::EngineTask*) at /root/doris/be/src/olap/storage_engine.cpp:1023
15# doris::TaskWorkerPool::_alter_tablet(doris::TAgentTaskRequest const&, long, doris::TTaskType::type, doris::TFinishTaskRequest*) at /root/doris/be/src/agent/task_worker_pool.cpp:536
16# doris::TaskWorkerPool::_alter_tablet_worker_thread_callback() at /root/doris/be/src/agent/task_worker_pool.cpp:496
17# doris::ThreadPool::dispatch_thread() at /root/doris/be/src/util/threadpool.cpp:543
18# doris::Thread::supervise_thread(void*) at /root/doris/be/src/util/thread.cpp:455
19# start_thread in /lib64/libpthread.so.0
20# clone in /lib64/libc.so.6

What You Expected?

After creating the materialized view, the be process is normal

How to Reproduce?

CREATE TABLE tb_app_notification_push
(
  user_id          bigint NOT NULL COMMENT '用户ID',
  notice_list_type smallint    NOT NULL COMMENT 'enum通知类别:1-服务通知;2-平台通知;3-门诊通知;4-会员通知;',
  create_time      datetime    not NULL COMMENT '创建时间',
  depa_code        varchar(128) not NULL DEFAULT "" COMMENT '门诊code',
  id               varchar(255) NOT NULL COMMENT 'PK',
  yn               smallint(6) NOT NULL DEFAULT "1" COMMENT '删除标识,1-正常 -1-已删除',
  object_type      bigint NULL COMMENT '通知关联的对象类型',
  object_id        varchar(64) NULL COMMENT '通知关联的对象ID',
  push_title       text NULL DEFAULT "" COMMENT '推送窗口主标题',
  push_sub_title   text NULL DEFAULT "" COMMENT '推送窗口副标题',
  push_content     text NULL DEFAULT "" COMMENT '推送窗口内容',
  notice_title     text NULL DEFAULT "" COMMENT '通知标题',
  notice_content   text NULL DEFAULT "" COMMENT '通知标题',
  jump_url         text NULL DEFAULT "" COMMENT '跳转链接',
  sent             smallint    NOT NULL DEFAULT "0" COMMENT '推送结果',
  sent_time        datetime NULL COMMENT '推送时间',
  read             boolean     NOT NULL DEFAULT "0" COMMENT '是否已读',
  statistics_label varchar(255) NULL DEFAULT "" COMMENT '消息标签(分类统计用)',
  mobile           varchar(20) NULL DEFAULT "" COMMENT '用户手机号码',
  depa_notice_tag  text NULL DEFAULT "" COMMENT '门诊通知标签',
  store_code    varchar(20) NULL DEFAULT "" COMMENT '通知里选定的门店code'
) ENGINE=OLAP 
UNIQUE KEY(user_id,notice_list_type,create_time,depa_code,id)
COMMENT 'APP推送记录'
PARTITION BY RANGE(create_time)()
DISTRIBUTED BY HASH(user_id,notice_list_type,depa_code) BUCKETS AUTO
PROPERTIES (
    "replication_num" = "3",
    "in_memory" = "true",
    "enable_unique_key_merge_on_write" = "true",
    "light_schema_change" = "true",
    "disable_auto_compaction" = "false",
    "dynamic_partition.enable" = "true",
    "dynamic_partition.time_unit" = "MONTH",
    "dynamic_partition.start" = "-2147483648",
    "dynamic_partition.end" = "3",
    "dynamic_partition.prefix" = "m",
    "dynamic_partition.buckets" = "12",
    "dynamic_partition.replication_num" = "3",
    "dynamic_partition.create_history_partition" = "true",
    "dynamic_partition.history_partition_num" = "76"
);

CREATE MATERIALIZED VIEW mv_test1 as 
SELECT  create_time, id,user_id, notice_list_type,depa_code
FROM tb_app_notification_push
GROUP BY create_time, id,user_id, notice_list_type,depa_code
ORDER BY create_time desc, id desc,user_id, notice_list_type,depa_code;

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions