stoneatom / stonedb

StoneDB is an Open-Source MySQL HTAP and MySQL-Native DataBase for OLTP, Real-Time Analytics, a counterpart of MySQLHeatWave. (https://stonedb.io)

Home Page:https://stonedb.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: debug version, aggregation leads to mysqld crash

davidshiz opened this issue · comments

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

[ 44%] tianmu.aggregate                         w10 [ fail ]
        Test ended at 2023-06-13 12:30:27

CURRENT_TEST: tianmu.aggregate
mysqltest: At line 86: query 'SELECT "count(distinct 17)_test1", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs1' failed: 2013: Lost connection to MySQL server during query

The result from queries just before the failure was:
< snip >
(12345678901,123456.90128,0.1234567890123,2,1,1),
(NULL,NULL,NULL,2,1,1),
(0,0,0,2,1,1),
(1234,5678,0.12345678901234,3,2,2),
(1234567899,5678,0.1234567890123,3,2,2),
(12345678901,123456.90123,0.1234567890123,3,2,2),
(NULL,NULL,NULL,3,2,2),
(0,0,0,3,2,2);
SELECT "sum(17)_test1", sum(d1),sum(d2),sum(d3) FROM cs1;
sum(17)_test1   sum(d1) sum(d2) sum(d3)
sum(17)_test1   1222279007616   264347.8012300000       0.1234567890774000
SELECT "count(17)_test1", count(d1),count(d2),count(d3) FROM cs1;
count(17)_test1 count(d1)       count(d2)       count(d3)
count(17)_test1 11      11      11
SELECT "min(17)_test1", min(d1),min(d2),min(d3) FROM cs1;
min(17)_test1   min(d1) min(d2) min(d3)
min(17)_test1   -12345678923    -5678.0000000000        -0.1234567890123450
SELECT "max(17)_test1", max(d1),max(d2),max(d3) FROM cs1;
max(17)_test1   max(d1) max(d2) max(d3)
max(17)_test1   1234567890123   123856.9000000000       0.1234567890900000
safe_process[15038]: Child process: 15039, exit: 1


Server [mysqld.1 - pid: 13250, winpid: 13250, exit: 256] failed during test run
Server log from this test:
----------SERVER LOG START-----------
mysqld: /stonedb/storage/tianmu/optimizer/group_table.cpp:384: void Tianmu::core::GroupTable::Initialize(int64_t, bool): Assertion `distinct_size > 0' failed.
12:30:26 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 61094 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f3e2c0126e0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f48b0113640 thread_stack 0x40000
/stonedb57/install/bin/mysqld(my_print_stacktrace+0x35)[0x277990d]
/stonedb57/install/bin/mysqld(handle_fatal_signal+0x3e4)[0x1d5fecf]
/lib64/libpthread.so.0(+0xf630)[0x7f48c5bb4630]
/lib64/libc.so.6(gsignal+0x37)[0x7f48c35af387]
/lib64/libc.so.6(abort+0x148)[0x7f48c35b0a78]
/lib64/libc.so.6(+0x2f1a6)[0x7f48c35a81a6]
/lib64/libc.so.6(+0x2f252)[0x7f48c35a8252]
/stonedb57/install/bin/mysqld(_ZN6Tianmu4core10GroupTable10InitializeElb+0x17d5)[0x2ff04a5]
/stonedb57/install/bin/mysqld(_ZN6Tianmu4core14GroupByWrapper10InitializeElb+0x33)[0x2ffc693]
/stonedb57/install/bin/mysqld(_ZN6Tianmu4core20AggregationAlgorithm9AggregateEbRlS2_PNS0_12ResultSenderE+0x85f)[0x2fd4a97]
/stonedb57/install/bin/mysqld(_ZN6Tianmu4core9TempTable11MaterializeEbPNS0_12ResultSenderEb+0x88a)[0x2d5e5be]
/stonedb57/install/bin/mysqld(_ZN6Tianmu4core6Engine7ExecuteEP3THDP3LEXP12Query_resultP18st_select_lex_unit+0xbb4)[0x2d0a6b8]
/stonedb57/install/bin/mysqld(_ZN6Tianmu4core6Engine12HandleSelectEP3THDP3LEXRP12Query_resultmRiS9_S9_i+0x8da)[0x2d0926c]
/stonedb57/install/bin/mysqld(_ZN6Tianmu9DBHandler18ha_my_tianmu_queryEP3THDP3LEXRP12Query_resultmRiS8_S8_i+0xac)[0x309f553]
/stonedb57/install/bin/mysqld[0x244712e]
/stonedb57/install/bin/mysqld(_Z21mysql_execute_commandP3THDb+0xdfb)[0x24407b0]
/stonedb57/install/bin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x6ae)[0x244816d]
/stonedb57/install/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0xcc0)[0x243d4f6]
/stonedb57/install/bin/mysqld(_Z10do_commandP3THD+0x4bb)[0x243c340]
/stonedb57/install/bin/mysqld(handle_connection+0x1ec)[0x256e513]
/stonedb57/install/bin/mysqld(pfs_spawn_thread+0x170)[0x2c3d33b]
/lib64/libpthread.so.0(+0x7ea5)[0x7f48c5bacea5]
/lib64/libc.so.6(clone+0x6d)[0x7f48c3677b0d]

Expected behavior

No response

How To Reproduce

No response

Environment

[root@stonedb-test support-files]# /stonedb57/install/bin/mysqld --version
/stonedb57/install/bin/mysqld  Ver 5.7.36-StoneDB-v1.0.1.6b369e5 for Linux on x86_64 (build-)
build information as follow:
        Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
        Branch name: stonedb-5.7-dev
        Last commit ID: 6b369e5
        Last commit time: Date:   Thu Jun 8 19:16:12 2023 +0800
        Build time: Date: Tue Jun 13 08:31:13 UTC 2023

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!