[MDEV-9747] XtraDB thread never exits. Always in 'cleaning up' Created: 2016-03-16 Updated: 2017-05-03 Resolved: 2016-04-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - OQGRAPH, Storage Engine - XtraDB |
| Affects Version/s: | 10.1.12, 10.0, 10.1 |
| Fix Version/s: | 10.0.25 |
| Type: | Bug | Priority: | Major |
| Reporter: | Brian Evans | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Sprint: | 10.0.25 | ||||||||
| Description |
|
I've been having an issue with an instance of MariaDB 10.1.12 on a non-production machine which makes it never shutdown. It just hangs forever with "waiting for transaction". This was odd as nothing was showing in "SHOW FULL PROCESSLIST" I discovered a transaction thread never finishes.
|
| Comments |
| Comment by Elena Stepanova [ 2016-03-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
grknight, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brian Evans [ 2016-03-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Added files requested. The Signal 6's are me doing SIGABRT to get the daemon to stop | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-03-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks, I am able to reproduce the problem. It happens between OQGRAPH and InnoDB. I'm not sure which one is to blame, so I'm assigning it to jplindst for now; Jan, if it turns out to be not an InnoDB problem, please reassign it back to me or directly to andymc73. The described issue with shutdown happens on a non-debug build. Debug build goes down with an assertion failure earlier. The MTR test case below is for manual reproducing/debugging only, please don't put it like this into the regression test suite (especially since it passes either way). If it's run on a debug build, it fails on SELECT * FROM oq_graph (assertion failure is at the end of the comment). On a non-debug build, it does not crash, but returns an empty result set, which is already wrong, then the test proceeds to shutdown, hangs there until the timeout is exceeded (you'll see messages from the test), then kills the server, cleans up and exits.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2016-04-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Problem is that oqgraph used incorrect thd, this leads to fact that transaction inside InnoDB is not committed/aborted leaving it active => xtradb log thread waits forever transaction to end. Fix in https://github.com/MariaDB/server/pull/153 for https://jira.mariadb.org/browse/MDEV-8206 fixes also both problems reported in this bug report. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2016-04-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fixed by commits: Comment from https://github.com/MariaDB/server/pull/153 commit 6651005e623e3a12ca0af6a645483a165941f8fe Fix for | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nilnandan Joshi [ 2017-05-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can reproduce this issue with MariaDB 5.0.29, 5.1.21.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-05-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The output lines "MySQL thread id" are emitted by thd_get_error_context_description(), which is called by innobase_mysql_print_thd(), called by trx_print_low() which displays the line "TRANSACTION 0, not started". From the InnoDB point of view, the 2 transactions are not active. The trx objects should be cached objects that only exist in the handler interface and in trx_sys->mysql_trx_list. The objects should be freed when the connection is closed. Maybe these connections did access InnoDB in the past, but no transaction is active any more? There only is one transaction allocated for the SHOW ENGINE INNODB STATUS. Do the "cleaning up" entries go away when the two connections are disconnected? |