[MDEV-24322] Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_P REFIX/mariadb-10.5.6/storage/innobase/trx/trx0trx.cc line 1329 Created: 2020-12-01 Updated: 2023-08-17 Resolved: 2021-11-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Platform RedHat, Storage Engine - InnoDB |
| Affects Version/s: | 10.5.6, 10.4.21 |
| Fix Version/s: | 10.4.22, 10.5.13, 10.6.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Martin Nix | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Duplicate | Votes: | 3 |
| Labels: | crash, innodb | ||
| Environment: |
Centos 7.8.2003, 32 vCore, 256GB RAM |
||
| Attachments: |
|
||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
See below error dump & attached core dump, happens sporadically resulting in dropping of all connections and evacuation of cache taking around 20 seconds to recover. In each case it is a random simple select that causes the issue. All tables are innodb and have been mysqlcheck'd with no issue found. Issue did not occur under 10.4 but coincided with move to 10.5. System is not under excessive load at the time the problems manifests. Problem also was manifest in 10.5.5
|
| Comments |
| Comment by Marko Mäkelä [ 2020-12-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
marnixgb, I think that this depends on the table definitions (SHOW CREATE TABLE) and the current statement. In gdb-core.11003.txt
Can you please provide more information? You are free to obfuscate the original table and column names and the data, as long as the problem remains reproducible. Ideally, we would like to have a test case in SQL format, starting with CREATE and INSERT. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Martin Nix [ 2020-12-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello Marko Excuse my tardy reply, I have been on annual leave for a short time I wish this was reproducible in the manner that you suggest ! In every case that we have had the problem it is a simple query on well established data, below are the queries where this occurred since the version upgrade that we applied in August Query (0x7f68180db060): SELECT * FROM `pm_users` WHERE `pm_user_id` IN ('127581115') The assertion failures that relate to the above queries are : 2020-09-21 09:02:08 0x7f6804e8f700 InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.5.5/storage/innobase/trx/trx0trx.cc line 1329 In the particular example you have the dump for the query is for : Query (0x7f44840e5d90): SELECT * FROM `lookup_permissions_grid` WHERE `application` IN ('guest') To give you some background below are the tables/row counts involved : pm_users / 2068318 Checking back on each of those selects these were all records that were being read that have been established for months - they have not been updated in a long time The only other hint I can give is that these tables are all very central - they are referenced a great deal, especially reads (as already indicated) - how can I help further ? Thanks Martin | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Martin Nix [ 2020-12-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry - here is the create table : CREATE TABLE `lookup_permissions_grid` ( This table contains static reference data that is only changed around 2-3 times a year but as previously stated is read from (a lot) with very simple queries per the example failure Query (0x7f44840e5d90): SELECT * FROM `lookup_permissions_grid` WHERE `application` IN ('guest') | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2020-12-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
marnixgb, thank you. Is the table being accessed in the same transaction with something else? Could the transaction isolation level be SERIALIZABLE? The assertion is claiming that the being-committed transaction does not hold any locks (or that all locks should have been released). Reads normally do not acquire any locks inside InnoDB, not even table locks. The table is protected by a metadata lock (MDL) in the SQL layer. It could be that the transaction object had been corrupted in some way by an earlier operation. In order to improve performance, the transaction objects are kept in a preallocated memory pool. I hope that you can troubleshoot this a bit further to provide some more clues, because currently I have no ideas. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Martin Nix [ 2020-12-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We run tx_isolation as REPEATABLE-READ everywhere and always have done. Switching to SERIALIZABLE is not an option for us as the impact is not desirable but we do run all updates in transactions (unless trivial) However I think that is probably a red herring - the selects that we get this error on do not relate to updates for those records (if I understand you correctly you are suggesting that the select is being affected by a lock). In the case of this MDEV report : table lookup_permissions_grid is a completely static reference table (never updated outside of a deployment window therefore never locked) Just a reminder - this issue did not exist for us before we moved to 10.5.5 (from 10.4.12) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Steve Hunger [ 2021-03-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Likely the same issue happened on a 3 Node Galera Cluster with MariaDB 10.4.18 on Debian Buster. mariadb_srv1.log The second node was the first one that crashed and the third node followed seconds after that. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-04-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
marnixgb, thank you. It indeed looks like memory corruption. We have not seen this in internal testing. And as always, with such rarely occurring corruption, it is hard to determine the cause. It could be faulty RAM, or supposedly any non-ECC RAM that is vulnerable to things like the RowHammer attack. Maybe it just corrupts with some probability. It could also be a bug somewhere in MariaDB server (outside the InnoDB storage engine), such as writing via an invalid pointer, possibly due to using freed memory. If such code is present in a rarely executed error handling code path, it could be missed in our internal testing. It is unlikely, because we test a lot with AddressSanitizer. s.hunger@artworked.de, were you able to rule out a hardware problem? If not, then your bug could be specific to Galera. There have been problems with lock conflict resolution in Galera. Maybe after the recent fix of | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Martin Nix [ 2021-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the response Marko - much appreciated I've been a long time MySql/MariaDB admin and had not come across this issue until moving to 10.5 (from 10.4) but things have settled. I have had to stick at 10.5.6 as recent attempts to go beyond that have shown generally poorer/spikier performance for some reason (not something I have seen before ever) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Steve Hunger [ 2021-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can rule out a hardware problem. The cluster has ECC RAM and runs stable on 10.4.15, but crashes regularly with 10.4.18. I've decided to wait for the release of 10.4.19 to upgrade from 10.4.15, because of this issue and | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-04-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
s.hunger@artworked.de, if you have a staging environment, maybe it would be possible to compile the MariaDB server (mysqld) from the source code using cmake -DWITH_ASAN=ON to see if it would reveal something under your workload. There are very many changes between 10.4.15 and 10.4.18. It would still appear to me that InnoDB is not the culprit but the victim and messenger of memory corruption that was inflicted by some other subsystem. For what it is worth, upon reading the 10.4 commit messages since the mariadb-10.4.18 release tag, I encountered the fixes of | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-04-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
s.hunger@artworked.de, you mentioned the magic word "cluster". Are you using Galera replication? Just today, someone reported However, the changes of | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-04-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
If ROLLBACK TO SAVEPOINT is being used by the application, a possible cause of this could be | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Steve Hunger [ 2021-04-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for your response Marko. Yes, this is a Galera multi master setup and i also think it's more an issue with Galera then with InnoDB. The application is build on Django which handles nested transactions by using savepoints and, in case of an error, rollbacks. Since i posted the comment on this issue, because of the same assertion error, more reports have been created ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Martin Nix [ 2021-10-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We have been racking our brains / command history to get to an understanding on what may be triggering this - reviewing our config changes over time the only indicator we have come across that could be instrumental in triggering the Assertion failure (and subsequent slave issues) is the method of binary logging we use. For the time that we have had this issue our binary logging has been ROW based - we have switched back to MIXED and the problem has not re-occurred since (of course this may be a coincidence !) It seems unlikely to me that this truly is an indicator of the actual problem but as it is the only thing we can correlate I thought it was worth mentioning at least in case others may have come across this too | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2021-10-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
marnixgb Thank you very much. It is often little insights or seemingly unimportant details like these that make the difference between reproducibility or not. I have observed this many times, and it is one of the important reasons we automate many things in testing. So far we have been unable to reproduce the issue. ramesh what binlog format did you use in your testing? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramesh Sivaraman [ 2021-10-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Roel I had used binlog format ROW to attempt to reproduce the crash | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Lucas Rodrigues [ 2021-10-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I don't know if I should use the comment field for it. But, I'm hitting the same issue. I update MariaDB from a ancient "10.3.12-MariaDB" (on CentOS 7.6) to "10.6.4-MariaDB" (on Debian 10). That is causing a lot of issues, sometimes MariaDB takes hours to recover from the crash. The new version can't stay online for 1 day without crashing. The only "pattern" that I notice is: the query is a prepared-statement (stmt) that is been created using `Prepare` from Golang (https://pkg.go.dev/database/sql#DB.Prepare). The query is been using without transactions, but it's updated inside one transaction, I don't use `savepoint`. I'll change my code to use (and re-use) the same transaction. I'm not sure if it will have any effect. The situation is: "Thread 2" (select without tx, but update it using tx): START TRANSACTION COMMIT/ROLLBACK "Thread N" (not use tx): Sometimes, it fails at `SELECT .... FROM table WHERE x = 1`, crashing everything and takes hours to recover sometimes. EDIT: The "binlog_format" is MIXED. I'm not using cluster/replicas. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Lucas Rodrigues [ 2021-10-31 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Before any change, only a single query fails. However, now I'm using transactions on the `SELECT .... FROM table WHERE x = 1`. It's read-only, but even then I'm using `BEGIN ... COMMIT` anyway. So, that is really odd. Before just one that query fails. Changing that query to use transaction (even if it's a read-only) seems to fix that case. Now, the error is happening on other queries that also doesn't use transaction. I will change all my code to use transaction/commit even for read-only operations, then I give a update here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2021-10-31 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you inkeliz for adding this information. Adding comments is fine. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Lucas Rodrigues [ 2021-11-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Just a quick update, I'm running for 2 days without any crash, since I change everything to transactions. Now, all queries (even read-only) are using transaction (BEGIN ... COMMIT), it sound useless, but fixes the crash in my situation. For any future readers, give a try by changing all queries to use transaction and also switch "binlog_forma" to MIXED (since was reported before too). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Martin Nix [ 2021-11-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Further update - after nearly a whole month of reliable running with the binary logging format set to mixed we are still running reliably - reminder this was the only change we have made to our config I am now going to tempt fate and switch back to row based | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2021-11-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Based on table structure this looks like a duplicate of | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Martin Nix [ 2021-11-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Jan For extra info - regarding your comment two hours ago - we don't use foreign keys anywhere in our DB (we do use utf8 though) BR Martin | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2021-11-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
marnixgb I see, I do not see how Galera could effect SELECTs as they are not replicated and thus they are just normal transactions. But question is what kind of UPDATE/DELETE/INSERT clauses there is. Do you have primary key on all tables? If not, my pointed out problem could effect you as bug was especially on utf8 case. There does not need to be foreign keys. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Martin Nix [ 2021-11-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We are not using Galera and in all cases we have primary keys (with additional indexes) - see example table in comment 2020-12-15 09:43 Thanks as ever | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Lucas Rodrigues [ 2021-11-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, I don't think it's related. In my case, I don't use Galera (or any other replication). The query that crashes doesn't use UTF-8 at all. It was fixed by using `BEGIN ... QUERY ... COMMIT`, even for read-only operations. I'm running for 3 weeks without crash. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by VAROQUI Stephane [ 2021-12-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, Get similar trace on last 10.3
table definition
This is a dev server upgraded in release form 2 weeks ago and those tables and workload are new code cat /proc/version config disable adaptive hash and change buffer it run on a pretty unoptimized ZFS on slow sata raid disques Kernel
Syslog
and dmesg
Note that the crash occured in between 2 network issues that does not show up constantly on the server | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by VAROQUI Stephane [ 2021-12-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The last slow query reported before the cash was a drop table and the workoad is doing this every minute in a process of rebuilding a table
the client code is under constant deadlock on this table
and
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2023-01-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
jplindst, can you please identify the supposed fix of this bug? Note that this affects users who do not use Galera replication. I will reopen MDEV-24035 to keep track of the non-Galera case. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2023-01-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
marko My understanding is that Galera problem was fixed on 47ba5523. That fix does not effect only foreign keys as it effects how write set column values are stored. If I remember correctly the actual customer problem we could not reproduce. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2023-01-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
If this is reproducible we would need more information. For example query log, show create table for table effected, full stack trace from all threads. Is that select inside a transaction and does that transaction contain UPDATE/DELETE-clauses. We could also when we hit that problematic assertion print more information what those locks are (this requires code changes). Clear is based on reports both standalone InnoDB and Galera cluster are effected. In Galera cluster case in testing environment run using --wsrep-debug=1 (requires debug packages). Is it possible that transaction was already killed or aborted but this fact was ignored on upper layer and execution was continued? |