Bug #114222 Assertion failure: row0mysql.cc:2332:node->pcur->m_rel_pos == BTR_PCUR_ON
Submitted: 5 Mar 2024 9:42 Modified: 7 Mar 2024 3:30
Reporter: longwei liu Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.32 OS:CentOS (el8_7.x86_64)
Assigned to: CPU Architecture:x86 (intel)

[5 Mar 2024 9:42] longwei liu
Description:
2024-03-05T08:28:59.265062Z 502 [ERROR] [MY-013183] [InnoDB] Assertion failure: row0mysql.cc:2332:node->pcur->m_rel_pos == BTR_PCUR_ON thread 139853599237888
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
2024-03-05T08:28:59Z UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
BuildID[sha1]=d2278b3be8dd910aa7a52159bba3b72d8ac0277c
Thread pointer: 0x7f2c68000ec0
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 = 7f32341a5c60 thread_stack 0x100000
/usr/local/mysql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x207b9be]
/usr/local/mysql/bin/mysqld(print_fatal_signal(int)+0x3c3) [0x1114d23]
/usr/local/mysql/bin/mysqld(my_server_abort()+0x5e) [0x1114e2e]
/usr/local/mysql/bin/mysqld(my_abort()+0xa) [0x2075d0a]
/usr/local/mysql/bin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x30c) [0x2355cfc]
/usr/local/mysql/bin/mysqld() [0x229e69e]
/usr/local/mysql/bin/mysqld(row_update_for_mysql(unsigned char const*, row_prebuilt_t*)+0x30) [0x229e700]
/usr/local/mysql/bin/mysqld(ha_innobase::update_row(unsigned char const*, unsigned char*)+0x2a2) [0x21758a2]
/usr/local/mysql/bin/mysqld(handler::ha_update_row(unsigned char const*, unsigned char*)+0x1eb) [0x121c12b]
/usr/local/mysql/bin/mysqld(UpdateRowsIterator::DoImmediateUpdatesAndBufferRowIds(bool*, bool*)+0x2f0) [0x1087ba0]
/usr/local/mysql/bin/mysqld(UpdateRowsIterator::Read()+0x76) [0x10885c6]
/usr/local/mysql/bin/mysqld(Query_expression::ExecuteIteratorQuery(THD*)+0x378) [0x10831b8]
/usr/local/mysql/bin/mysqld(Query_expression::execute(THD*)+0x29) [0x10833d9]
/usr/local/mysql/bin/mysqld(Sql_cmd_update::execute_inner(THD*)+0xa3) [0x1090aa3]
/usr/local/mysql/bin/mysqld(Sql_cmd_dml::execute(THD*)+0x2b1) [0x100e771]
/usr/local/mysql/bin/mysqld(mysql_execute_command(THD*, bool)+0xc9c) [0xfadb0c]
/usr/local/mysql/bin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x40f) [0xfb17ff]
/usr/local/mysql/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x2028) [0xfb3df8]
/usr/local/mysql/bin/mysqld(do_command(THD*)+0x1df) [0xfb4e5f]
/usr/local/mysql/bin/mysqld() [0x1105538]
/usr/local/mysql/bin/mysqld() [0x280397a]
/lib64/libpthread.so.0(+0x81cf) [0x7f326b8571cf]
/lib64/libc.so.6(clone+0x43) [0x7f3269991e73]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f2c680be390): UPDATE  `t_ihc_order_insured` i,t_mdis_bill_223 b SET  b.`checked` =    (CASE WHEN i.`bak4` = '1' AND i.`pay_fee` = b.`amount` THEN 'Y' ELSE 'E' END), b.`bill_desc` =  (CASE WHEN i.`bak4` = '1' AND i.`pay_fee` = b.`amount` THEN '' WHEN i.`bak4` != '1' THEN '' WHEN i.`pay_fee` != b.`amount` THEN '' ELSE '' END)     WHERE  EXISTS (SELECT 1 FROM `t_ihc_order_main` m  WHERE m.`order_no` = i.`order_no` AND m.`order_status`='3')  AND i.`order_no` = b.`order_no`  AND i.`certi_code` = b.`bizinfo3`  AND b.`checked`='N'  ORDER BY i.`order_no`
Connection ID (thread ID): 502
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.

How to repeat:
UPDATE  `t_ihc_order_insured` i,t_mdis_bill_223 b SET 
b.`checked` =    (CASE WHEN i.`bak4` = '1' AND i.`pay_fee` = b.`amount` THEN 'Y' ELSE 'E' END),
b.`bill_desc` =  (CASE WHEN i.`bak4` = '1' AND i.`pay_fee` = b.`amount` THEN '' WHEN i.`bak4` != '1' THEN '' WHEN i.`pay_fee` != b.`amount` THEN '' ELSE '' END)    
WHERE  EXISTS (SELECT 1 FROM `t_ihc_order_main` m 
WHERE m.`order_no` = i.`order_no` AND m.`order_status`='3') 
AND i.`order_no` = b.`order_no` 
AND i.`certi_code` = b.`bizinfo3` 
AND b.`checked`='N' 
ORDER BY i.`order_no` LIMIT 10000;
[5 Mar 2024 10:37] MySQL Verification Team
Hi Mr. liu,

Thank you very much for your bug report.

However, we do not have the entire test case, hence we can not repeat it. We need a table with it's contents.

Luckily, we found a bug, with a full test case, that is already verified and that has the identical stacktrace as your report.

So, this report is a duplicate of:

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

This bug is a security vulnerability bug (because of the crash) and it has a full test case. That is why it is hidden. Hence, you can not view it, but we have left a remark in that bug report that it is the original bug of your bug report.

Duplicate.
[5 Mar 2024 10:41] MySQL Verification Team
Hi,

The only difference between your bug and the original one is in the assertion. This could be due to the difference in the release that is used.

Hence, if you can supply us with the table which crashes on that UPDATE, we would be grateful.
[7 Mar 2024 3:30] longwei liu
Thank you for the reply!
Sorry, I can't provide the data in the table due to data privacy concerns.
Also, I don't see any information about the bug #111451. Can you tell me more information? I need to fix the mysql crash problem. Or please tell me how to do!
[7 Mar 2024 11:03] MySQL Verification Team
Hi Mr. liu,

We can not provide you with additional data about the original bug for your problem. This is because it is Security Vulnerability bug, with a fully repeatable test case. Hence, nobody from the public is allowed to see the test case as it can lead to malicious attacks on any MySQL installation.

Hence, your problem will be fixed when the original bug is fixed. You will be informed when it happens.

Also, this is a forum for the reports with  fully  repeatable test cases, which you do not have. This is not a forum for free support.

What you can do is try to change that UPDATE statement to provide different query which would do the same job.