已关闭
[Bug]: 【测试类型:工具功能】【测试工具:gsql】开启并行,SQL不含';' or SQL 结合元命令(\g、 \gset ......)执行命令后gsql发生core dump #777
czywj创建于  8月6日关闭于  7 天前
czywj
czywj成员
8月6日 创建

测试类型

工具功能

测试版本

7.0.0LTS

问题描述

操作系统和硬件信息

Linux openGauss171 6.6.0-BLK_IO #6 SMP Thu Sep 18 16:14:26 CST 2025 aarch64 aarch64 aarch64 GNU/Linux

测试环境

企业版主备

被测功能

预置条件

操作步骤

方式1:
通过gsql连接数据库执行如下sql

\parallel on  
select 1 \g
select 1 \g /tmp/out.txt
select 1 \g | cat
select 1 \gset
select 1 as c \gset v\_
select 1 as from \gset 

方式2:
通过文件导入执行SQL

cat test.sql 
\parallel on
select 1

 gsql -f test.sql  -d postgres -p <port>

预期输出

执行成功,异常场景合理报错

实际输出

gsql发生core dump

日志信息

openGauss=# \parallel on
Parallel is on with scale default 1024.
openGauss=# select 1 \g
Segmentation fault (core dumped)

image.png

提单组织

测试团队

测试代码

likedislike
czywjczywj成员
8月6日 添加了label:bug
czywjczywj成员
8月6日 关联了看板:openGauss 7.0.0-LTS
opengauss_botopengauss_bot成员
8月6日 添加了label:sig/OM
opengauss_bot
opengauss_bot成员
8月6日 评论:

Welcome To openGauss Community

Hey @czywj , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: OM ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @hw_hbj, @libiao2024, @miffycree, @wangzili1, @zhangxubo .

likedislike
雷紫薇雷紫薇成员
8月7日 关联了pull request:[Bug]: 【测试类型:工具功能】【测试工具:gsql】开启并行,SQL不含';' or SQL 结合元命令(\g、 \gset ......)执行命令后gsql发生core dump
雷紫薇雷紫薇成员
8月11日 关联了pull request:开启并行与元命令\g、 \gset 冲突,需要更新描述
雷紫薇雷紫薇成员
19 天前 关联了pull request:[Bug]: 【测试类型:工具功能】【测试工具:gsql】开启并行,SQL不含';' or SQL 结合元命令(\g、 \gset ......)执行命令后gsql发生core dump
雷紫薇雷紫薇成员
19 天前 关联了pull request:开启并行与元命令\g、 \gset 冲突,需要更新描述
雷紫薇
雷紫薇成员
13 天前 评论:

基于openGauss7.0.0.B022的包验证,已没问题。结果如下:

[omm@openeuler2003-sp4 simpleInstall]$ gs_ctl start -D $GAUSSHOME/data/single_node -Z single_node
[2026-09-09 10:42:24.509][114635][][gs_ctl]: gs_ctl started,datadir is /home/20260909/data/single_node 
[2026-09-09 10:42:24.515][114635][][gs_ctl]:  another server might be running; Please use the restart command
[omm@openeuler2003-sp4 simpleInstall]$ gsql -d postgres -r -p 5799
gsql ((openGauss 7.0.0 build 9f65f8e9) compiled at 2026-09-08 13:22:35 commit 0 last mr 9636 )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

openGauss=#  \parallel on
Parallel is on with scale default 1024.
openGauss=# select 1 \g
Sending the query buffer by a meta-command is not supported in parallel mode.
openGauss=# select 1 \gset
Sending the query buffer by a meta-command is not supported in parallel mode.
openGauss=# \q
[omm@openeuler2003-sp4 simpleInstall]$ vim test.sql
[omm@openeuler2003-sp4 simpleInstall]$  gsql -f test.sql  -d postgres -p 5799
Parallel is on with scale default 1024.
gsql:test.sql:2: The statement at the end of input is not terminated by a semicolon and cannot be executed in parallel mode.
total time: 0  ms
likedislike
shenzheng4shenzheng4成员
13 天前 issue状态由 待办的 改变为 待回归
yangl_
yangl_成员
7 天前 评论:

回归日期:2026.09.15
回归结论:通过
回归过程:
image.png

likedislike
yangl_yangl_成员
7 天前 issue状态由 待回归 改变为 已验收
yangl_yangl_成员
7 天前 关闭了 issue