Bug #76397 Huge Memory Leak when the SQL editor tries to auto-complete code.
Submitted: 19 Mar 2015 20:08 Modified: 14 Aug 2015 11:22
Reporter: Sergio Bobillier Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:6.2.5.0 OS:Linux (Ubuntu 14.04.2)
Assigned to: CPU Architecture:Any

[19 Mar 2015 20:08] Sergio Bobillier
Description:
Sometimes when writing code on the SQL editor MySQL tries to load the code completing menu and causes a *HUGE* memory leak. The workbench consumes a lot of memory really fast forcing the system to swap all the other applications and rendering the whole system unresponsive.

This continues until MySQL Workbench has exhausted all the available memory and the system kills the process.

This is a critical bug because you could use this to cause DDoS or system crash.

These are the messages you get on the syslog:

Mar 19 12:55:07 centinel-prime kernel: [14519.971675] Out of memory: Kill process 9502 (mysql-workbench) score 682 or sacrifice child
Mar 19 12:55:07 centinel-prime kernel: [14519.971678] Killed process 9502 (mysql-workbench) total-vm:9066392kB, anon-rss:3201664kB, file-rss:40kB

I will attach the mysql-workbench process output to the bug report.

How to repeat:
It happens randomly but it always happens when you are writing code on the SQL editor in moments when MySQL Workbench should show the auto-complete menu (eighter for tale or field names or for SQL keywords)
[19 Mar 2015 20:09] Sergio Bobillier
MySQL Workbench Terminal output when crash occurred

Attachment: mysql-workbench-output.txt (text/plain), 3.35 KiB.

[21 Apr 2015 16:30] Sergio Bobillier
As a workaround for this annoying situation I disabled the Auto Complete feature in MySQL Workbench

Edit -> Preferences -> SQL Editor -> Query Editor -> Enable Code Completion in Editors

Since then I haven't had more of this sort of memory leaks and subsequent crashes. I suggested the solutions to my workmates and they reported me that they haven't had any more crashes either.

This suggest that the culprit is the Auto Complete routine.

PD: Sorry about the DDos part in the bug report, it was mean to be just DoS (crash the local machine).
[14 Aug 2015 11:22] MySQL Verification Team
Hello Sergio,

hank you for the report.
I haven't seen this issue after Bug #70338.
Please could you try latest 6.3.4 build confirm if you have still this issue? If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
Umesh