[MDEV-32630] split_materialized: SIGSEGV in best_access_path() Created: 2023-10-31 Updated: 2023-12-04 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Server |
| Affects Version/s: | 10.6.15, 10.11.4 |
| Fix Version/s: | 10.6, 10.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Patrick Winnem | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | split_materialized | ||
| Environment: |
Thinkserver SR650 Mariadb installed from Debian apt repository |
||
| Attachments: |
|
| Description |
|
Some history: Up until last week the two servers ran the same Debian and MariaDB version, as well as config. Last week we rebuilt the server, going from Debian 11 and MariaDB 10.6.7 to Debian 12 and MariaDB 10.11.4. We had 6 segfaults on the replica, the following is the shortened log of this, more complete logs in attachment. (I removed some noise form leftover partitions, hostnames and the queries, its the same query in all five instances and it might be relevant but also sensitive for our customer, let me know if needed and i will upload the complete error.log to ftp) 231030 10:54:21 [ERROR] mysqld got signal 11 ; 231030 10:56:16 [ERROR] mysqld got signal 11 ; 231030 11:01:57 [ERROR] mysqld got signal 11 ; 231030 11:06:05 [ERROR] mysqld got signal 11 ; 231030 13:36:02 [ERROR] mysqld got signal 11 ; 231030 13:37:38 [ERROR] mysqld got signal 11 ; These segfaults broke replication and we had to manually fix records from binlog as the total datasize is too large to clone in a reasonable amount of time. Please let me know if there is more information i can provide. We dont have core dump from these crashes as it was not enabled in the config, it is now tho. If needed i should be able to provide more debug on the next crash. |
| Comments |
| Comment by Marko Mäkelä [ 2023-10-31 ] | |||||||||||||||||||||||||||||||||
|
The first stack trace in error-wo-queries.log
This looks like an optimizer bug to me. We have or had some open bugs in this area, such as MDEV-31818 and To diagnose this, we may need the table schema, the queries, and possibly some data as well. You can obfuscate the names of tables, columns and indexes, but the end result should be valid SQL and equivalent to your actual input. | |||||||||||||||||||||||||||||||||
| Comment by Patrick Winnem [ 2023-10-31 ] | |||||||||||||||||||||||||||||||||
|
Hello, thanks for your prompt response! As i ran the query manually i now have a core dump and i have run this through dbd with debug symbols as stated in the guide from mariadb as well as debian and uploaded. | |||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-10-31 ] | |||||||||||||||||||||||||||||||||
|
Looking at the complete stack trace:
Things to note:
We are considering split-materialized. and this: we're executing a prepared statement:
| |||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-10-31 ] | |||||||||||||||||||||||||||||||||
|
nem, could you please check if this workaround helps to avoid the crash: Put in my.cnf:
| |||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-10-31 ] | |||||||||||||||||||||||||||||||||
|
Note: the contents of the attached backtrace.dump.log
the values of {[table}}, keys, real_keynr look totally meaningless... | |||||||||||||||||||||||||||||||||
| Comment by Patrick Winnem [ 2023-10-31 ] | |||||||||||||||||||||||||||||||||
|
Hello, The query runs correctly when split_materialized is set to off. |