Bug #92590 Workbench client connections memory leak
Submitted: 27 Sep 2018 19:51 Modified: 24 Mar 2020 20:29
Reporter: Jason Brunette Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version:8.0.12 OS:Microsoft Windows
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: memory leak client connections

[27 Sep 2018 19:51] Jason Brunette
Description:
Windows 10 64bit
Windows 7 64bit

MySQL Workbenchs 6.3.9 - 8.0.12
MySQL Servers 5.5.29 - 5.7.19

The Administrative - Client Connections tab leaks significant amounts of memory, especially when a Refresh Rate is active and long running queries are common.

How to repeat:
On an idle server, Open the Administrative - Client Connections tab and set the Refresh Rate to .5s, then run the following SQL. Where it says "REPEAT 10000x", it means to copy/paste the "1=1 AND ..." line within the comment 10000 times.

The SQL required to trigger the memory leak is by no means limited to what is used below.  Larger queries simply amplify the effect, making it easier to witness the leak.  The contents of the comment are not important.  The use of SLEEP() is not important, nor is the presence of a comment.

SELECT SLEEP(100)
/*
1=1 AND 1=1 AND 1=1 AND 1=1 AND 1=1 AND 1=1 AND 1=1 AND 1=1 AND 1=1 AND 1=1 AND
REPEAT ABOVE 10000x  
/*

While the query is executing, observe memory usage with your favorite tool.
[27 Sep 2018 19:54] Jason Brunette
Process Explorer performance graph

Attachment: leak.png (image/png, text), 12.92 KiB.

[27 Sep 2018 19:56] Jason Brunette
In the above image, the client connections tab was refreshing every .5 seconds on a completely idle server.  The increase in the Private Bytes graph is when the query was executed.  The end of the increases occurs when the query completes.  the client connections tab was closed but resulted in no memory being freed.
[29 Oct 2018 14:12] Jason Brunette
Affects any architecture.
[24 Feb 2020 20:29] MySQL Verification Team
Please try version 8.0.19.
[25 Mar 2020 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".