21 Star 27 Fork 154

src-openEuler/gcc

[22.03 SP3 RC3][codedb] -O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50选项导致Greenplum编译卡死

已验收
缺陷
创建于  
2023-12-18 20:39

【标题描述】-O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50选项导致Greenplum编译卡死

一、缺陷信息
【环境信息】
软件信息

  • OS版本及分支信息:openEuler-22.03-LTS-SP3
  • 内核信息:5.10.0-176.0.0.89.oe2203sp3.aarch64
  • 发现问题的组件版本信息:gcc-10.3.1-42.oe2203sp3.aarch64
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/10.3.1/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,objc,obj-c++,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --without-cloog --enable-gnu-indirect-function --build=aarch64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --disable-bootstrap --with-multilib-list=lp64 --enable-bolt
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 (GCC)

【问题复现步骤】
一、配置编译环境
1.安装依赖

yum -y install curl-devel bzip2-devel python-devel openssl-devel readline-devel perl-ExtUtils-Embed libxml2-devel openldap-devel pam pam-devel perl-devel apr-devel libevent-devel libyaml libyaml-devel libedit-devel libffi-devel bison flex flex-devel

2.安装zstd-dev

1.获取源码:https://github.com/facebook/zstd/releases,选择1.4.3版本源码下载
2、执行以下命令编译安装
tar xf zstd-1.4.3.tar.gz
cd zstd-1.4.3
make -j96
make DESTDIR=/path/zstd-1.4.3 install
export INCLUDE=/path/zstd-1.4.3/include:$INCLUDE
export LD_LIBRARY_PATH=/path/zstd-1.4.3/lib:$LD_LIBRARY_PATH

3.安装 Xerces

1.获取源码:https://github.com/greenplum-db/gp-xerces/releases/tag/v3.1.2-p1,选择v3.1.2-p1版本源码下载
2、执行以下命令编译安装
unzip gp-xerces-3.1.2-p1.zip
cd gp-xerces-3.1.2-p1
./configure --prefix=/path/gp-xerces-3.1.2-p1
make -j96
make install
export INCLUDE=/path/gp-xerces-3.1.2-p1/include:$INCLUDE
export LD_LIBRARY_PATH=/path/gp-xerces-3.1.2-p1/lib:$LD_LIBRARY_PATH

4.安装re2c

1.获取源码:https://github.com/skvadrik/re2c/releases,选择2.0.3版本源码下载
2、执行以下命令编译安装
unzip re2c-2.0.3.zip
cd re2c-2.0.3
./autogen.sh
./configure --prefix=/path/re2c-2.0.3
make -j96
make install 
export INCLUDE=/path/re2c-2.0.3/include:$INCLUDE
export LD_LIBRARY_PATH=/path/re2c-2.0.3/lib:$LD_LIBRARY_PATH

5.安装gporca

1.获取源码:https://github.com/greenplum-db/gporca/releases,选择v3.65.3版本源码下载
2、执行以下命令编译安装
unzip gporca-3.65.3.zip
cd gporca-3.65.3
cmake . -DCMAKE_INSTALL_PREFIX=/path/gporca-3.65.3 -DXERCES_INCLUDE_DIR=/path/gp-xerces-3.1.2-p1/include -DXERCES_LIBRARY=/path/gp-xerces-3.1.2-p1/lib/libxerces-c.so
sed -i "167d" libgpos/src/common/CStackDescriptor.cpp
make -j96
make install
export INCLUDE=/path/gporca-3.65.3/include:$INCLUDE
export LD_LIBRARY_PATH=/path/gporca-3.65.3/lib:$LD_LIBRARY_PATH

二、编译安装
1.获取源码:https://github.com/greenplum-db/gpdb/releases,选择6.0.0版本源码下载
2.执行以下命令进行编译安装

export CC="gcc -O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50"
export CXX="g++ -O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50"
export FC="gfortran -O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50"
tar xf 6.0.0.tar.gz
cd gpdb-6.0.0
./configure --with-perl --with-python --with-libxml --disable-gpfdist --prefix=/path/gpdb-6.0.0 --with-includes=${INCLUDE} --with-libraries=${LD_LIBRARY_PATH} CFLAGS="-Wmaybe-uninitialized -fcommon" CXXFLAGS="-Wmaybe-uninitialized -fcommon"
make

【实际结果】
编译卡死
输入图片说明
【其他相关附件信息】
应用编译安装过程可参考:https://www.hikunpeng.com/document/detail/zh/kunpengdbs/ecosystemEnable/Greenplum/kunpenggreenplum_02_0001.html

评论 (2)

纪晓慧 创建了缺陷 1年前
openeuler-ci-bot 添加了
 
sig/Compiler
标签
1年前
纪晓慧 修改了描述 1年前
纪晓慧 优先级设置为主要 1年前
纪晓慧 负责人设置为刘飞扬 1年前
纪晓慧 里程碑设置为openEuler-22.03-LTS-SP3-round-3 1年前
纪晓慧 计划截止日期设置为2023-12-19 1年前
纪晓慧 计划开始日期设置为2023-12-18 1年前
纪晓慧 计划截止日期2023-12-19 修改为2023-12-22 1年前
纪晓慧 修改了描述 1年前
纪晓慧 修改了描述 1年前
纪晓慧 修改了描述 1年前
刘飞扬 通过合并 Pull Request !374: [Sync] Sync patches from openeuler/gcc.任务状态待办的 修改为已完成 1年前

使用RC5转测repo,回归结果:通过
输入图片说明

纪晓慧 任务状态已完成 修改为已验收 1年前

登录 后才可以发表评论

状态
负责人
项目
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
预计工期 (小时)
开始日期   -   截止日期
-
置顶选项
优先级
里程碑
分支
参与者(2)
5329419 openeuler ci bot 1632792936 纪晓慧-jixiaohuiyou
1
https://gitee.com/src-openeuler/gcc.git
git@gitee.com:src-openeuler/gcc.git
src-openeuler
gcc
gcc

搜索帮助