Bug #107953 Query crash when building pre version of blob column
Submitted: 23 Jul 2022 12:33 Modified: 26 Jul 2022 12:32
Reporter: George Ma Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[23 Jul 2022 12:33] George Ma
Description:
I met a crash when doing a query and the stack is:

04:02:13 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7ff17a0fb000
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 = 7ffacc9fc41f thread_stack 0x40000
/u01/mysql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x226a1ce]
/u01/mysql/bin/mysqld(handle_fatal_signal+0x2eb) [0x124651b]
/lib64/libpthread.so.0(+0xf100) [0x7ffaddda3100]
/u01/mysql/bin/mysqld(trx_undo_read_blob_update(const byte *, upd_field_t *, lob::undo_vers_t *)) [0x25b4b9b]
/u01/mysql/bin/mysqld(trx_undo_update_rec_get_update(unsigned char const*, dict_index_t const*, unsigned long, unsigned long, unsigned long, unsigned long, trx_t*, mem_block_info_t*, upd_t**, lob::undo_vers_t*, type_cmpl_t&)+0x8ca) [0x25b67ea]
/u01/mysql/bin/mysqld(trx_undo_prev_version_build(unsigned char const*, mtr_t*, unsigned char const*, dict_index_t const*, unsigned long*, mem_block_info_t*, unsigned char**, mem_block_info_t*, dtuple_t const**, unsigned long, lob::undo_vers_t*)+0x572) [0x25b84b2]
/u01/mysql/bin/mysqld(row_vers_build_for_consistent_read(unsigned char const*, mtr_t*, dict_index_t*, unsigned long**, ReadView*, mem_block_info_t**, mem_block_info_t*, unsigned char**, dtuple_t const**, lob::undo_vers_t*)+0x1eb) [0x256ec5b]
/u01/mysql/bin/mysqld(Row_sel_get_clust_rec_for_mysql::operator()(row_prebuilt_t*, dict_index_t*, unsigned char const*, que_thr_t*, unsigned char const**, unsigned long**, mem_block_info_t**, dtuple_t const**, mtr_t*, lob::undo_vers_t*)+0x6f8) [0x2551e88]
/u01/mysql/bin/mysqld(row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long)+0x2323) [0x2559793]
/u01/mysql/bin/mysqld(ha_innobase::general_fetch(unsigned char*, unsigned int, unsigned int)+0x1fb) [0x23ed95b]
/u01/mysql/bin/mysqld(handler::ha_index_next_same(unsigned char*, unsigned char const*, unsigned int)+0x1ac) [0x135516c]
/u01/mysql/bin/mysqld(RefIterator<false>::Read()+0x128) [0x1076bc8]
/u01/mysql/bin/mysqld(FilterIterator::Read()+0x14) [0x15b2f94]
/u01/mysql/bin/mysqld(LimitOffsetIterator::Read()+0x7d) [0x15b307d]
/u01/mysql/bin/mysqld(Query_expression::ExecuteIteratorQuery(THD*)+0x4fb) [0x117a43b]
/u01/mysql/bin/mysqld(Query_expression::execute(THD*)+0x2c) [0x117a57c]
/u01/mysql/bin/mysqld(Sql_cmd_dml::execute_inner(THD*)+0x27b) [0x110a99b]
/u01/mysql/bin/mysqld(Sql_cmd_dml::execute(THD*)+0x5af) [0x111519f]

I have checked the code and found that is crashed when building pre version of blob(JSON) column.

How to repeat:
No
[25 Jul 2022 12:01] MySQL Verification Team
Hi Mr. Ma,

Thank you very much for your bug report.

We have never encountered a stacktrace like the one you reported.

Hence, what we need is a fully repeatable test case, consisting of the set of SQL statements that always lead to the crash that you attached.

We also do not see what version and release are you using .....

Many thanks in advance.
[26 Jul 2022 3:25] George Ma
Sorry, I forgot the version.

The version is 8.0.25, this crash occurred twice in our online environment, but we have not found a way to reproduce the problem.

If we get more information, I will respond here.
[26 Jul 2022 12:32] MySQL Verification Team
Hi Mr. Ma,

Thank you for your feedback.

However, we do need much more from you, preferably repeatable with release 8.0.29. Please, read further on ....

Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php 

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.  

Thank you for your interest in MySQL.