[CONC-442] C application memory consumption grows endlessly if the same DB conection has been used for a long time Created: 2019-10-10 Updated: 2020-05-07 |
|
| Status: | Open |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 2.3.4, 3.1.7 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | YURII KANTONISTOV | Assignee: | Georg Richter |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Any |
||
| Description |
|
In a MariaDB client memory allocation routine: gptr alloc_root(MEM_ROOT *mem_root, size_t Size) The problem is that if DB connection is open for a long time e.g. weeks, block_num incremented with every alloc_root call an gets quite high and get_size becomes bigger and bigger reaching finally 4GB for 32bit processes causing MariaDB application shutdown. Workarounded it by changing alloc_root code to: get_size= MAX(Size+ALIGN_SIZE(sizeof(MA_USED_MEM)), Looks working but not sure whether it is a correct solution. |
| Comments |
| Comment by Georg Richter [ 2019-10-11 ] |
|
Thanks for your bug report. |
| Comment by YURII KANTONISTOV [ 2019-10-11 ] |
|
Same problem exists in the latest 3.1.4 - block_num is always incremented and c:\tools\mariadb-connector-c-3.1.4-src\mariadb-connector-c-3.1.4-src\libmariadb>grep -n block_num * |
| Comment by YURII KANTONISTOV [ 2020-05-07 ] |
|
Same behavior with the connector version 3.1.7. |