[MDEV-27895] Performance Schema: Assertion `host_length <= HOSTNAME_LENGTH' failed, and Assertions host_length <= 255 and host_length <= 60 in set_setup_actor_key on INSERT Created: 2022-02-19  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Character Sets, Performance Schema
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: upstream-5.6, upstream-5.7


 Description   

# mysqld options required for replay:  --performance-schema
INSERT INTO performance_schema.setup_actors VALUES ('%','USR','%');
SET SESSION sql_mode='pad_char_to_full_length';
SET CHARACTER SET 'BINARY';
SET collation_connection=ucs2_general_ci;
INSERT INTO performance_schema.setup_actors SET USER='a',HOST='LOCALHOST';

Leads to:

10.9.0 b5852ffbeebc3000982988383daeefb0549e058a (Debug)

mysqld: /test/10.9_dbg/storage/perfschema/pfs_setup_actor.cc:125: void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint): Assertion `host_length <= HOSTNAME_LENGTH' failed.

10.9.0 b5852ffbeebc3000982988383daeefb0549e058a (Debug)

Core was generated by `/test/MD140222-mariadb-10.9.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x14c33012b700 (LWP 3965514))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x000014c359ea6859 in __GI_abort () at abort.c:79
#2  0x000014c359ea6729 in __assert_fail_base (fmt=0x14c35a03c588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555b4b9e34c0 "host_length <= HOSTNAME_LENGTH", file=0x555b4b9e64a8 "/test/10.9_dbg/storage/perfschema/pfs_setup_actor.cc", line=125, function=<optimized out>) at assert.c:92
#3  0x000014c359eb7f36 in __GI___assert_fail (assertion=assertion@entry=0x555b4b9e34c0 "host_length <= HOSTNAME_LENGTH", file=file@entry=0x555b4b9e64a8 "/test/10.9_dbg/storage/perfschema/pfs_setup_actor.cc", line=line@entry=125, function=function@entry=0x555b4b9e64e0 "void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint)") at assert.c:101
#4  0x0000555b4b118c28 in set_setup_actor_key (key=0x555b4e1e7184, user=<optimized out>, user_length=<optimized out>, host=0x14c280021381 "L佃䅌䡏協", ' ' <repeats 187 times>..., host_length=263, role=0x555b4b9c88e3 "%", role_length=1) at /test/10.9_dbg/storage/perfschema/pfs_setup_actor.cc:140
#5  0x0000555b4b119488 in insert_setup_actor (user=user@entry=0x14c330129980, host=host@entry=0x14c3301299a0, role=role@entry=0x14c3301299c0, enabled=enabled@entry=true, history=history@entry=true) at /test/10.9_dbg/sql/sql_string.h:278
#6  0x0000555b4b14116a in table_setup_actors::write_row (table=0x14c2800204a8, buf=<optimized out>, fields=0x14c280020928) at /test/10.9_dbg/storage/perfschema/table_setup_actors.cc:123
#7  0x0000555b4b104696 in PFS_engine_table_share::write_row (this=<optimized out>, table=0x14c2800204a8, buf=buf@entry=0x14c280021380 "\377L佃䅌䡏協", ' ' <repeats 186 times>..., fields=<optimized out>) at /test/10.9_dbg/storage/perfschema/pfs_engine_table.cc:372
#8  0x0000555b4b0f2f56 in ha_perfschema::write_row (this=0x14c280020d80, buf=0x14c280021380 "\377L佃䅌䡏協", ' ' <repeats 186 times>...) at /test/10.9_dbg/storage/perfschema/ha_perfschema.cc:278
#9  0x0000555b4ae0f369 in handler::ha_write_row (this=0x14c280020d80, buf=0x14c280021380 "\377L佃䅌䡏協", ' ' <repeats 186 times>...) at /test/10.9_dbg/sql/handler.cc:7522
#10 0x0000555b4aaa5372 in write_record (thd=thd@entry=0x14c280000db8, table=table@entry=0x14c2800204a8, info=info@entry=0x14c330129cd0, sink=sink@entry=0x0) at /test/10.9_dbg/sql/sql_insert.cc:2156
#11 0x0000555b4aab10c8 in mysql_insert (thd=thd@entry=0x14c280000db8, table_list=0x14c280014180, fields=@0x14c280006080: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c280014a28, last = 0x14c280014c08, elements = 2}, <No data fields>}, values_list=@0x14c2800060c8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c280014878, last = 0x14c280014878, elements = 1}, <No data fields>}, update_fields=@0x14c2800060b0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555b4c1409e0 <end_of_list>, last = 0x14c2800060b0, elements = 0}, <No data fields>}, update_values=@0x14c280006098: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555b4c1409e0 <end_of_list>, last = 0x14c280006098, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.9_dbg/sql/sql_insert.cc:1127
#12 0x0000555b4aaf792a in mysql_execute_command (thd=thd@entry=0x14c280000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:4562
#13 0x0000555b4aae2315 in mysql_parse (thd=thd@entry=0x14c280000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c33012a400) at /test/10.9_dbg/sql/sql_parse.cc:8027
#14 0x0000555b4aaf0fb1 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c280000db8, packet=packet@entry=0x14c28001a129 "INSERT INTO performance_schema.setup_actors SET USER='a',HOST='LOCALHOST'", packet_length=packet_length@entry=73, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1362
#15 0x0000555b4aaf43f8 in do_command (thd=0x14c280000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1402
#16 0x0000555b4ac6efc4 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x555b4e959388, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
#17 0x0000555b4ac6f5c9 in handle_one_connection (arg=arg@entry=0x555b4e959388) at /test/10.9_dbg/sql/sql_connect.cc:1312
#18 0x0000555b4b0f5d67 in pfs_spawn_thread (arg=0x555b4e8506d8) at /test/10.9_dbg/storage/perfschema/pfs.cc:2201
#19 0x000014c35a3b5609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#20 0x000014c359fa3293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.7.2 3351dfaab0599268eaf25f9d6995ef128910a8b9 (Debug)

mysqld: /test/10.7_dbg/storage/perfschema/pfs_setup_actor.cc:125: void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint): Assertion `host_length <= 255' failed.

10.7.2 3351dfaab0599268eaf25f9d6995ef128910a8b9 (Debug)

Core was generated by `/test/MD290122-mariadb-10.7.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x151dc415f700 (LWP 3966705))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x0000151ddea1c859 in __GI_abort () at abort.c:79
#2  0x0000151ddea1c729 in __assert_fail_base (fmt=0x151ddebb2588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55734a3582d7 "host_length <= 255", file=0x55734a35b5e0 "/test/10.7_dbg/storage/perfschema/pfs_setup_actor.cc", line=125, function=<optimized out>) at assert.c:92
#3  0x0000151ddea2df36 in __GI___assert_fail (assertion=assertion@entry=0x55734a3582d7 "host_length <= 255", file=file@entry=0x55734a35b5e0 "/test/10.7_dbg/storage/perfschema/pfs_setup_actor.cc", line=line@entry=125, function=function@entry=0x55734a35b678 "void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint)") at assert.c:101
#4  0x0000557349a94010 in set_setup_actor_key (key=0x55734ca69184, user=0x151d7802164e "a", ' ' <repeats 199 times>..., user_length=128, host=0x151d78021351 "L佃䅌䡏協", ' ' <repeats 187 times>..., host_length=263, role=0x55734a33d043 "%", role_length=1) at /test/10.7_dbg/storage/perfschema/pfs_setup_actor.cc:125
#5  0x0000557349a9493c in insert_setup_actor (user=user@entry=0x151dc415d980, host=host@entry=0x151dc415d9a0, role=role@entry=0x151dc415d9c0, enabled=enabled@entry=true, history=history@entry=true) at /test/10.7_dbg/sql/sql_string.h:278
#6  0x0000557349abfb3a in table_setup_actors::write_row (table=0x151d78020488, buf=<optimized out>, fields=0x151d78020908) at /test/10.7_dbg/storage/perfschema/table_setup_actors.cc:123
#7  0x0000557349a7da4a in PFS_engine_table_share::write_row (this=<optimized out>, table=0x151d78020488, buf=buf@entry=0x151d78021350 "\377L佃䅌䡏協", ' ' <repeats 186 times>..., fields=<optimized out>) at /test/10.7_dbg/storage/perfschema/pfs_engine_table.cc:372
#8  0x0000557349a6859c in ha_perfschema::write_row (this=0x151d78020d60, buf=0x151d78021350 "\377L佃䅌䡏協", ' ' <repeats 186 times>...) at /test/10.7_dbg/storage/perfschema/ha_perfschema.cc:278
#9  0x0000557349786933 in handler::ha_write_row (this=0x151d78020d60, buf=0x151d78021350 "\377L佃䅌䡏協", ' ' <repeats 186 times>...) at /test/10.7_dbg/sql/handler.cc:7516
#10 0x0000557349426160 in write_record (thd=thd@entry=0x151d78000db8, table=table@entry=0x151d78020488, info=info@entry=0x151dc415dcd0, sink=sink@entry=0x0) at /test/10.7_dbg/sql/sql_insert.cc:2156
#11 0x0000557349431dcf in mysql_insert (thd=thd@entry=0x151d78000db8, table_list=0x151d78014170, fields=@0x151d78006078: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x151d78014a18, last = 0x151d78014bf8, elements = 2}, <No data fields>}, values_list=@0x151d780060c0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x151d78014868, last = 0x151d78014868, elements = 1}, <No data fields>}, update_fields=@0x151d780060a8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55734aaafb00 <end_of_list>, last = 0x151d780060a8, elements = 0}, <No data fields>}, update_values=@0x151d78006090: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55734aaafb00 <end_of_list>, last = 0x151d78006090, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.7_dbg/sql/sql_insert.cc:1127
#12 0x000055734947852c in mysql_execute_command (thd=thd@entry=0x151d78000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:4562
#13 0x0000557349462f17 in mysql_parse (thd=thd@entry=0x151d78000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x151dc415e400) at /test/10.7_dbg/sql/sql_parse.cc:8027
#14 0x0000557349471bb3 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151d78000db8, packet=packet@entry=0x151d7801a119 "INSERT INTO performance_schema.setup_actors SET USER='a',HOST='LOCALHOST'", packet_length=packet_length@entry=73, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1360
#15 0x0000557349474ffa in do_command (thd=0x151d78000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1402
#16 0x00005573495eea44 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55734d1daba8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
#17 0x00005573495ef049 in handle_one_connection (arg=arg@entry=0x55734d1daba8) at /test/10.7_dbg/sql/sql_connect.cc:1312
#18 0x0000557349a6f8b0 in pfs_spawn_thread (arg=0x55734d0d2298) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
#19 0x0000151ddef2b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#20 0x0000151ddeb19293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.2.42 (Debug)

mysqld: /test/10.2_dbg/storage/perfschema/pfs_setup_actor.cc:147: void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint): Assertion `host_length <= 60' failed.

10.2.42 (Debug)

Core was generated by `/test/MD290122-mariadb-10.2.42-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x14647c0c8700 (LWP 3967951))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000056079691e403 in my_write_core (sig=sig@entry=6) at /test/10.2_dbg/mysys/stacktrace.c:382
#2  0x0000560796213999 in handle_fatal_signal (sig=6) at /test/10.2_dbg/sql/signal_handler.cc:355
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x000014649cf0a859 in __GI_abort () at abort.c:79
#6  0x000014649cf0a729 in __assert_fail_base (fmt=0x14649d0a0588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x560796b77482 "host_length <= 60", file=0x560796b7a360 "/test/10.2_dbg/storage/perfschema/pfs_setup_actor.cc", line=147, function=<optimized out>) at assert.c:92
#7  0x000014649cf1bf36 in __GI___assert_fail (assertion=assertion@entry=0x560796b77482 "host_length <= 60", file=file@entry=0x560796b7a360 "/test/10.2_dbg/storage/perfschema/pfs_setup_actor.cc", line=line@entry=147, function=function@entry=0x560796b7a398 "void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint)") at assert.c:101
#8  0x0000560796887e79 in set_setup_actor_key (key=0x560797d3b044, user=<optimized out>, user_length=<optimized out>, host=0x1464240210d9 "L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 19 times>..., host_length=68, role=0x560796b65769 "%", role_length=1) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#9  0x00005607968880d0 in insert_setup_actor (user=user@entry=0x14647c0c5940, host=host@entry=0x14647c0c5960, role=role@entry=0x14647c0c5980) at /test/10.2_dbg/sql/sql_string.h:206
#10 0x000056079689970c in table_setup_actors::write_row (table=0x14642401ffa0, buf=<optimized out>, fields=0x14642400c0f0) at /test/10.2_dbg/storage/perfschema/table_setup_actors.cc:97
#11 0x000056079687c264 in PFS_engine_table_share::write_row (this=<optimized out>, table=0x14642401ffa0, buf=buf@entry=0x1464240210d8 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>..., fields=<optimized out>) at /test/10.2_dbg/storage/perfschema/pfs_engine_table.cc:198
#12 0x0000560796879c76 in ha_perfschema::write_row (this=0x146424020ba8, buf=0x1464240210d8 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>...) at /test/10.2_dbg/storage/perfschema/ha_perfschema.cc:281
#13 0x0000560796221cda in handler::ha_write_row (this=0x146424020ba8, buf=0x1464240210d8 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>...) at /test/10.2_dbg/sql/handler.cc:6118
#14 0x0000560795fe82b7 in write_record (thd=thd@entry=0x146424000d90, table=table@entry=0x14642401ffa0, info=info@entry=0x14647c0c5ca0) at /test/10.2_dbg/sql/sql_insert.cc:1951
#15 0x0000560795ff3915 in mysql_insert (thd=thd@entry=0x146424000d90, table_list=0x146424011518, fields=@0x1464240056c8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x146424011d00, last = 0x146424011ee0, elements = 2}, <No data fields>}, values_list=@0x146424005710: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x146424011b50, last = 0x146424011b50, elements = 1}, <No data fields>}, update_fields=@0x1464240056f8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x56079712e660 <end_of_list>, last = 0x1464240056f8, elements = 0}, <No data fields>}, update_values=@0x1464240056e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x56079712e660 <end_of_list>, last = 0x1464240056e0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false) at /test/10.2_dbg/sql/sql_insert.cc:1066
#16 0x000056079600c79c in mysql_execute_command (thd=thd@entry=0x146424000d90) at /test/10.2_dbg/sql/sql_parse.cc:4217
#17 0x00005607960132a4 in mysql_parse (thd=thd@entry=0x146424000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14647c0c7510, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_parse.cc:7793
#18 0x0000560796015da7 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x146424000d90, packet=packet@entry=0x1464240197f1 "INSERT INTO performance_schema.setup_actors SET USER='a',HOST='LOCALHOST'", packet_length=packet_length@entry=73, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_class.h:1109
#19 0x0000560796018baa in do_command (thd=0x146424000d90) at /test/10.2_dbg/sql/sql_parse.cc:1381
#20 0x000056079611ddd2 in do_handle_one_connection (connect=connect@entry=0x5607987ee710) at /test/10.2_dbg/sql/sql_connect.cc:1336
#21 0x000056079611dffd in handle_one_connection (arg=arg@entry=0x5607987ee710) at /test/10.2_dbg/sql/sql_connect.cc:1241
#22 0x000056079689f3a7 in pfs_spawn_thread (arg=0x560798756660) at /test/10.2_dbg/storage/perfschema/pfs.cc:1869
#23 0x000014649d413609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#24 0x000014649d007293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Bug confirmed present in:
MariaDB: 10.2.42 (dbg), 10.3.33 (dbg), 10.4.23 (dbg), 10.5.14 (dbg), 10.5.14 (opt), 10.6.6 (dbg), 10.7.2 (dbg), 10.8.1 (dbg), 10.9.0 (dbg), 10.9.0 (opt)
MySQL: 5.6.51 (dbg), 5.7.36 (dbg)

Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.42 (opt), 10.3.33 (opt), 10.4.23 (opt), 10.6.6 (opt), 10.7.2 (opt), 10.8.1 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (opt), 5.7.36 (opt), 8.0.27 (dbg), 8.0.27 (opt)



 Comments   
Comment by Roel Van de Paar [ 2022-02-19 ]

Note that 10.5 is the only optimized build to crash:

10.5.14 059a8fd87eb900a5a12185b1963e5623df874c21 (Optimized)

mysqld: /test/10.5_opt/storage/perfschema/pfs_setup_actor.cc:125: void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint): Assertion `host_length <= HOSTNAME_LENGTH' failed.

10.5.14 059a8fd87eb900a5a12185b1963e5623df874c21 (Optimized)

Core was generated by `/test/MD290122-mariadb-10.5.14-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x152cec57c700 (LWP 3965410))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x0000152cfcfda859 in __GI_abort () at abort.c:79
#2  0x0000152cfcfda729 in __assert_fail_base (fmt=0x152cfd170588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55a045384290 "host_length <= HOSTNAME_LENGTH", file=0x55a045386ed0 "/test/10.5_opt/storage/perfschema/pfs_setup_actor.cc", line=125, function=<optimized out>) at assert.c:92
#3  0x0000152cfcfebf36 in __GI___assert_fail (assertion=assertion@entry=0x55a045384290 "host_length <= HOSTNAME_LENGTH", file=file@entry=0x55a045386ed0 "/test/10.5_opt/storage/perfschema/pfs_setup_actor.cc", line=line@entry=125, function=function@entry=0x55a045386f08 "void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint)") at assert.c:101
#4  0x000055a044d41ba8 in set_setup_actor_key (key=<optimized out>, user=<optimized out>, user_length=<optimized out>, host=<optimized out>, host_length=68, role=<optimized out>, role_length=1) at /test/10.5_opt/storage/perfschema/pfs_setup_actor.cc:119
#5  set_setup_actor_key (key=<optimized out>, user=<optimized out>, user_length=<optimized out>, host=<optimized out>, host_length=68, role=<optimized out>, role_length=1) at /test/10.5_opt/storage/perfschema/pfs_setup_actor.cc:119
#6  0x000055a044d42567 in insert_setup_actor (user=user@entry=0x152cec57a940, host=host@entry=0x152cec57a960, role=role@entry=0x152cec57a980, enabled=enabled@entry=true, history=history@entry=true) at /test/10.5_opt/sql/sql_string.h:223
#7  0x000055a044d6f766 in table_setup_actors::write_row (table=0x152c48007598, buf=<optimized out>, fields=<optimized out>) at /test/10.5_opt/storage/perfschema/table_setup_actors.cc:123
#8  0x000055a044aa28d8 in handler::ha_write_row (this=0x152c4801a790, buf=0x152c4801ad00 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>...) at /test/10.5_opt/sql/handler.cc:7171
#9  0x000055a04483ea2d in write_record (thd=thd@entry=0x152c48000c58, table=table@entry=0x152c48007598, info=info@entry=0x152cec57ac10, sink=sink@entry=0x0) at /test/10.5_opt/sql/sql_insert.cc:2140
#10 0x000055a04484559c in mysql_insert (thd=thd@entry=0x152c48000c58, table_list=<optimized out>, fields=@0x152c48005b18: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152c48010f38, last = 0x152c48011160, elements = 2}, <No data fields>}, values_list=@0x152c48005b60: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152c48010d40, last = 0x152c48010d40, elements = 1}, <No data fields>}, update_fields=@0x152c48005b48: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55a045a25150 <end_of_list>, last = 0x152c48005b48, elements = 0}, <No data fields>}, update_values=@0x152c48005b30: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55a045a25150 <end_of_list>, last = 0x152c48005b30, elements = 0}, <No data fields>}, duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /test/10.5_opt/sql/sql_insert.cc:1118
#11 0x000055a0448807be in mysql_execute_command (thd=0x152c48000c58) at /test/10.5_opt/sql/sql_parse.cc:4624
#12 0x000055a04486ebf3 in mysql_parse (thd=0x152c48000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:8100
#13 0x000055a04487ba0d in dispatch_command (command=COM_QUERY, thd=0x152c48000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_class.h:1290
#14 0x000055a04487e1e2 in do_command (thd=0x152c48000c58) at /test/10.5_opt/sql/sql_parse.cc:1370
#15 0x000055a044985d41 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55a048a1cb78, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1418
#16 0x000055a0449861bd in handle_one_connection (arg=arg@entry=0x55a048a1cb78) at /test/10.5_opt/sql/sql_connect.cc:1312
#17 0x000055a044d1aec2 in pfs_spawn_thread (arg=0x55a0489ffa78) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
#18 0x0000152cfd4e9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#19 0x0000152cfd0d7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Comment by Roel Van de Paar [ 2022-02-19 ]

MySQL 5.6.51 Stack:

MySQL 5.6.51 (Debug)

mysqld: /test/5.6_dbg/storage/perfschema/pfs_setup_actor.cc:147: void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint): Assertion `host_length <= 60' failed.

MySQL 5.6.51 (Debug)

Core was generated by `/test/MS121121-mysql-5.6.51-linux-x86_64-dbg/bin/mysqld --no-defaults --core --'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x151d05b42700 (LWP 3971904))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x0000561fde9e573d in my_write_core (sig=sig@entry=6) at /test/5.6_dbg/mysys/stacktrace.c:436
#2  0x0000561fde6ce5d5 in handle_fatal_signal (sig=6) at /test/5.6_dbg/sql/signal_handler.cc:237
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x0000151d2c2b4859 in __GI_abort () at abort.c:79
#6  0x0000151d2c2b4729 in __assert_fail_base (fmt=0x151d2c44a588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561fdef2cbe5 "host_length <= 60", file=0x561fdef2fcd0 "/test/5.6_dbg/storage/perfschema/pfs_setup_actor.cc", line=147, function=<optimized out>) at assert.c:92
#7  0x0000151d2c2c5f36 in __GI___assert_fail (assertion=assertion@entry=0x561fdef2cbe5 "host_length <= 60", file=file@entry=0x561fdef2fcd0 "/test/5.6_dbg/storage/perfschema/pfs_setup_actor.cc", line=line@entry=147, function=function@entry=0x561fdef2fd08 "void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint)") at assert.c:101
#8  0x0000561fded7b6cc in set_setup_actor_key (key=0x561fe0a32f44, user=<optimized out>, user_length=<optimized out>, host=0x561fe12437e1 "L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 19 times>..., host_length=68, role=0x561fdedf6143 "%", role_length=1) at /test/5.6_dbg/storage/perfschema/pfs_setup_actor.cc:162
#9  0x0000561fded7b8f1 in insert_setup_actor (user=user@entry=0x151d05b400b0, host=host@entry=0x151d05b400d0, role=role@entry=0x151d05b400f0) at /test/5.6_dbg/sql/sql_string.h:211
#10 0x0000561fded8d2a0 in table_setup_actors::write_row (table=0x561fe1242b00, buf=<optimized out>, fields=0x561fe1243658) at /test/5.6_dbg/storage/perfschema/table_setup_actors.cc:118
#11 0x0000561fded6fb8d in PFS_engine_table_share::write_row (this=<optimized out>, table=0x561fe1242b00, buf=buf@entry=0x561fe12437e0 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>..., fields=<optimized out>) at /test/5.6_dbg/storage/perfschema/pfs_engine_table.cc:294
#12 0x0000561fded6ceae in ha_perfschema::write_row (this=0x561fe12433f0, buf=0x561fe12437e0 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>...) at /test/5.6_dbg/storage/perfschema/ha_perfschema.cc:255
#13 0x0000561fde604192 in handler::ha_write_row (this=0x561fe12433f0, buf=0x561fe12437e0 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>...) at /test/5.6_dbg/sql/handler.cc:7373
#14 0x0000561fde74b6fb in write_record (thd=thd@entry=0x561fe11f3090, table=table@entry=0x561fe1242b00, info=info@entry=0x151d05b40430, update=update@entry=0x151d05b404b0) at /test/5.6_dbg/sql/sql_insert.cc:1947
#15 0x0000561fde753aeb in mysql_insert (thd=thd@entry=0x561fe11f3090, table_list=0x151cd80053e0, fields=@0x561fe11f5aa0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x151cd8005b28, last = 0x151cd8005d28, elements = 2}, <No data fields>}, values_list=@0x561fe11f5ae8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x151cd8005958, last = 0x151cd8005958, elements = 1}, <No data fields>}, update_fields=@0x561fe11f5ad0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x561fdf3d6320 <end_of_list>, last = 0x561fe11f5ad0, elements = 0}, <No data fields>}, update_values=@0x561fe11f5ab8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x561fdf3d6320 <end_of_list>, last = 0x561fe11f5ab8, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false) at /test/5.6_dbg/sql/sql_insert.cc:1079
#16 0x0000561fde76b158 in mysql_execute_command (thd=thd@entry=0x561fe11f3090) at /test/5.6_dbg/sql/sql_parse.cc:3525
#17 0x0000561fde7709b0 in mysql_parse (thd=thd@entry=0x561fe11f3090, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x151d05b415d0) at /test/5.6_dbg/sql/sql_parse.cc:6538
#18 0x0000561fde7726bc in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x561fe11f3090, packet=packet@entry=0x561fe12d4c91 "INSERT INTO performance_schema.setup_actors SET USER='a',HOST='LOCALHOST'", packet_length=packet_length@entry=73) at /test/5.6_dbg/sql/sql_class.h:888
#19 0x0000561fde7745cc in do_command (thd=0x561fe11f3090) at /test/5.6_dbg/sql/sql_parse.cc:1070
#20 0x0000561fde733829 in do_handle_one_connection (thd_arg=thd_arg@entry=0x561fe11f3090) at /test/5.6_dbg/sql/sql_connect.cc:989
#21 0x0000561fde73390d in handle_one_connection (arg=arg@entry=0x561fe11f3090) at /test/5.6_dbg/sql/sql_connect.cc:906
#22 0x0000561fded92fed in pfs_spawn_thread (arg=0x561fe1115360) at /test/5.6_dbg/storage/perfschema/pfs.cc:1868
#23 0x0000151d2c7d6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#24 0x0000151d2c3b1293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

MySQL 5.7.36 Stack:

MySQL 5.7.36 (Debug)

mysqld: /test/5.7_dbg/storage/perfschema/pfs_setup_actor.cc:125: void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint): Assertion `host_length <= HOSTNAME_LENGTH' failed.

MySQL 5.7.36 (Debug)

Core was generated by `/test/MS121121-mysql-5.7.36-linux-x86_64-dbg/bin/mysqld --no-defaults --core-fi'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x15427c068700 (LWP 3966300))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x00005598741aee1d in my_write_core (sig=sig@entry=6) at /test/5.7_dbg/include/my_thread.h:105
#2  0x000055987385b523 in handle_fatal_signal (sig=6) at /test/5.7_dbg/sql/signal_handler.cc:227
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x00001542886e4859 in __GI_abort () at abort.c:79
#6  0x00001542886e4729 in __assert_fail_base (fmt=0x15428887a588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559874a2c7b8 "host_length <= HOSTNAME_LENGTH", file=0x559874a30d68 "/test/5.7_dbg/storage/perfschema/pfs_setup_actor.cc", line=125, function=<optimized out>) at assert.c:92
#7  0x00001542886f5f36 in __GI___assert_fail (assertion=assertion@entry=0x559874a2c7b8 "host_length <= HOSTNAME_LENGTH", file=file@entry=0x559874a30d68 "/test/5.7_dbg/storage/perfschema/pfs_setup_actor.cc", line=line@entry=125, function=function@entry=0x559874a30da0 "void set_setup_actor_key(PFS_setup_actor_key*, const char*, uint, const char*, uint, const char*, uint)") at assert.c:101
#8  0x00005598746e037d in set_setup_actor_key (key=0x5598767c9944, user=<optimized out>, user_length=<optimized out>, host=0x15423c019331 "L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 19 times>..., host_length=68, role=0x55987477e98b "%", role_length=1) at /test/5.7_dbg/storage/perfschema/pfs_setup_actor.cc:140
#9  0x00005598746e0c0d in insert_setup_actor (user=user@entry=0x15427c065eb0, host=host@entry=0x15427c065ed0, role=role@entry=0x15427c065ef0, enabled=enabled@entry=true, history=history@entry=true) at /test/5.7_dbg/include/sql_string.h:207
#10 0x000055987470a86d in table_setup_actors::write_row (table=0x15423c007010, buf=<optimized out>, fields=<optimized out>) at /test/5.7_dbg/storage/perfschema/table_setup_actors.cc:152
#11 0x00005598746cb133 in PFS_engine_table_share::write_row (this=<optimized out>, table=0x15423c007010, buf=buf@entry=0x15423c019330 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>..., fields=<optimized out>) at /test/5.7_dbg/storage/perfschema/pfs_engine_table.cc:468
#12 0x00005598746b8f11 in ha_perfschema::write_row (this=0x15423c018f20, buf=0x15423c019330 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>...) at /test/5.7_dbg/storage/perfschema/ha_perfschema.cc:273
#13 0x00005598738d002c in handler::ha_write_row (this=0x15423c018f20, buf=0x15423c019330 "\377L佃䅌䡏協", ' ' <repeats 167 times>, "a", ' ' <repeats 18 times>...) at /test/5.7_dbg/sql/handler.cc:8173
#14 0x0000559874098c1a in write_record (thd=thd@entry=0x15423c000e10, table=table@entry=0x15423c007010, info=info@entry=0x15427c0662a0, update=update@entry=0x15427c066320) at /test/5.7_dbg/sql/sql_insert.cc:1895
#15 0x000055987409a16d in Sql_cmd_insert::mysql_insert (this=this@entry=0x15423c006128, thd=thd@entry=0x15423c000e10, table_list=table_list@entry=0x15423c005938) at /test/5.7_dbg/sql/sql_insert.cc:776
#16 0x000055987409a6ca in Sql_cmd_insert::execute (this=0x15423c006128, thd=0x15423c000e10) at /test/5.7_dbg/sql/sql_insert.cc:3142
#17 0x0000559873eb09f9 in mysql_execute_command (thd=thd@entry=0x15423c000e10, first_level=first_level@entry=true) at /test/5.7_dbg/sql/sql_parse.cc:3609
#18 0x0000559873eb5f38 in mysql_parse (thd=thd@entry=0x15423c000e10, parser_state=parser_state@entry=0x15427c067530) at /test/5.7_dbg/sql/sql_parse.cc:5599
#19 0x0000559873eb8190 in dispatch_command (thd=thd@entry=0x15423c000e10, com_data=com_data@entry=0x15427c067df0, command=COM_QUERY) at /test/5.7_dbg/sql/sql_parse.cc:1493
#20 0x0000559873eba26d in do_command (thd=thd@entry=0x15423c000e10) at /test/5.7_dbg/sql/sql_parse.cc:1032
#21 0x0000559873fb5114 in handle_connection (arg=arg@entry=0x559877577e40) at /test/5.7_dbg/sql/conn_handler/connection_handler_per_thread.cc:313
#22 0x00005598746bbb47 in pfs_spawn_thread (arg=0x559877323b20) at /test/5.7_dbg/storage/perfschema/pfs.cc:2197
#23 0x0000154288c08609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#24 0x00001542887e1293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Generated at Thu Feb 08 09:56:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.