Bug #113639 Crash when executes test case main.default_as_expr in debug with ps-protocol
Submitted: 15 Jan 2:06 Modified: 15 Jan 5:37
Reporter: Huaxiong Song (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S6 (Debug Builds)
Version:8.0.35 OS:Any
Assigned to: CPU Architecture:Any

[15 Jan 2:06] Huaxiong Song
Description:
Crash when executes test case main.default_as_expr in debug with ps-protocol:

/mysql-server/runtime_output_directory/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x43) [0x4a99fd2]
/mysql-server/runtime_output_directory/mysqld(print_fatal_signal(int)+0x3a2) [0x367d6c1]
/mysql-server/runtime_output_directory/mysqld(handle_fatal_signal+0x75) [0x367d8c4]
/lib64/libpthread.so.0(+0xf630) [0x7fc08ebfd630]
/mysql-server/runtime_output_directory/mysqld(Security_context::priv_host() const+0x41) [0x37993dd]
/mysql-server/runtime_output_directory/mysqld(Item_func_current_user::val_str(String*)+0xa5) [0x395cebb]
/mysql-server/runtime_output_directory/mysqld(Item_func_current_user::save_in_field_inner(Field*, bool)+0x33) [0x395cdc9]
/mysql-server/runtime_output_directory/mysqld(Item::save_in_field(Field*, bool)+0x7c) [0x387b496]
/mysql-server/runtime_output_directory/mysqld(Field::evaluate_insert_default_function()+0x5c) [0x37cddb0]
/mysql-server/runtime_output_directory/mysqld(COPY_INFO::set_function_defaults(TABLE*)+0x11f) [0x33c9123]
/mysql-server/runtime_output_directory/mysqld() [0x3344f29]
/mysql-server/runtime_output_directory/mysqld(fill_record_n_invoke_before_triggers(THD*, COPY_INFO*, mem_root_deque<Item*> const&, mem_root_deque<Item*> const&, TABLE*, enum_trigger_event_type, int, bool, bool*)+0x424) [0x334535f]
/mysql-server/runtime_output_directory/mysqld(Sql_cmd_insert_values::execute_inner(THD*)+0x611) [0x3b893b7]
/mysql-server/runtime_output_directory/mysqld(Sql_cmd_dml::execute(THD*)+0x6ed) [0x34d5821]
/mysql-server/runtime_output_directory/mysqld(mysql_execute_command(THD*, bool)+0x2156) [0x344f649]
/mysql-server/runtime_output_directory/mysqld(Prepared_statement::execute(THD*, String*, bool)+0x89e) [0x3498482]
/mysql-server/runtime_output_directory/mysqld(Prepared_statement::execute_loop(THD*, String*, bool)+0x311) [0x34969d5]
/mysql-server/runtime_output_directory/mysqld(mysqld_stmt_execute(THD*, Prepared_statement*, bool, unsigned long, PS_PARAM*)+0x20a) [0x3493ae7]
/mysql-server/runtime_output_directory/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0xf71) [0x344a268]
/mysql-server/runtime_output_directory/mysqld(do_command(THD*)+0x5bd) [0x344892f]
/mysql-server/runtime_output_directory/mysqld() [0x3668735]

How to repeat:
Compile debug version of mysql and do mysql-test-run:

./mysql-test-run.pl  --report-unstable-tests --sanitize --timer --force --skip-ndb --parallel=32 --max-connections=100000  --nounit-tests --ps-protocol main.default_as_expr

In fact, use asan mode, we can see more detail.
[15 Jan 5:37] MySQL Verification Team
Hello Huaxiong Song,

Thank you for the report and steps.
Verified as described.

regards,
Umesh