[MXS-3251] Hang on shutdown when executing KILL query Created: 2020-10-21 Updated: 2020-11-16 Resolved: 2020-10-23 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 2.5.5 |
| Fix Version/s: | 2.5.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | markus makela | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The mxs1985_kill_hang test randomly fails due to a timeout which turned out to be caused by a session reference leak. The current theory for this leak is that when a posting of a message to a worker fails in MariaDBClientConnection::execute_kill, the reference is not released. |
| Comments |
| Comment by markus makela [ 2020-10-22 ] |
|
Looks like this is caused by a race condition on the session state. As the LocalClient isn't tied to the session that it relates to, it won't be closed when the session itself closes. This causes the system to hang on shutdown as MaxScale is waiting for the session to stop. The session won't stop as there are open references to it that are held by the LocalClient instances. The solution is to keep the references to the LocalClient objects in the client protocol object and close them whenever the session is closed. |