Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: mtr binlog.binlog_unsafe crash #341

Closed
1 task
zsp108 opened this issue Aug 3, 2022 · 3 comments
Closed
1 task

bug: mtr binlog.binlog_unsafe crash #341

zsp108 opened this issue Aug 3, 2022 · 3 comments
Assignees
Labels
A-bug Something isn't working prio: high High priority

Comments

@zsp108
Copy link
Contributor

zsp108 commented Aug 3, 2022

Describe the problem

./mtr --suite=binlog binlog_unsafe --force --max-test-fail=0 --retry=0

fail msg

[ 82%] binlog.binlog_unsafe 'stmt'              w2 [ fail ]
        Test ended at 2022-08-02 18:35:00

CURRENT_TEST: binlog.binlog_unsafe
mysqltest: At line 436: query 'UPDATE t1 SET b = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s' WHERE a = 'a' LIMIT 1' failed: 2013: Lost connection to MySQL server during query

error log

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 = 61029 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7ff52c000d80
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 = 7ffac813c7a0 thread_stack 0x80000
/data/root/src/stonedb57/install/bin/mysqld(my_print_stacktrace+0x2c)[0x11e1e0c]
/data/root/src/stonedb57/install/bin/mysqld(handle_fatal_signal+0x367)[0xa6cc47]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7fface811420]
/lib/x86_64-linux-gnu/libc.so.6(+0x1886e5)[0x7ffacde336e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x78d15)[0x7ffacdd23d15]
/lib/x86_64-linux-gnu/libc.so.6(+0x8bf9a)[0x7ffacdd36f9a]
/data/root/src/stonedb57/install/bin/mysqld(_ZN7stonedb5utils6LogCtl6LogMsgENS_6logger12LogCtl_LevelEPKciS5_z+0xb5)[0x16a1ce5]
/data/root/src/stonedb57/install/bin/mysqld[0xeef983]
/data/root/src/stonedb57/install/bin/mysqld(_Z17sql_print_warningPKcz+0x93)[0xef2683]
/data/root/src/stonedb57/install/bin/mysqld(_ZN3THD21issue_unsafe_warningsEv+0x1d7)[0x11736c7]
/data/root/src/stonedb57/install/bin/mysqld(_ZN3THD12binlog_queryENS_22enum_binlog_query_typeEPKcmbbbi+0x11a)[0x11776ea]
/data/root/src/stonedb57/install/bin/mysqld(_Z12mysql_updateP3THDR4ListI4ItemES4_y15enum_duplicatesPyS6_+0x1257)[0x1029b77]
/data/root/src/stonedb57/install/bin/mysqld(_ZN14Sql_cmd_update23try_single_table_updateEP3THDPb+0x1d4)[0x102c394]
/data/root/src/stonedb57/install/bin/mysqld(_ZN14Sql_cmd_update7executeEP3THD+0x27)[0x102c697]
/data/root/src/stonedb57/install/bin/mysqld(_Z21mysql_execute_commandP3THDb+0x89a)[0xfa150a]
/data/root/src/stonedb57/install/bin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x3a5)[0xfa7605]
/data/root/src/stonedb57/install/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0xa44)[0xfa8104]
/data/root/src/stonedb57/install/bin/mysqld(_Z10do_commandP3THD+0x200)[0xfa9b50]
/data/root/src/stonedb57/install/bin/mysqld(handle_connection+0x290)[0x106a970]
/data/root/src/stonedb57/install/bin/mysqld(pfs_spawn_thread+0x154)[0x15348f4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609)[0x7fface805609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7ffacddca133]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7ff52ceddff0): UPDATE t1 SET b = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s' WHERE a = 'a' LIMIT 1
Connection ID (thread ID): 3
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file
safe_process[1741925]: Child process: 1741926, killed by signal: 11

Expected behavior

Using parallel: 1

==============================================================================

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
worker[1] mysql-test-run: WARNING: running this script as _root_ will cause some tests to be skipped
[ 25%] binlog.binlog_unsafe 'mix'               [ skipped ]  Doesn't support --binlog-format='mixed'
[ 50%] binlog.binlog_unsafe 'row'               [ skipped ]  Doesn't support --binlog-format='row'
[ 75%] binlog.binlog_unsafe 'stmt'              [ pass]  
[100%] shutdown_report                          [ pass ]
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.000 of 7 seconds executing testcases

Completed: All 2 tests were successful.

2 tests were skipped, 0 by the test itself.

How To Reproduce

execution update

DROP PROCEDURE p1;
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a VARCHAR(100), b VARCHAR(100));
INSERT INTO t1 VALUES ('a','b');
UPDATE t1 SET b = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s' WHERE a = 'a' LIMIT 1;

Stonedb engine

mysql> create database tt;
Query OK, 1 row affected (0.00 sec)

mysql> use tt;
Database changed
mysql> CREATE TABLE t1 (a VARCHAR(100), b VARCHAR(100));
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ('a','b');
Query OK, 1 row affected (0.01 sec)

mysql> show create table t1;
+-------+-------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                  |
+-------+-------------------------------------------------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `a` varchar(100) DEFAULT NULL,
  `b` varchar(100) DEFAULT NULL
) ENGINE=STONEDB DEFAULT CHARSET=utf8mb4 |
+-------+-------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> UPDATE t1 SET b = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s' WHERE a = 'a' LIMIT 1;
ERROR 2013 (HY000): Lost connection to MySQL server during query

mysql> UPDATE t1 SET b = '%s' WHERE a = 'a' LIMIT 1;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    2
Current database: tt

Query OK, 1 row affected, 1 warning (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 1

mysql> select * from t1;
+------+------+
| a    | b    |
+------+------+
| a    | %s   |
+------+------+
1 row in set (0.00 sec)

mysql> UPDATE t1 SET b = '%s%s' WHERE a = 'a' LIMIT 1;
ERROR 2013 (HY000): Lost connection to MySQL server during query

Stonedb Innodb engine

mysql> DROP TABLE t1;
Query OK, 0 rows affected (0.01 sec)

mysql> DROP TABLE IF EXISTS t1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> CREATE TABLE t1 (a VARCHAR(100), b VARCHAR(100))engine=innodb;
Query OK, 0 rows affected (0.00 sec)

mysql> show create table t1;
+-------+------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                 |
+-------+------------------------------------------------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `a` varchar(100) DEFAULT NULL,
  `b` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 |
+-------+------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> INSERT INTO t1 VALUES ('a','b');
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE t1 SET b = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s' WHERE a = 'a' LIMIT 1;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> select * from t1;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    2
Current database: tt

+------+------+
| a    | b    |
+------+------+
| a    | b    |
+------+------+
1 row in set (0.00 sec)

mysql> UPDATE t1 SET b = '%s%s' WHERE a = 'a' LIMIT 1;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> select * from t1;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    2
Current database: tt

+------+------+
| a    | b    |
+------+------+
| a    | b    |
+------+------+
1 row in set (0.00 sec)

mysql> UPDATE t1 SET b = '%s' WHERE a = 'a' LIMIT 1;
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1

Environment

bin/mysqld  Ver 5.7.36-StoneDB for Linux on x86_64 (build-)
build information as follow:
        Repository address: https://github.com/zsp108/stonedb.git:fix/mtr277
        Branch name: fix/mtr277
        Last commit ID: c845005
        Last commit time: Date:   Mon Aug 1 09:02:57 2022 +0000
        Build time: Date: Tue Aug  2 09:28:46 UTC 2022

Linux ub01 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

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

  • Yes, I will!
@zsp108 zsp108 added the A-bug Something isn't working label Aug 3, 2022
@andyli029
Copy link
Contributor

ACK.

@RingsC RingsC assigned haitaoguan and lylth and unassigned andyli029 and haitaoguan Oct 14, 2022
@RingsC RingsC added the prio: high High priority label Oct 18, 2022
@hustjieke hustjieke self-assigned this Nov 17, 2022
@hustjieke hustjieke added this to the stonedb_5.7_v1.0.2 milestone Nov 17, 2022
@hustjieke hustjieke moved this to In Progress in StoneDB for MySQL 5.7 Nov 17, 2022
@hustjieke hustjieke moved this to In Progress in StoneDB for MySQL 8.0 Nov 17, 2022
@hustjieke hustjieke added prio: low Low priority and removed prio: high High priority labels Nov 24, 2022
@RingsC RingsC assigned konghaiya and unassigned hustjieke and lylth Nov 29, 2022
@RingsC RingsC added prio: high High priority and removed prio: low Low priority labels Nov 29, 2022
@konghaiya
Copy link
Collaborator

It does not reappear. It may have been repaired in a later version. Please re verify. If there is no problem, close the issue.

mysql> DROP TABLE IF EXISTS t1;
Query OK, 0 rows affected (0.01 sec)

mysql> CREATE TABLE t1 (a VARCHAR(100), b VARCHAR(100));
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO t1 VALUES ('a','b');
Query OK, 1 row affected (0.04 sec)

mysql> UPDATE t1 SET b = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s' WHERE a = 'a' LIMIT 1;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from t1;
+------+------------------------------+
| a    | b                            |
+------+------------------------------+
| a    | %s%s%s%s%s%s%s%s%s%s%s%s%s%s |
+------+------------------------------+
1 row in set (0.00 sec)

@RingsC
Copy link
Contributor

RingsC commented Dec 1, 2022

From the call stacks, we can read that this issue maybe in a single table duplication update. and related to #963 and #1014

@RingsC RingsC closed this as completed Dec 1, 2022
Repository owner moved this from In Progress to Done in StoneDB for MySQL 8.0 Dec 1, 2022
Repository owner moved this from In Progress to Done in StoneDB for MySQL 5.7 Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working prio: high High priority
Projects
Development

No branches or pull requests

8 participants