Bug #111036 | Memory leak in ODBC driver 8.0.32 and 8.0.33 | ||
---|---|---|---|
Submitted: | 15 May 2023 20:19 | Modified: | 19 Jul 2023 16:43 |
Reporter: | Roger Visser | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 8.0.32/8.0.33 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[15 May 2023 20:19]
Roger Visser
[16 May 2023 12:56]
MySQL Verification Team
Hello Roger, Thank you for the bug report. Could you please provide repeatable test case (exact steps, sample project, etc. - please make it as private if you prefer) to confirm this issue at our end? Regards, Ashwini Patil
[16 May 2023 19:01]
Roger Visser
Hi Ashwini, We just repeatedly read data form a table. have tried a few different tables and doesn't seem to be that. We read some properties and that causes the issue as well. So seem that just repeatedly accessing data results in the leak.
[16 May 2023 21:09]
Roger Visser
CPP app that demos leak.
Attachment: mem-leak-mysql-odbc.cpp (application/octet-stream, text), 3.14 KiB.
[16 May 2023 21:11]
Roger Visser
Attached sample app that repos the issue.
[16 May 2023 21:40]
Roger Visser
Some additional notes from the dev investigating the issue on our side: create table test.test ( name varchar(1000) null, value int null ); This is the table definition I used in the test app I started this thread with what I believe is the problem: https://forums.mysql.com/read.php?37,709007,709007#msg-709007 ... however, I did not get any feedback MySQL :: possible memory leak connector version 8.0.32 and up
[18 May 2023 23:05]
Roger Visser
Just wondering if the app helped or if there is something more needed?
[30 May 2023 21:54]
Roger Visser
Changes severity to see if we can get an update on the status. We would like to provid the latest version to our customers since it includes security fixes but the memory leak is a show stopper.
[2 Jun 2023 6:09]
Barry Webb
I can confirm we are having the same issue on our site with version 8.0.33. We first noticed it when users reported the 'Too Many Connections' error on our system. Running multiple queries increases the amount of open connections on the SQL ProcessList, eventually surpassing the MAX_CONNECTIONS, leading to the error (even running simple INSERT and UPDATE queries adds to the connections pool). This has never been an issue before 8.0.33. Thanks in advance!
[4 Jun 2023 8:28]
Pierre le Riche
We are also experiencing this bug. In our case we insert many records and eventually the application runs out of address space and crashes. It looks like it was introduced in 8.0.31.
[4 Jun 2023 9:23]
Pierre le Riche
I assuming this is the same memory leak we are experiencing, however I can also reproduce it with the 8.0.31 driver (8.0.30 and earlier seems fine). In our case we insert many records into a table with a longblob field. We insert multiple rows in a single execution via the SQL_ATTR_PARAMSET_SIZE statement attribute. Doing that the process runs out of address space fairly quickly. This on Windows, using the Ansi driver.
[14 Jun 2023 4:38]
Bogdan Degtyariov
The problem is verified. Working on the fix.
[14 Jun 2023 15:17]
Roger Visser
A defect was opened in the main Oracle site and supposedly linked to this ticket.
[15 Jun 2023 4:57]
Bogdan Degtyariov
This bug is marked as a duplicate of an internal bug. The patch for this problem has been pushed into the source tree.
[15 Jun 2023 23:14]
Philip Olson
Fixed as of the upcoming MySQL Connector/ODBC 8.1.0 release, and here's the proposed changelog entry from the documentation team: Fixed a memory leak generated by reading data. Thank you for the bug report.
[5 Jul 2023 19:20]
Roger Visser
Is there an ETA as to when the update will be available? I'm asking because 8.0.33 addressed reported security issues but we are unable to use that version of the driver because of the leak.
[5 Jul 2023 20:07]
Bryan Cheney
I see it is noted it will be fixed in an upcoming 8.1.0 release. Will 8.1 be the next 8.x release? Or are any future 8.0.x updates planned for release (presumably 8.0.34)? When is the 8.1 release planned for availability? Thanks.
[18 Jul 2023 20:22]
Roger Visser
How do we get an update on the status of this issue? it's been a few months since it was reported.
[19 Jul 2023 16:43]
Roger Visser
Yeah - I see 8.1 is released and reportedly addresses this issue. Unfortunately, no 32 bit driver for Windows? only 64. When will 32b be released?
[20 Jul 2023 7:07]
Barry Webb
We are also awaiting the 32-bit version. Hoping this is soon!
[31 Jul 2023 19:31]
Pierre le Riche
The 8.1 release changes the name of the driver from "MySQL ODBC 8.0 ANSI Driver" to "MySQL ODBC 8.1 ANSI Driver", which causes compatibility issues. We're currently stuck on the 8.0.25 version of the ODBC driver, since all later 8.0.x releases have serious bugs. We really need an 8.0.34 bugfix release, in both 32-bit and 64-bit. Thanks.
[8 Aug 2023 9:50]
Pierre le Riche
I have requested a 32-bit ODBC driver here: https://bugs.mysql.com/bug.php?id=111995
[12 Sep 2023 7:09]
Barry Webb
Still no word on a 32-bit fix? Unsure why this ticket has been closed as the issue still exists. Releasing a 64-bit version has not solved the issue.
[12 Sep 2023 7:26]
Pierre le Riche
The release notes for Connector/ODBC 8.1 mentions that there is a 32bit 8.0.x release that also contains bugfixes: https://dev.mysql.com/doc/relnotes/connector-odbc/en/news-8-1-0.html I can't find it under the downloads though. The latest I see is 8.0.33.