Bug #110073 Crash when writing into temptable
Submitted: 15 Feb 2023 8:21 Modified: 16 Feb 2023 1:03
Reporter: Fengchun Hua Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.18 OS:Any
Assigned to: CPU Architecture:Any
Tags: temptable

[15 Feb 2023 8:21] Fengchun Hua
Description:
13:02:37 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7fa57db99c00
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 = 7fa583625d50 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x3d) [0x55764ef2ac9d]
/usr/sbin/mysqld(handle_fatal_signal+0x303) [0x55764e03cba3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7fa59ede1890]
/lib/x86_64-linux-gnu/libc.so.6(+0x18eb38) [0x7fa59d2bcb38]
/usr/sbin/mysqld(temptable::Row::copy_to_own_memory(std::vector<temptable::Column, temptable::Allocator<temptable::Column> > const&, unsigned long) const+0x456) [0x55764f4b70a6]
/usr/sbin/mysqld(temptable::Table::insert(unsigned char const*)+0xcf) [0x55764f4ba7ef]
/usr/sbin/mysqld(handler::ha_write_row(unsigned char*)+0x194) [0x55764e155bc4]
/usr/sbin/mysqld(Table_function::write_row()+0x1b) [0x55764e36b79b]
/usr/sbin/mysqld(Table_function_json::fill_json_table()+0x308) [0x55764e36dee8]
/usr/sbin/mysqld(Table_function_json::fill_result_table()+0xe4) [0x55764e36e004]
/usr/sbin/mysqld(MaterializedTableFunctionIterator::Init()+0x23) [0x55764e0fa233]
/usr/sbin/mysqld(NestedLoopIterator::Read()+0xa1) [0x55764e0fa411]
/usr/sbin/mysqld(JOIN::exec()+0x722) [0x55764ded6b02]
/usr/sbin/mysqld(Sql_cmd_dml::execute_inner(THD*)+0x2ee) [0x55764df5d23e]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x458) [0x55764df64788]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0x1e9f) [0x55764df1135f]
/usr/sbin/mysqld(Prepared_statement::execute(String*, bool)+0x834) [0x55764df41574]
/usr/sbin/mysqld(Prepared_statement::execute_loop(String*, bool)+0xae) [0x55764df43d8e]
/usr/sbin/mysqld(mysqld_stmt_execute(THD*, Prepared_statement*, bool, unsigned long, PS_PARAM*)+0x1d1) [0x55764df45481]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x2891) [0x55764df16bb1]
/usr/sbin/mysqld(do_command(THD*)+0x1a1) [0x55764df17b61]
/usr/sbin/mysqld(+0xf27010) [0x55764e02e010]
/usr/sbin/mysqld(+0x2329e79) [0x55764f430e79]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7fa59edd66db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fa59d24f88f]

How to repeat:
Have no idea.
[15 Feb 2023 12:59] MySQL Verification Team
Hi Mr. Hua,

Thank you for your bug report.

However, you are using a very old release of 8.0.

Current release is 8.0.32 and it is available for the download.

Unsupported.
[16 Feb 2023 1:03] Fengchun Hua
Yes. 8.0.18 is a very old version. I reproduce it in 8.0.22, and I can't upgrade version newer than 8.0.22, Would you please tell me which commit fix this problem? Maybe I can port it to 8.0.22 and fix this problem.
[16 Feb 2023 13:09] MySQL Verification Team
Hi Mr. Hua,

8.0.22 is also a very old release. Current release is on 8.0.32.

If you can repeat it on 8.0.32, we would need a complete test case from you.

A repeatable test case consists of a set of SQL commands that always lead to the crash and stacktrace like the above.

We are patiently waiting on the fully repeatable test case.
[16 Feb 2023 13:14] MySQL Verification Team
Hi,

There is no need for you to send anything.

We discovered that this bug is a duplicate of the following original:

https://bugs.mysql.com/bug.php?id=101885

This bug is fixed in 8.0.32, so all you have to do is upgrade to the latest release.

You can not see the contents of that bug, since the test case must remain hidden, as it would enable ill-intended to crash any MySQL server of prior releases.