taosdata / taosdata/TDengine

3.4.0.2版本中在计数窗口流计算中使用group_concat聚合函数会引发宕机和报错

Open
#34,504 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
25.1k
Forks
5k
Avg merge
4d 59m
Merged PRs (30d)
7

Description

Bug Description
3.4.0.2版本中在计数窗口流计算中使用group_concat聚合函数会引发宕机和报错

Environment (please complete the following information):

  • OS: Linux
  • TDengine Version 3.4.2

Additional Context
Add any other context about the problem here.
建表脚本如下:
taos> CREATE STABLE IF NOT EXISTS s_ptr_data (
> ts TIMESTAMP,
> test_value double,
> test_value_str VARCHAR(16),
> test_flag INT,
> hi_limit double,
> lo_limit double
> ) TAGS (
> factory VARCHAR(32),
> fileid VARCHAR(64),
> testnum INT,
> testtxt VARCHAR(256),
> headnum INT,
> sitenum INT,
> productid VARCHAR(64),
> lotid VARCHAR(64),
> sublotid VARCHAR(64),
> jobname VARCHAR(128),
> flowid VARCHAR(32),
> datatype VARCHAR(10),
> nodename VARCHAR(32),
> dutindex INT
> );
Create OK, 0 row(s) affected (0.015924s)

创建流计算脚本如下
taos>
taos> CREATE STREAM s1 COUNT_WINDOW(10)
> FROM s_ptr_data PARTITION BY tbname
> INTO output
> AS
> SELECT LAST(ts) AS ts, AVG(test_value) AS avg_test_value, GROUP_CONCAT(test_value_str, ',') AS test_value_array
> FROM s_ptr_data;

DB error: Row length exceeds max length 65531 [0x8000263E] (0.029885s)

当s_ptr_data 表写入数据后,会引发所有数据库的连接超时以及宕机
目前观察下来,docker,window端都会崩溃

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure using the provided s_ptr_data schema and CREATE STREAM COUNT_WINDOW(10) query with GROUP_CONCAT, then verify behavior after inserting rows. Start by tracing stream aggregation and row-length handling around GROUP_CONCAT; done means the query no longer causes connection timeouts or database crashes on the reported environments and returns a valid result or controlled error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.