已关闭
[Bug]: D库发布订阅创建订阅失败 #8353
liyangx创建于  7月27日关闭于  8月18日
liyangx成员
7月27日 创建

测试类型

工具功能

测试版本

7.0.0LTS

问题描述

(伙伴存在执行 D库发布订阅失败问题,请逐步排查,修复D库发布订阅,可能不止如下跑的问题)
执行 D 库兼容模式下的发布订阅 check 时,首个用例 rep_changes 失败。问题发生在 CREATE SUBSCRIPTION 后,订阅端 logical replication apply worker 启动阶段触发服务端断言,导致订阅端主节点退出,后续用例持续连接订阅端端口失败并超时。

操作系统和硬件信息

不限

测试环境

企业版单机

被测功能

D 库兼容模式下发布订阅功能,涉及 logical replication subscription apply worker。

预置条件

  1. openGauss 已完成 configure、make、make install。
  2. 编译参数包含 debug/cassert。
  3. 已准备发布订阅 check 测试目录:src/test/subscription。
  4. 使用 D 库兼容模式执行 check。

操作步骤

执行D库发布订阅check

预期输出

详细可见发布订阅check文档:https://opengauss.org/zh/blogs/xiteming/HowtorunFastcheck.html

实际输出

首个用例 rep_changes 失败:

rep_changes .... FAILED

用例日志显示订阅端端口持续不可连接:

failed to connect Unknown:58209.
testcase_failed, timed out waiting for subscriber to synchronize data.

订阅端主节点后台日志显示服务端断言失败:

TRAP: FailedAssertion("!(t_thrd.utils_cxt.CurrentResourceOwner == __null)", File: "worker.cpp", Line: 2211)

对应源码位置:

src/gausskernel/storage/replication/logical/worker.cpp:2211
代码:
Assert(t_thrd.utils_cxt.CurrentResourceOwner == NULL);

日志信息

详细可见:https://gitcode.com/liyangx/log-record-all/tree/main/issues/server/issue8353 文件

rep_changes.log:3-102
failed to connect Unknown:58209.

rep_changes.log:103
testcase_failed, timed out waiting for subscriber to synchronize data.

305 Connected to remote server success.
306 WARNING: get thread backend role 0 not match current thread rolr 74
307 TRAP: FailedAssertion("!(t_thrd.utils_cxt.CurrentResourceOwner == __null)", File: "worker.cpp", Line: 2211)

提单组织

内部开发

测试代码

likedislike
Lliyangx成员
7月27日 添加了label:bug
opengauss_bot
opengauss_bot成员
7月27日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
7月27日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
7月27日 添加了label:sig/StorageEngine,sig/AI,sig/CM,sig/CloudNative,sig/SecurityTechnology,sig/SQLEngine
opengauss_bot
opengauss_bot成员
7月27日 评论:

Welcome To openGauss Community

Hey @liyangx , 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: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
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: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zhangzq131, @zjh_hw .

likedislike
Lliyangx成员
7月27日 修改了issue 的描述
Lliyangx成员
7月27日 修改标题为 “[Bug]: D库发布订阅创建订阅后 logical replication apply worker 断言失败导致 check 失败”,原标题为“[Bug]: 问题”
Lliyangx成员
7月27日 修改标题为 “[Bug]: D库发布订阅创建订阅失败”,原标题为“[Bug]: D库发布订阅创建订阅后 logical replication apply worker 断言失败导致 check 失败”
Lliyangx成员
7月27日 修改了issue 的描述
Lliyangx成员
7月27日 修改了issue 的描述
Lliyangx成员
7月27日 修改了issue 的描述
wangzecheng00970482
wangzecheng00970482成员
7月29日 评论:

image.png
https://gitcode.com/opengauss/openGauss-server/pull/9321/diffs
t_thrd.utils_cxt.CurrentResourceOwner在此PR中被修改,且回退后能通过该用例

likedislike
ywzq1161327784ywzq1161327784成员
7月29日 将 yanghaos 设为负责人
此处折叠了5条事件消息 查看更多
chendong76chendong76成员
8月12日 issue状态由 已完成 改变为 待回归
sungang14
sungang14成员
8月18日 评论:

【回归人员】sungang14
【回归日期】20260818
【回归版本】openGauss master debug
【回归结论】通过
【回归步骤】
1、进入src/test/subscription目录
make check p=11265 dbcompatibility=D rep_changes 相关用例通过
image.png

likedislike
sungang14sungang14成员
8月18日 issue状态由 待回归 改变为 已验收
sungang14sungang14成员
8月18日 关闭了 issue