查询SQL导致BE 报错large memory alloc 异常退出

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】因为一个SQL导致BE进程退出,BE INFO最后报错large memory alloc 详细的日志如下:


【背景】执行SQL
如下(敏感信息以替换):

./fe.audit.log.20241213-1:2024-12-13 19:31:23.450+08:00 [query] |Timestamp=1734089465058|Client=172.28.173.8:8345|User=admin|AuthorizedUser='admin'@'%'|ResourceGroup=default_wg|Catalog=default_catalog|Db=VDP_RS_TD|State=ERR|ErrorCode=ANALYSIS_ERR|Time=18391|ScanBytes=0|ScanRows=0|ReturnRows=0|StmtId=23909|QueryId=bd3d7c52-b945-11ef-9660-0050568819db|IsQuery=true|feIp=172.28.169.105|Stmt=select new_id, id, work_id, client_id, channel_id, content_type, title, content, user_name, `data`, done, data_status, publish_time, carSeriesName, create_time, ext_fields, biz_ext_attrs, biz_ext_attrs2, biz_ext_attrs3, mentionCarSeries from ( SELECT original_id, array_join(array_filter(x -> x != 'null',array_distinct(ARRAY_AGG(car_series_name))),',') as carSeriesName, ARRAY_UNIQUE_AGG(array_remove(ARRAY_DISTINCT(cast(ext_fields->'$.mention_car_series' as array<STRING> )), car_series_name)) as mentionCarSeries FROM ays_post_process_data where client_id = '764547797eb2e192763f5334028d49c9' and channel_id in ( '-1' , 'test_channel_04' , 'test_channel_05' , 'test_channel_03' , 'test_channel_02' , 'test_channel_01' , 'test_channel_12' , 'test_channel_11' , 'test_channel_10' , 'test_channel_09' , 'test_channel_08' , 'test_channel_07' , 'test_channel_06' , 'test_channel_13' , 'test_channel_14' , 'test_channel_24' , 'test_channel_23' , 'test_channel_22' , 'test_channel_21' , 'test_channel_20' , 'test_channel_19' , 'test_channel_18' , 'test_channel_17' , 'test_channel_16' , 'test_channel_15' , 'test_channel_38' , 'test_channel_37' , 'test_channel_36' , 'test_channel_35' , 'test_channel_34' , 'test_channel_33' , 'test_channel_32' , 'test_channel_31' , 'test_channel_30' , 'test_channel_29' , 'test_channel_28' , 'test_channel_27' , 'test_channel_26' , 'test_channel_25' , 'test_channel_65' , 'test_channel_66' , 'test_channel_41' , 'test_channel_40' , 'test_channel_39' , 'test_channel_44' , 'test_channel_43' , 'test_channel_42' , 'test_channel_47' , 'test_channel_46' , 'test_channel_45' , 'test_channel_49' , 'test_channel_48' , 'test_channel_50' , 'test_channel_51' , 'test_channel_52' , 'test_channel_53' , 'test_channel_58' , 'test_channel_59' , 'test_channel_54' , 'test_channel_55' , 'test_channel_60' , 'test_channel_61' , 'test_channel_56' , 'test_channel_63' , 'test_channel_67' , 'test_channel_62' , 'test_channel_64' , 'test_channel_68' ) and car_series_name in ( '测试1' , '测试2' , '测试3' , '测试4' , '测试5' , '测试6' , '测试7' ) and brand_code_name in ( '测试' ) group by original_id ) as p LEFT JOIN ays_meta_data_analysis amda on p.original_id=amda.new_id where 1=1 and channel_id in ( '-1' , 'test_channel_04' , 'test_channel_05' , 'test_channel_03' , 'test_channel_02' , 'test_channel_01' , 'test_channel_12' , 'test_channel_11' , 'test_channel_10' , 'test_channel_09' , 'test_channel_08' , 'test_channel_07' , 'test_channel_06' , 'test_channel_13' , 'test_channel_14' , 'test_channel_24' , 'test_channel_23' , 'test_channel_22' , 'test_channel_21' , 'test_channel_20' , 'test_channel_19' , 'test_channel_18' , 'test_channel_17' , 'test_channel_16' , 'test_channel_15' , 'test_channel_38' , 'test_channel_37' , 'test_channel_36' , 'test_channel_35' , 'test_channel_34' , 'test_channel_33' , 'test_channel_32' , 'test_channel_31' , 'test_channel_30' , 'test_channel_29' , 'test_channel_28' , 'test_channel_27' , 'test_channel_26' , 'test_channel_25' , 'test_channel_65' , 'test_channel_66' , 'test_channel_41' , 'test_channel_40' , 'test_channel_39' , 'test_channel_44' , 'test_channel_43' , 'test_channel_42' , 'test_channel_47' , 'test_channel_46' , 'test_channel_45' , 'test_channel_49' , 'test_channel_48' , 'test_channel_50' , 'test_channel_51' , 'test_channel_52' , 'test_channel_53' , 'test_channel_58' , 'test_channel_59' , 'test_channel_54' , 'test_channel_55' , 'test_channel_60' , 'test_channel_61' , 'test_channel_56' , 'test_channel_63' , 'test_channel_67' , 'test_channel_62' , 'test_channel_64' , 'test_channel_68' ) order by create_time desc limit 0,20|Digest=|PlanCpuCost=4.003189545850158E10|PlanMemCost=281642.40222782467|CandidateMVs=sta_model_processed_data|IsForwardToLeader=false

【业务影响】单个BE 进程退出 部分SQL查询异常
【是否存算分离】否
【StarRocks版本】3.2.6
【集群规模】3fe(1 LEADER+2FOLLOWER)+3be(fe与be混部)
【机器信息】12C/38G/万兆
【联系方式】社区群17- Kay,谢谢
【附件】

  • fe.log/beINFO/相应截图
  • 慢查询:
    • Profile信息
    • 并行度:show variables like ‘%parallel_fragment_exec_instance_num%’;
    • pipeline是否开启:show variables like ‘%pipeline%’;
    • be节点cpu和内存使用率截图
  • 查询报错:
  • be crash
    • be.out
  • 外表查询报错
    • be.out和fe.warn.log